Contingency tables and association
Big idea: A contingency table counts two categorical variables together.
We test whether variables are associated or independent.
Example: transport mode (bus/car/walk) vs punctuality (on-time/late).
| Concept | Meaning |
|---|---|
| Observed frequency | Actual count in each cell |
| Expected frequency | Count expected if variables are independent |
Free preview
This is the free notes preview
You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:
- FlashcardsLock in vocabulary and key terms with spaced repetition.
- Practice questionsAnswer exam-style questions and get instant AI marking.
- Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
- Personalised study planA daily plan built around your exam date and weak areas.
How to find expected frequencies
Worked example
Table has row total 40, column total 30, grand total 120.
Find expected frequency for that cell.
Step by step
- Write formula first
- Substitute and simplify
- E=10
Final answer
Expected frequency is 10.
Mark-saving habit: Show formula before substitution to secure method credit.
Practice with exam-style questions
Answer exam-style questions and get AI feedback that shows you exactly what examiners want to see in a full-marks response.
Chi-squared test statistic
In the exam: the GDC gives χ² and p: Put the observed counts (never the totals) in a matrix and run the χ²-Test. It shows χ², the p-value and the degrees of freedom.
The formula below shows what χ² measures: how far the observed counts are from the expected ones. You do not need it to answer.
Decision idea: Large chi-squared means observed counts differ from expected counts more than random chance would suggest.
Worked example
One cell has O=14, E=10.
Contribution to chi-squared?
Step by step
- Use formula for one cell
- Compute numerator: 16
- Contribution = 1.6
Final answer
This cell contributes 1.6 to total chi-squared.
Conditions and exam traps
Before you run the test
- Use the observed counts, not percentages and not the totals
- Every expected frequency is more than 5 (in the exam it always is)
- At most 4 rows or columns, so the degrees of freedom are small
- The critical value is given in the question when you need it
Exam tips
- State hypotheses in context.
- Use counts, not percentages.
- Write conclusion in words about association.
Feeling unprepared for exams?
Get a clear study plan, practice with real questions, and know exactly where you stand before exam day. No more guessing.
Two sentences, both variables: H₀: the two variables are INDEPENDENT (for example, favourite season is independent of age group).
H₁: the two variables are NOT independent.
See it drawn, step by step
In My Learning, handwritten diagrams build one step at a time. Play, pause and replay each explanation until it clicks. Create your free account to try it.
Degrees of freedom: df = (rows − 1) × (columns − 1), counting only the categories. The GDC also shows df after the test: use it as a check.
Small p, big χ²: reject H₀: Reject H₀ when p is SMALLER than the significance level, or when χ² is BIGGER than the critical value. Otherwise there is not enough evidence: do not reject H₀.
Animated graph
Watch the graph build step by step in study mode.
See it drawn, step by step
In My Learning, handwritten diagrams build one step at a time. Play, pause and replay each explanation until it clicks. Create your free account to try it.
Exam-style question — meal and rating [6 marks]
A café asks 300 customers which meal they ordered and how they rated it.
| Meal | Good | Fair | Poor |
|---|---|---|---|
| Breakfast | 45 | 30 | 25 |
| Lunch | 28 | 35 | 37 |
| Dinner | 17 | 25 | 38 |
A χ² test for independence is carried out at the 5 % significance level. The critical value is 9.488.
(a) Write down the null hypothesis. [1]
(b) Write down the number of degrees of freedom. [1]
(c) Find the χ² statistic. [2]
(d) State the conclusion of the test in context. Give a reason. [2]
Step by step
- (a) Both variables, the word independent. H₀: the meal ordered and the rating are independent.
- (b) 3 rows and 3 columns of counts.
- (c) The 3 × 3 table into a matrix, χ²-Test on the GDC.
- (d) Comparison first, then the decision in context.
Final answer
(a) H₀: the meal ordered and the rating are independent. (b) 4 (c) χ² = 15.4 (d) 15.4 > 9.488 (or p = 0.00391 < 0.05), so reject H₀: there is sufficient evidence that the meal ordered and the rating are not independent.
Memorize terms 3x faster
Smart flashcards show you cards right before you forget them. Perfect for definitions and key concepts.
One frame, four tests: Every test in this course has the same five steps: H₀ (nothing is going on), H₁, the significance level, one comparison, and a conclusion in context.
| Test | H₀ says | You compare |
|---|---|---|
| χ² for independence | the two variables are independent | p with the level, or χ² with the critical value |
| χ² goodness of fit | the data fit the stated distribution | p with the level, or χ² with the critical value |
| t-test | the two population means are equal | p with the level |
| Spearman's rₛ | there is no monotonic relationship | rₛ with the critical value |
Exam-style question — sprint and long jump [3 marks]
A coach believes that athletes who are faster at the 100 m also jump further in the long jump. For eight athletes, Spearman's rank correlation coefficient between sprint speed and jump length is 0.738. He tests at the 5 % level, and the critical value is 0.643.
(a) Write down the alternative hypothesis. [1]
(b) State the conclusion of the test, giving a reason. [2]
Step by step
- (a) His belief is "more goes with more": one-sided and positive.
- (b) Compare rₛ with the critical value, then decide.
Final answer
(a) H₁: there is a positive monotonic relationship between sprint speed and jump length. (b) 0.738 > 0.643, so reject H₀: there is sufficient evidence of a positive monotonic relationship between sprint speed and jump length.