We now consider a hypothesis test about whether such a Poisson model underlies a set of counts,

Test statistic

The chi-squared statistic can be used as a test statistic.

\[ X^2 \;\;=\;\; \sum_{i=1}^k {\frac{\left(O_i - E_i\right)^2}{E_i}} \]

since

P-value and conclusion

The p-value is the probability that the test statistic, \(X^2\), is as large as was recorded from the actual data, \(x^2\),

\[ \text{p-value} \;\;=\;\; P(X^2 \ge x^2) \]

when H0 is true. This can be found from the upper tail of the \(\ChiSqrDistn(k \text{ df})\) distribution.

Example

The following table describes the number of heart attacks in a city in 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 occurred at random with a rate of \(\lambda = 10\) per week.

(Solved in full version)