# How the Pearson's Chi Squared Test works

Following a recent down vote I have been trying to check my understanding of the Pearson Chi Squared test. I usually use the chi squared statistic (or reduced chi squared statistic) for fitting or checking the resulting fit. In this case the variance is not usually the expected number of counts in a table or histogram but some experimentally determined variance. Either way, I was always under the impression that the test still used the asymptotic normality of the multinomial PDF (i.e. my test statistic is

$$Q = (n-Nm)^\top V^{-1}(n-Nm)$$

and $(n-Nm)$ is asymptotically multinormal where $V$ is is covariance matrix). Therefore $Q$ has a chi-squared distribution given large $n$ so using the expected number of counts as the denominator in the statistic becomes valid for large $n$. Its possible that this is only true for histograms, I haven't analysed a small table of data in years.

Is there a more subtle argument that I am missing? I would be interested in a reference, or even better a short explanation. (Although its possible I just got down voted for omitting the word asymptotic, which I concede is rather important.)

• Following from that presumably its also true that one could use the exact same test with any normally distributed data. If I were to use a voltmeter which I knew to have some normally distributed error that I had determined then I could use, $$\chi^{2} = \sum_{i} \frac{(V_{obs} - V_{exp})^{2}}{\sigma^{2}}$$. Is this true? The reduced chi square statistic presumeably relies on this fact. – Bowler Dec 14 '11 at 15:59

• The application described in the question is "use the chi squared statistic ... for fitting or checking the resulting fit." The distribution of a random variable can be tested by partitioning its possible values into a finite number of subsets, counting the numbers of iid outcomes that fall within each subset, and applying a $\chi^2$ test on those counts (which evidently are categorical). In this sense you are both correct and incorrect: the $\chi^2$ test analyzes counts but nevertheless it does work with continuous data. BTW, "parametric data" is nonsensical. – whuber Mar 29 '15 at 18:46