Chi-Squared Tests for Independence in Contingency Tables | Edexcel A Level Further Maths notes
Free preview: Chi-Squared Tests for Independence in Contingency Tables
Is There an Association?
Watch: common mistake (1-minute fix)
Watch: 1-minute explainer
Year 1 (AS) for OCR B (MEI), where it is in the Statistics Minor (the AS content). Edexcel teaches it in Further Statistics 1. For AQA, Edexcel and OCR A, check your own specification for whether it is taught in Year 1 or Year 2.
So far our tests have been about means: numbers like heights and times. But lots of real questions are about categories. Does the choice of activity depend on age? Is voting linked to region? Are left-handed people more likely to be artists? We can't average "Music" and "Sport". We can only count. This note tests for a link using counts.
Let's start with a survey. 180 people in three age groups each choose their favourite activity:
| Observed | Music | Sport | Art | Total |
|---|---|---|---|---|
| Under 25 | 28 | 22 | 10 | 60 |
| 25 to 50 | 20 | 25 | 15 | 60 |
| Over 50 | 12 | 23 | 25 | 60 |
| Total | 60 | 70 | 50 | 180 |
- A table of counts like this is a contingency table. Each count is an observed frequency O.
- Question: does preference depend on age, or are the two independent?
- : age group and preference are independent (no association).
- : age group and preference are not independent (there is an association).
Expected frequencies
- If they were independent, each age group would split in the same proportions as the whole sample.
- 60 of the 180 people (one third) prefer music, so we'd expect a third of each age group, 20, to prefer music.
- These "if independent" counts are the expected frequencies E.

What the picture shows
- Each bar is one age group, split into Music, Sport and Art. The bottom bar is what independence predicts.
- The whole sample splits 60 : 70 : 50, so under every row of 60 should split as 20, 23.33 and 16.67.
- The observed rows split very differently, for example 28 of the under 25s chose Music.
- The test asks whether those differences are bigger than chance would give.
The formula for E
- For independent events, .
- Estimate and .
- Multiply them, then multiply by the grand total to turn a probability into a count.
- Music: . Sport: . Art: . The same for each row here, as every row total is 60.
- Check: the expected frequencies have the same row and column totals as the observed ones.
- Expected frequencies don't have to be whole numbers. Keep 2 d.p.
✏️ YOUR TURN 1
Try this first:
In a table with grand total 250, a row has total 90 and a column has total 120. Find the expected frequency for that cell under independence.
Answer:
- .
The Test Statistic and Degrees of Freedom
Now we need one number that measures how far the whole table is from independence.
- Each cell's contribution measures how far that count is from what independence predicts.
- Why square? So positive and negative gaps don't cancel. Why divide by E? A gap of 5 matters more when you expected 10 than when you expected 1000.
- Big total means a poor match, so we reject when is large. The test is always upper-tailed.
- The (chi-squared, "kye") distribution with degrees of freedom is the model for when is true.
- For an r × c table, : once the totals are fixed, only that many cells are free. (Fill in all but the last row and last column, and the totals force the rest.)
Unlock the full note: start 7 days free.
Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.
All notes in Chi-Squared Tests
- Chi-Squared Tests for Independence in Contingency Tables
- Chi-Squared Goodness of Fit for Uniform, Binomial and Poisson Models
- Goodness of Fit for Geometric and Continuous Models
Video
What's inside for this topic
3 teacher notes, 74 practice questions, 49 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Next note: Chi-Squared Goodness of Fit for Uniform, Binomial and Poisson Models
Chi-Squared Tests for Independence in Contingency Tables on other exam boards
All Edexcel A Level Further Maths topics · A Level Further Maths