Try each one on paper first, then check a single step. That is worth far more than reading a finished solution.
Example 1 — testing for equal proportions
A die is rolled 120 times giving 15, 23, 18, 22, 17, 25. Test at the 5% level whether the die is fair.
- 1H0: the die is fair; H1: the die is not fairState both in context.
- 2E=6120=20 for each face, and ∑E=120=∑O ✓Always check the totals match.
- 3χ2=20(−5)2+32+(−2)2+22+(−3)2+52=2076A common denominator here, since all E are equal.
- 4χ2=3.80, with ν=6−1=5Nothing was estimated from the data.
- 5χ0.05,52=11.070 and 3.80<11.070
- 6Do not reject H0: no evidence at the 5% level that the die is biased.Not a proof that it is fair.
Example 2 — testing a stated ratio
A theory predicts phenotypes in the ratio 9:3:3:1. Of 320 plants, 168, 64, 68 and 20 are observed. Test the theory at 5%.
- 1H0: the phenotypes occur in the ratio 9:3:3:1
- 2The ratio totals 16 parts, so E=169(320), 163(320), 163(320), 161(320)
- 3E=180, 60, 60, 20 and ∑E=320 ✓
- 4χ2=180144+6016+6064+200=2.13A zero contribution is fine — that class fits exactly.
- 5ν=4−1=3; χ0.05,32=7.815The ratio was given, not estimated.
- 62.13<7.815: the data are consistent with the theory.
Example 3 — fitting a Poisson distribution
Accidents per week over 100 weeks were 26, 28, 24, 14 and 8 for 0,1,2,3,≥4. Test the fit of a Poisson model at 5%.
- 1Total accidents =0(26)+1(28)+2(24)+3(14)+4(8)=150The last class is taken at 4 for this estimate.
- 2λ^=100150=1.5Estimated from the data — this will cost a degree of freedom.
- 3P(0),…,P(3)=0.2231, 0.3347, 0.2510, 0.1255; P(≥4)=1−their sum=0.0656The tail class absorbs the remainder.
- 4E=22.31, 33.47, 25.10, 12.55, 6.56 — all at least 5, so no pooling is needed∑E=100 ✓
- 5χ2=0.609+0.894+0.048+0.167+0.314=2.03
- 6ν=5−1−1=3 and χ0.05,32=7.815One subtracted for the total, one for λ^.
- 72.03<7.815: the Poisson model fits the data.