Constraints on the expected counts
The goodness-of-fit test is easiest when the null hypothesis specifies all Poisson distribution means, \(\{E_i\}\). In practice however, the null hypothesis values of the \(\{E_i\}\) involve unknown parameters that must be estimated from the data. The simplest example is
Estimating the unknown parameters makes the chi-squared test statistic smaller. If \(c\) parameters are estimated from the data and used to get values for the \(\{E_i\}\), we say that there are \(c\) constraints on the \(\{E_i\}\) and
\[ X^2 \;\;=\;\; \sum_{i=1}^k {\frac{\left(O_i - E_i\right)^2}{E_i}} \;\; \underset{\text{approx}}{\sim} \;\; \ChiSqrDistn(k - c \text{ df}) \]Example
This table shows the number of heart attacks in a city in each of ten weeks.
Week | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
---|---|---|---|---|---|---|---|---|---|---|
Count | 6 | 11 | 13 | 10 | 21 | 8 | 16 | 6 | 9 | 19 |
Test whether the heart attacks have occurred at random with a constant rate over this period.
(Solved in full version)