Carrying out chi-square tests for homogeneity and independence
Calculate a chi-square statistic and p-value, then justify a contextual conclusion and choose the appropriate categorical test.
It opens on
The 30–49 group chose text 70 times. Is that convincing evidence platform distributions differ by age?
Why it matters
AP free-response answers must explain both the evidence and which cells contribute most to it.
Good to know first
- Setting up chi-square tests for homogeneity and independence: separate samples from groups mean homogeneity, one sample with two variables means independence
- state H₀ and Hₐ in context
- E = row total × column total ÷ grand total
Step by step
Build the statistic
Calculate expected counts and cell components, then combine them into χ².
For ages 30–49 choosing text, E = 150 × 155/450 = 155/3 ≈ 51.67; O = 70.
A common mix-up
The biggest raw gap must contribute most.
In fact: Each squared gap is divided by its expected count.
Judge the evidence
Find the right-tail p-value and make a qualified homogeneity conclusion.
Study A has df = (3 − 1)(3 − 1) = 4; with the row bars at 16.64, p = P(χ²₄ ≥ 16.64) ≈ 0.0023.
A common mix-up
A large p-value proves matching distributions.
In fact: Failing to reject means the data provide insufficient evidence of a difference.
Choose the test
Select a categorical procedure and transfer the conclusion to an independence design.
Study A’s three separately sampled groups and three platforms call for homogeneity χ², with df = 4.
A common mix-up
Significant association means age causes platform preference.
In fact: Observational data alone cannot establish causation.
Try it
Ages 13–17 choosing text: O = 40, E = 155/3. Find C.Answer
2.634 ≈ 2.63 (hint: square the gap, then divide by E).
If Study A’s p-value were 0.40 at α = 0.05, what could you conclude?Answer
Insufficient evidence distributions differ; not proof they match (hint: compare p with α).
One random sample of 400 from a school of ≥4,000 records grade 9–12 and three sleep categories. Given χ² = 14.96 and all expected counts 26.0–42.75, conclude at α = 0.05.Answer
Independence; df = 6; p ≈ 0.021; reject H₀; convincing evidence grade and sleep category are associated (hint: use (4 − 1)(3 − 1), then the right tail).
Change to 30–49 photo: O = 42, E = 140/3. Write its component.Answer
(42 − 140/3)²/(140/3) ≈ 0.467.
Change only α to 0.001; write the comparison and conclusion for the row bars’ 16.64.Answer
0.0023 > 0.001; fail to reject; insufficient evidence.
Carrying out chi-square tests for homogeneity and independence
30 minutes every month. No card.
