Chi-Square Test of Independence definition
A chi-square test of independence checks whether two categorical variables are associated in a population.
Chi-Square Test of Independence in a picture
How it works
Arrange observed counts in a two-way table. Under independence, a cell’s expected count is its row total times its column total divided by the grand total. Add (observed − expected)²/expected across cells. With independent observations and sufficiently large expected counts, use a chi-square reference with (rows − 1)(columns − 1) degrees of freedom.
Worked examples
A row totals 20 and a column totals 15 in a table of 60 observations. Find the expected count.
20 × 15/60 = 5.
Find the degrees of freedom for a 3 by 4 table.
(3 − 1)(4 − 1) = 6.
What does a small p-value suggest when the assumptions hold?
Evidence of an association between the variables. The test does not establish causation.
Common mistake
Use observed counts for the cell data and expected counts for the denominators. Check whether the chi-square approximation is suitable for sparse tables.
Quick check
How many degrees of freedom are in a 2 by 2 table?
Show answer
1.
What is the null hypothesis?
Show answer
The two categorical variables are independent.
Sources
Flashcard
Chi-Square Test of Independence
Reveal the definition
A chi-square test of independence checks whether two categorical variables are associated in a population.
Effortless Math. “Chi-Square Test of Independence.” Math Dictionary.



