AS & A Level · Practice questions · Contingency tables and independence

Count, compare, conclude.

Six original Cambridge-style questions on chi-squared tests for independence: expected frequencies, degrees of freedom, combining rows or columns, 2 x 2 tables without Yates' correction and commenting on the contributions.

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

Totals first, then \(E\), then \(X^{2}\).

01
Recall
[4 marks]

200 shoppers are classified by age and by how they paid.

CashCardPhoneTotal
Under 40164460120
40 and over34262080
Total507080200

(a) State suitable hypotheses for a test of independence. (b) Find the expected frequency for '40 and over, cash'. (c) State the number of degrees of freedom and the critical value for a test at the 5% level.

  • (a) H0: payment method and age group are independent. H1: payment method and age group are not independent. ✓
  • (b) \(E = \dfrac{80 \times 50}{200} = 20\). ✓
  • (c) \(\nu = (2 - 1)(3 - 1) = 2\); the 5% critical value of \(\chi^{2}_{2}\) is 5.991. ✓
02
Calculation
[6 marks]

90 adults were asked whether they used a phone in bed in the hour before sleeping and whether they woke feeling rested.

RestedNot restedTotal
Phone in bed143145
No phone281745
Total424890

Test, at the 1% significance level, whether feeling rested is independent of phone use in bed.

  • H0: feeling rested and phone use in bed are independent. H1: they are not independent. ✓
  • \(E\): rested \(\frac{45 \times 42}{90} = 21\), not rested \(\frac{45 \times 48}{90} = 24\), in both rows. All at least 5. ✓
  • Every \(|O - E| = 7\): \[ X^{2} = 49 \left( \frac{2}{21} + \frac{2}{24} \right) = 4.667 + 4.083 = 8.75 \] ✓
  • \(\nu = 1\); the 1% critical value of \(\chi^{2}_{1}\) is 6.635. ✓
  • \(8.75 > 6.635\), so reject H0. ✓
  • There is sufficient evidence at the 1% level of an association between phone use in bed and feeling rested; fewer phone users felt rested (14) than expected (21). ✓
03
Calculation
[6 marks]

The lunch choices of a sample of Year 10 and Year 11 students are shown.

School mealPacked lunchGoes homeTotal
Year 1022181050
Year 1118322070
Total405030120

Test, at the 5% significance level, whether lunch choice is independent of year group.

  • H0: lunch choice and year group are independent. H1: they are not independent. ✓
  • \(E\): Year 10: 16.67, 20.83, 12.5; Year 11: 23.33, 29.17, 17.5. All at least 5. ✓
  • \[ \begin{aligned} X^{2} &= 1.707 + 0.385 + 0.500 \\ &\quad + 1.219 + 0.275 + 0.357 = 4.443 \end{aligned} \] ✓
  • \(\nu = (2 - 1)(3 - 1) = 2\); the 5% critical value is 5.991. ✓
  • \(4.443 < 5.991\), so do not reject H0. ✓
  • There is insufficient evidence at the 5% level of an association between lunch choice and year group. ✓
04
Analysis
[8 marks]

160 cinema-goers were asked which genre of film they prefer.

AgeActionComedyDramaTotal
16-2528121050
26-4018161650
41-6010142448
Over 6026412
Total584854160

(a) Explain why the table must be modified before a chi-squared test, and modify it suitably. (b) Test, at the 5% level, whether preferred genre is independent of age. (c) Comment on the two largest contributions.

  • (a) The 'Over 60' expected frequencies are \(\frac{12 \times 58}{160} = 4.35\), 3.6 and 4.05, all below 5. Combine 'Over 60' with the adjacent '41-60' row to give '41 and over': 12, 20, 28 (total 60). ✓
  • (b) H0: genre preference and age are independent. H1: they are not independent. ✓
  • \(E\): 16-25 and 26-40 rows: 18.125, 15, 16.875; 41 and over: 21.75, 18, 20.25. ✓
  • \[ \begin{aligned} X^{2} &= 5.380 + 0.600 + 2.801 \\ &\quad + 0.001 + 0.067 + 0.045 \\ &\quad + 4.371 + 0.222 + 2.966 = 16.45 \end{aligned} \] ✓
  • \(\nu = (3 - 1)(3 - 1) = 4\); the 5% critical value is 9.488. \(16.45 > 9.488\), so reject H0: there is sufficient evidence at the 5% level of an association between age and preferred genre. ✓
  • (c) '16-25, Action' (5.380): 28 observed against 18.125 expected, so young adults prefer action films more than independence predicts. '41 and over, Action' (4.371): 12 against 21.75, so older adults choose action films less often. ✓
05
Analysis
[7 marks]

Residents of two areas of a town were asked their opinion of a new bus route.

In favourNo opinionAgainstTotal
North30251570
South20353590
Total506050160

(a) Test, at the 1% significance level, whether opinion is independent of area. (b) Which column contributes least to \(X^{2}\)? What does this tell you?

  • (a) H0: opinion and area are independent. H1: they are not independent. ✓
  • \(E\): North 21.875, 26.25, 21.875; South 28.125, 33.75, 28.125. All at least 5. ✓
  • \[ \begin{aligned} X^{2} &= 3.018 + 0.060 + 2.161 \\ &\quad + 2.347 + 0.046 + 1.681 = 9.312 \end{aligned} \] ✓
  • \(\nu = 2\); the 1% critical value of \(\chi^{2}_{2}\) is 9.210. \(9.312 > 9.210\), so reject H0. ✓
  • There is sufficient evidence at the 1% level of an association between area and opinion: North residents are more in favour (30 against 21.875) and less against (15 against 21.875) than expected. ✓
  • (b) 'No opinion' (0.060 and 0.046): the proportion with no opinion is about the same in both areas; the association lies entirely in the for and against split. ✓
06
Analysis
[7 marks]

Plants were grown with fertiliser A or fertiliser B and their condition after six weeks recorded.

HealthyWiltedDiedTotal
A3610248
B2218444
Total5828692

(a) Show that two columns must be combined, and explain which two. (b) Test, at the 5% level, whether condition is independent of fertiliser.

  • (a) 'Died' expected frequencies: \(\frac{48 \times 6}{92} = 3.13\) and \(\frac{44 \times 6}{92} = 2.87\), both below 5. ✓
  • Combine 'Died' with the adjacent 'Wilted' column to make 'Not healthy' (A 12, B 22, total 34). Combining 'Healthy' with 'Wilted' would leave the 'Died' cells still below 5. ✓
  • (b) H0: condition and fertiliser are independent. H1: they are not independent. ✓
  • \(E\): A 30.26, 17.74; B 27.74, 16.26. Every \(|O - E| = 5.739\): \[ X^{2} = 1.089 + 1.857 + 1.187 + 2.026 = 6.158 \] ✓
  • The table is now 2 x 2, so \(\nu = 1\); the 5% critical value is 3.841. \(6.158 > 3.841\), so reject H0. ✓
  • There is sufficient evidence at the 5% level of an association between fertiliser and condition; fewer plants given A were not healthy (12) than expected (17.74). ✓

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.