AS & A Level · Practice questions · Chi-squared goodness of fit

Expected, observed, decided.

Six original Cambridge-style questions on the chi-squared goodness of fit test: expected frequencies for uniform, ratio, geometric, Poisson and continuous models, combining classes, degrees of freedom and conclusions in context.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
The method

Hypotheses, expected, combine, compare.

01
Recall
[4 marks]

A shop records the number of returned items on each weekday over several weeks: Monday 32, Tuesday 25, Wednesday 18, Thursday 27, Friday 23. Test at the 5% level whether returns are equally likely on each weekday.

  • \(\text{H}_0\): returns are equally likely on each day; \(\text{H}_1\): they are not. \(N = 125\), so \(E = 25\) each. ✓
  • \(\chi^{2} = \dfrac{49 + 0 + 49 + 4 + 4}{25} = \dfrac{106}{25} = 4.24\). ✓
  • \(\nu = 5 - 1 = 4\); 5% critical value 9.488. ✓
  • \(4.24 < 9.488\): insufficient evidence at the 5% level that returns are not equally likely on each weekday. ✓
02
Analysis
[3 marks]

A Poisson distribution, with \(\lambda = 1.9\) estimated from the sample mean, is fitted to 60 observations. The expected frequencies for 0, 1, 2, 3, 4 and '5 or more' are 8.97, 17.05, 16.20, 10.26, 4.87 and 2.64.

(a) Explain which classes must be combined. (b) State the degrees of freedom and the 5% critical value. (c) State how (b) would change if \(\lambda = 1.9\) had been given in the hypothesis.

  • (a) 4.87 and 2.64 are below 5; combining '4' and '5 or more' gives \(E = 7.51\), and every class then has \(E \ge 5\). ✓
  • (b) \(k = 5\) classes and one estimated parameter: \(\nu = 5 - 1 - 1 = 3\), critical value 7.815. ✓
  • (c) With \(\lambda\) given, nothing is estimated: \(\nu = 5 - 1 = 4\), critical value 9.488. ✓
03
Calculation
[4 marks]

A genetic theory predicts that three flower colours occur in the ratio \(1 : 2 : 1\). In a sample of 200 plants the colours occur 38, 112 and 50 times. Test the theory at the 5% level.

  • \(\text{H}_0\): the colours occur in the ratio \(1 : 2 : 1\); \(\text{H}_1\): they do not. \(E = 50, 100, 50\). ✓
  • \(\chi^{2} = \dfrac{144}{50} + \dfrac{144}{100} + 0 = 2.88 + 1.44 = 4.32\). ✓
  • \(\nu = 3 - 1 = 2\); 5% critical value 5.991. ✓
  • \(4.32 < 5.991\): insufficient evidence at the 5% level that the colours do not follow the ratio \(1 : 2 : 1\). ✓
04
Calculation
[5 marks]

A player claims that the number of attempts \(X\) she needs to hit a target follows \(\text{Geo}\left(\frac{1}{3}\right)\). In 108 trials the first hit came on attempt 1, 2, 3 or later in 30, 22, 20 and 36 trials. Test the claim at the 5% level.

  • \(\text{H}_0\): \(X \sim \text{Geo}\left(\frac{1}{3}\right)\); \(\text{H}_1\): it does not. ✓
  • \(P(X = 1) = \frac{1}{3}\), \(P(X = 2) = \frac{2}{9}\), \(P(X = 3) = \frac{4}{27}\), \(P(X \ge 4) = \left(\frac{2}{3}\right)^{3} = \frac{8}{27}\). ✓
  • \(E = 36, 24, 16, 32\), all at least 5. ✓
  • \(\chi^{2} = \dfrac{36}{36} + \dfrac{4}{24} + \dfrac{16}{16} + \dfrac{16}{32} = 1 + 0.167 + 1 + 0.5 = 2.667\). ✓
  • \(\nu = 4 - 1 = 3\), critical value 7.815. \(2.667 < 7.815\): insufficient evidence at the 5% level against the claim. ✓
05
Analysis
[6 marks]

The number of flaws on each of 100 glass sheets is counted: 0, 1, 2, 3, 4 and '5 or more' flaws occur on 8, 22, 30, 20, 12 and 8 sheets.

(a) Test at the 10% level whether the number of flaws follows \(\text{Po}(2)\). (b) State the degrees of freedom you would use if the mean had instead been estimated from these data.

  • (a) \(\text{H}_0\): the number of flaws follows \(\text{Po}(2)\); \(\text{H}_1\): it does not. ✓
  • \(E = 100 \, P(X = x)\): 13.53, 27.07, 27.07, 18.04, 9.02 and, for '5 or more', 5.27; all at least 5, so no combining. ✓
  • \[\begin{aligned}\chi^{2} &= 2.263 + 0.949 + 0.318 \\ &\quad + 0.212 + 0.983 + 1.420 = 6.144\end{aligned}\] ✓
  • \(\nu = 6 - 1 = 5\); 10% critical value 9.236. \(6.144 < 9.236\): insufficient evidence at the 10% level that \(\text{Po}(2)\) is not a suitable model. ✓
  • (b) One parameter estimated: \(\nu = 6 - 1 - 1 = 4\). ✓
06
Analysis
[6 marks]

The waiting time \(T\) minutes at a bus stop is modelled by the pdf \(f(t) = \dfrac{2(3 - t)}{9}\) for \(0 \le t \le 3\). For 90 waits, 42 were under 1 minute, 34 were from 1 to 2 minutes and 14 were from 2 to 3 minutes.

(a) Show that the expected frequencies are 50, 30 and 10. (b) Test at the 5% level whether the model fits. (c) Which class contributes most to \(\chi^{2}\), and what does it suggest?

  • (a) \(P(a \le T \le b) = \displaystyle\int_{a}^{b} \frac{2(3 - t)}{9}\,dt\) gives \(\frac{5}{9}, \frac{3}{9}, \frac{1}{9}\); times 90: 50, 30, 10. ✓
  • (b) \(\text{H}_0\): the model fits; \(\text{H}_1\): it does not. ✓
  • \(\chi^{2} = \dfrac{64}{50} + \dfrac{16}{30} + \dfrac{16}{10} = 1.28 + 0.533 + 1.6 = 3.413\). ✓
  • \(\nu = 3 - 1 = 2\), critical value 5.991; \(3.413 < 5.991\): insufficient evidence at the 5% level that the model does not fit. ✓
  • (c) The 2 to 3 minute class gives 1.6: there were more long waits (14) than the model expects (10), though not enough to be significant. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.