Setting up chi-square tests for homogeneity and independence
Choose the test from the study design, state hypotheses in context, and check conditions.
It opens on
A samples three age groups separately; B records grade and sleep for one random sample of 400 students. Same question?
Why it matters
The same table arithmetic can serve two different questions; the data collection determines which test to name.
Good to know first
- Expected count = row total × column total ÷ grand total
- a categorical variable records a category
Step by step
Two designs
Distinguish the tests by how people entered the study and what was recorded.
A’s TikTok counts are 80/150, 40/150, and 20/150 across its samples: choose homogeneity.
A common mix-up
Table rows determine the test name.
In fact: A has separate samples; B has one sample with two measurements.
Hypotheses
Write non-directional null and alternative hypotheses for both designs.
A’s H₀: favourite-platform distribution is the same for teens, young adults, and adults.
A common mix-up
Hₐ predicts which group has more.
In fact: These chi-square alternatives state a difference or association, not its direction.
Conditions
Check randomisation, the sampling-only 10% condition, and every expected count.
A’s independent samples each contain 150; each age population has ≥ 1,500, so 150 ≤ 1,500/10.
A common mix-up
Every chi-square study needs a 10% check.
In fact: It applies to sampling without replacement, not random assignment.
Distance from expected
Interpret a chi-square cell contribution and the statistic’s nonnegative, right-skewed scale.
A’s teen–TikTok cell has O = 80 and E = 150 × 140/450 = 46⅔.
A common mix-up
A count below expected contributes a negative amount.
In fact: Squaring makes its contribution nonnegative.
Try it
One random sample of 300 voters records party and bill opinion. Which test?Answer
Independence (hint: one sample, two variables).
State A’s Hₐ.Answer
Platform distributions are not all the same across the three age groups (hint: compare distributions).
B samples 400 without replacement from 4,500 students; four row totals are 100, two column totals 200. Check conditions.Answer
Random sample; 400 ≤ 450; all E = 50 ≥ 5 (hint: design, 10%, then E).
A’s adult–TikTok cell has O = 20 and E = 46⅔. Find its contribution.Answer
320/21 ≈ 15.24 (hint: square the gap first).
Same question?Answer
No: A compares platform distributions; B asks whether grade and sleep go together.
Setting up chi-square tests for homogeneity and independence
30 minutes every month. No card.
