EN FR

REG-4: Solutions — Chi-Square Test of Independence

Module 5 · Regression & Association

How to use this page: Try each problem in the lesson before checking solutions here. If your answer doesn't match, read the solution carefully — especially the part that explains why common wrong answers are wrong. Understanding the error matters more than getting the right answer the first time.

← Back to Lesson REG-4

Section 4: Worked Examples Solutions

Example 1 — Fully Worked 2×2 Test

The complete five-step solution is presented directly in the lesson.

Example 2 — Partially Scaffolded (Age/Vaccination)

E values: 55.0, 45.0, 55.0, 45.0 (all ≥ 5); . ; since , reject () — age group and vaccine uptake are not independent. (small effect).

Example 3 — Cramér’s V

; (medium effect).

Example 4 — Find the Error (Conditions Violated)

Error 1: and — two cells violate the expected-frequency condition; the χ² approximation is unreliable. Error 2: “variables appear independent” after failing to reject — correct is “insufficient evidence to conclude non-independence.”

Section 5: Guided Practice Solutions

Problem 1 — Expected Frequencies

Each .

  • Variant 0 (Smoking/Exercise): (a) ; (b) .
  • Variant 1 (Age/Vaccination): (a) ; (b) .
  • Variant 2 (Education/Newspaper): (a) ; (b) .
  • Variant 3 (Stress/Sleep): (a) ; (b) .
  • Variant 4 (Diet/BMI): (a) ; (b) .

Problem 2 — Conditions and df

VariantMin EConditionsdf
0 (Smoking/Exercise, 2×2)20.0Yes — all E ≥ 51
1 (violated, 2×2)2.0No — 1
2 (Gender/Transport, 2×3)12.5Yes2
3 (violated, 2×3)4.2No — 2
4 (3×2 table)15.0Yes2

Problem 3 — Reading the Chi-Square Table

(a) . (b) . (c) → reject .

Problem 4 — Full Five-Step Test (Generator)

The generator’s “Show Solution” displays all E values, the χ² computation, and the decision.

Section 6: Independent Practice Solutions

Problem 1 — Full Analysis Chain

  • Variant 0 (Smoking/Exercise): , → reject (). (small).
  • Variant 1 (Age/Vaccination): , → reject . (small).
  • Variant 2 (Education/Newspaper): , → fail to reject ().
  • Variant 3 (Stress/Sleep): , → reject . (small–medium).
  • Variant 4 (Commute/Satisfaction): , → fail to reject.

Problem 2 — Full 2×3 Test with Cramér’s V (Generator)

Generator solutions cover variants V6–V9 (, , , respectively).

Problem 3 — Find the Error

VariantErrorCorrect approach
0 (Wrong df)Used for a 2×3 table
1 (O vs. E)Divided by O instead of EDenominator must be E (the reference under )
2 (Fail = independent)“Variables are independent” after failing to reject”Insufficient evidence to conclude non-independence”
3 (Causation)“Ice cream causes drowning” from a significant χ²Lurking variable (summer heat) drives both; χ² shows association only
4 (Conditions violated)Ran the test with Combine categories or use an exact test; the p-value is unreliable

Problem 4 — Cramér’s V (Generator)

with . For all W0–W6 pairs, .

Problem 5 — Physical Activity vs. Stress (Synthesis)

(a) : physical activity and stress level are independent; : not independent.

(b) Expected frequencies (all ≥ 5 ✓):

NoneModerateVigorous
Low stress21.53826.92321.538
High stress18.46223.07718.462

(c) .

(d) ; ; since → reject ().

(e) (small effect — statistically real but weak).

(f) Error 1: χ² shows association, not causation — mandating exercise may not reduce stress. Error 2: is small; even if causal, the effect is modest and unlikely to justify a blanket policy.

Section 7: Mastery Check Solutions

Problem 1 — Feynman Prompt

A significant p-value means the association is unlikely to be chance in the sample — not that it is strong. With large n, even trivially weak associations become significant. Compute Cramér’s V: if the association is negligible despite significance; if it is at least moderate.

Problem 2 — Apply (Study Location / Year of Study)

(a) → reject . (b) Sufficient evidence at that preferred study location and year of study are not independent in the population.

Problem 3 — Analyze the Error

“Pet owners are just as happy as non-pet-owners” confuses failing to reject with proving independence. Correct: “insufficient evidence to conclude that pet ownership and happiness are not independent.”

Section 8: Boss Fight Solutions

Path A — The Analyst (Caffeine/Sleep)

Expected frequencies all ≥ 5 (E = 22.5, 20.0, 17.5); . ; since → reject (). (medium effect). The research summary should use correct language (no causation, report V, state the decision).

Path B — The Communicator

  • Report 1: correct — proper language, V reported, no causation claim.
  • Report 2: error — “confirms independence.” Correct: “insufficient evidence to conclude non-independence.”
  • Report 3: error — causation from association; the lurking variable (heat) drives both. State association with appropriate hedging about confounders.

Section 9: Challenge Problem Solutions

Challenge 1 — Sample Size Effect

Decision
1004.167Reject 0.204
2008.333Reject 0.204
40016.667Reject 0.204
80033.333Reject 0.204

scales with while stays constant. With large , even trivial associations become highly significant — always report alongside .

Challenge 2 — 3×3 Table

All ; . ; → reject strongly. , — small-to-medium despite the very significant p-value.

Challenge 3 — Simpson’s Paradox

(a) Overall: A = 78% vs. B = 73% — A looks better. (b) Mild cases: both 90% (tied). (c) Severe cases: A = 30%, B = 56% — B is better. (d) A was assigned mostly mild cases (80/100), which recover more easily; disease severity is the lurking variable. (e) Recommending A from combined data ignores the confounding — B is at least as good for mild cases and clearly better for severe ones. (f) Simpson’s Paradox: a combined-table association can mask or reverse stratum-specific patterns; always stratify by potential confounders first.

← Return to Lesson REG-4