calculate goodness of fit matlab
问题 I have a set of observations obs . If I plot the histogram of the observation I see that they could come from a gamma distribution [counts,x] = hist(obs,[1:max(obs)]); I would like to prove it using chi square goodness of fit. So I first estimate the gamma parameters paramEsts = fitdist(obs,'Gamma'); and the use chi2gof to see if the hypotesis is true (h=0). [h,p] = chi2gof(obs,'CDF',paramEsts) My problem is that I get a p = NaN...how is it possible? Where is my mistake? Thanks to test it