Path: news.mathworks.com!not-for-mail
From: Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: chi-square two sample test
Date: Tue, 10 Jun 2008 09:24:39 -0400
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <g2lvan$1a3$1@fred.mathworks.com>
References: <g2ls65$p3u$1@fred.mathworks.com>
NNTP-Posting-Host: perkinsp.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1213104279 1347 172.31.57.88 (10 Jun 2008 13:24:39 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 10 Jun 2008 13:24:39 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
In-Reply-To: <g2ls65$p3u$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:473043



wang wang wrote:
> I have a data set,and I estimate the parameters of a 
> specified distribution,say the lognormal distribution,from 
> that data set. Now I want to test the goodness of fit of 
> that distribution to the data(notice particularly that the 
> parameters of the distribution is estimated from the data 
> set).Can anyone tell me whether the chi-square two sample 
> test is adequate to do that or not?

Is there a reason why you want to use a two-sample test?  Your description 
sounds like you want the usual chi-squared test against a parametric 
distribution for which you have estimated the parameters.



> And is there a 
> exsiting function to do that work?  I have known that there
> exist a function named'chi2gof'which can do the chi-square 
> goodness-of-fit test,but this function only tests whether 
> the data comes from a normal distribution. 

That's not correct.  CHI2GOF allows you to specify any distribution you want, in 
  a couple fo different ways.