I think there are two ways to perform the chi-Square goodness-of-fit test:

  1. Divide the sample space into bins of equal size and see how many observed values fall in each bin. where the expected per bin depends on the fit.
  2. Divide the cdf of the fit into B bins of equal size (e.g., five bins of size .2 each, or 8 bins of width .125 each) and see where each observed value would belong into. -> count observed values per bin of size > calculate the chi square statistic (where the expected nr per bin is n/B or observations/bins, since the quantiles are distributed uniformly)

Is 2. a valid approach? And is there anything noteworthy about the second approach?

  • $\begingroup$ I think the number of bins will determine the value of $\chi_n$, where $n$ is the number of bins $-1$. I might be wrong $\endgroup$ Mar 10, 2013 at 7:12

1 Answer 1


If I understood the question correctly, the first approach corresponds to the regular chi-squared test and the second one is over the cdf.

The fitting tests are all based on the idea; if some samples are coming from a certain distribution. If the error between the observed mean and the actual mean are Gaussian distributed, then their squared sum will be chi-squared distribution.

According to $2-$, deriving some statistic over the cdf bins is not a useless idea. If the samples resamble the cdf of the true distribution then you are done. On the other hand, the deviations from the true frequecies will indicate you the goodness of fit. However a special care should be taken for about the number of bins/number of samples as well as distribution of the error.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .