Lesson 5 of 6 · All lessons in this module
- Parametric vs non-parametric tests, and correlation hypotheses
- The t-test for a Pearson correlation
- Sample size, p-values and many correlations at once
- The Spearman rank correlation testVideo lesson
- Contingency tables and the chi-square test of independenceVideo lesson
- Interpreting the result: standardized residuals and mosaics
Lesson 5 of 6 · 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.