All subjects · Mathematics · WST03 Statistics 3
Contingency tables
Edexcel IAL Mathematics · WST03 Statistics 3
A contingency table shows frequencies classified by two factors. The χ2 test asks whether the two factors are independent (not associated).
Hypotheses and expected frequencies
- H0: there is no association between the two factors (they are independent).
- H1: there is an association.
If H0 is true, E = (row total × column total) / grand total for each cell. For under-30s using a car: 80 × 80/160 = 40.
| Car | Bus | Cycle | Total | |
|---|---|---|---|---|
| Under 30 | 28 | 22 | 30 | 80 |
| 30 and over | 52 | 18 | 10 | 80 |
| Total | 80 | 40 | 40 | 160 |
How 160 commuters travel to work
Degrees of freedom
For a table with r rows and c columns: ν = (r - 1)(c - 1). Once the row and column totals are fixed, only (r - 1)(c - 1) cells can be filled freely.
Examiners report errors such as 3 - 1 or 9 - 1 for a 3 × 3 table, where the correct value is 2 × 2 = 4.
If any E < 5, combine rows or columns that make sense together, then recount r and c.
Example
Expected: 40, 20, 20 (under 30) and 40, 20, 20 (30 and over).
X2 = Σ(O - E)2/E = 17.6. ν = (2 - 1)(3 - 1) = 2; 5% critical value 5.991. 17.6 > 5.991, so reject H0: there is evidence of an association between age group and method of travel.
To comment on the association, compare O with E: under-30s cycle more than expected (30 against 20); people aged 30 and over use the car more than expected.
Worked example
A 3 × 4 contingency table has one column whose expected frequencies are all below 5; it is combined with a neighbouring column. Find ν.
- After combining there are 3 rows and 3 columns.
- ν = (3 - 1)(3 - 1)
Answer: ν = 4
Check yourself
- In the commuter table, find the expected frequency for people aged 30 and over who cycle.
Show answer
20. 80 × 40/160 = 20.
- Calculate X2 for the commuter table.
Show answer
17.6. Contributions: 3.6, 0.2, 5, 3.6, 0.2, 5; total 17.6.
- How many degrees of freedom are there for a 2 × 3 contingency table?
Show answer
2. (2 - 1)(3 - 1) = 2.
- How many degrees of freedom are there for a 3 × 4 contingency table with no cells combined?
Show answer
6. (3 - 1)(4 - 1) = 6.
- Find the 1% critical value of χ2 with 2 degrees of freedom. Give your answer to 3 decimal places.
Show answer
9.210. From the table: 9.210.
- X2 = 17.6 with ν = 2 at the 5% level (critical value 5.991). Which conclusion is correct?
- Reject H0: there is evidence of an association between age group and method of travel
- Do not reject H0: age and travel method are independent
- Reject H0: age causes people to cycle
- Do not reject H0, because X2 is less than 17.6
Show answer
Reject H0: there is evidence of an association between age group and method of travel. X2 exceeds the critical value; a χ2 test shows association, not causation.
- Which observation best describes the nature of the association in the commuter table?
- People aged 30 and over cycle more often than expected
- Under-30s use cars more often than expected
- People under 30 cycle more often than would be expected under independence
- Bus use is very different between the age groups
Show answer
People under 30 cycle more often than would be expected under independence. Under-30 cyclists: observed 30, expected 20, the biggest contribution.
- Which is a correct null hypothesis for a contingency table test?
- The two factors are associated
- All the observed frequencies are equal
- The expected frequencies are all at least 5
- There is no association between the two factors
Show answer
There is no association between the two factors. H0 is independence (no association).
Sources
- Pearson Edexcel International Advanced Level in Mathematics specification (issue 3), Unit S3
- Pearson Edexcel IAL Statistics S3 (WST03) examiners' report, June 2025
- Pearson Edexcel Mathematical Formulae and Statistical Tables
Last updated 8 November 2026. Spotted a mistake? Tell us.