Lesson 20 of 23 · All lessons in this module
- The central limit theorem
- The standard error of the sample meanVideo lesson
- Confidence intervals for the mean
- Value at risk: a one-sided confidence interval
- Populations, samples and sampling error
- Stratified and cluster sampling
- Good estimators, and the CLT across sampling designs
- Convenience and judgmental sampling, and choosing a method
- The four steps and stating the hypotheses
- Type I and Type II errors, significance and powerVideo lesson
- Critical values, p-values and the decision ruleVideo lesson
- p-values and p-hacking
- Testing a single mean
- Two means: independent vs paired samplesVideo lesson
- Testing variances: chi-square and FVideo lesson
- The t-test for a Pearson correlation
- Sample size, p-values and many correlations at once
- Parametric vs nonparametric tests
- The Spearman rank correlation testVideo lesson
- Contingency tables and the chi-square test of independenceVideo lesson
- Interpreting the result: standardized residuals and mosaics
- Choosing the test: four steps and a map of every test
- Integrated cases: testing whether a new strategy beats the old one
This lesson is part of the 2027 curriculum. You are following the 2026 curriculum, where it is not taught in this form. Switch if you are sitting the exam under the 2027 curriculum.
Lesson 20 of 23 · 14 min
Contingency tables and the chi-square test of independence
For categorical data, compare the count in each cell with the count you would expect if the two classifications had nothing to do with each other.
In short
- A contingency table (two-way table) counts observations classified by two categorical variables.
- : the classifications are independent (not related); : they are not independent (related).
- Expected frequency: = (row i total × column j total) / overall total.
- over all m = r × c cells, with (r − 1)(c − 1) degrees of freedom.
- The test is non-parametric and right-tailed: squared gaps make , so only large values reject.
Unlock this lesson free for 7 days
Create a free account to get 7 days free: every lesson, video and flashcard, and the question bank. No card needed.