# Chi-square goodness of fit test proof

I understand the classcial $\chi^2$ "goodness of fit" test used in Statistics, in which we compute $\sum_{i=1}^n \frac{(O_i - E_i)^2}{E_i}$ and, by comparing this quantity to a value found in a table of $\chi^2$ law (with a given risk $\alpha = 5\%$ for example), we decide if we should or not accept the hypothesis that the sample is likely to be an observation or not of a given distribution.

But I haven't found a good precise proof online yet, that shows that it's not only a good "recipe", but also has a strict proof, using probability theory (I know it exists, but I haven't found one yet).

Do you know a good detailed proof?

• good find, @Basj – cmo Apr 9 '18 at 18:08

$$\sum_{j=1}^n \frac{(\nu_j-n p_j)^2}{n p_j} \rightarrow \chi_{r-1}^2$$ converges in distribution to $\chi_{r-1}^2$-distribution with $r − 1$ degrees of freedom.