Solved – the expected value of the chi square statistic when the null is true

chi-squared-test

And how does it depend on degrees of freedom? And why isn't the answer 0?

Best Answer

If all the other assumptions hold (and, depending on which particular chi-square test you're doing), also assuming that the chi-square approximation to the distribution of the test statistic holds*, then under the null hypothesis, the statistic has the same distribution as the sum of squares of $\nu$ independent standard normal random variables.

* chi-squared tests of counts have a discrete distribution that is approximated by a chi-square.

This has expectation $\nu$ and variance $2\nu$.

why isn't the answer 0?

Assuming you're doing some kind of "observed minus expected" calculation -- because under the null hypothesis the observed values are random quantities whose mean happens to be the expected values, but they vary around that mean. Hence their squared-standardized-differences from those expected values won't be 0; $\mathbb{E}(O_i-E_i)= 0$ (under the null) but $\mathbb{E}[(O_i-E_i)^2]$ - essentially a variance - is not.