Skip to main content

Chi-square test of independence: 2×2 procedure

Short answer

State H₀: independence. Compute expected frequencies E = (row total × column total)/N. Compute χ² = Σ(O−E)²/E or N(ad−bc)²/[(a+b)(c+d)(a+c)(b+d)] with df=1. If any E<5, apply Yates' correction. Compare to critical χ² (e.g., 3.841 at 5%). Reject H₀ if calculated > critical.

Describe the Hypothesis testing procedure of Chi-square test of independence for 2×2 table.

The chi-square test of independence checks whether two attributes (say A and B, each with two categories) are independent, using the frequencies in a 2 × 2 contingency table.

          B1     B2     Total
A1        a      b      a+b
A2        c      d      c+d
Total     a+c    b+d    N

Procedure

  1. Hypotheses. H0: attributes A and B are independent (no association). H1: A and B are not independent (associated).
  2. Level of significance α, for example 0.05.
  3. Expected frequencies. E = (row total × column total)/N for each cell, e.g. E₁₁ = (a+b)(a+c)/N.
  4. Test statistic.
χ² = Σ (O − E)²/E

For a 2 × 2 table this also equals N(ad − bc)²/[(a+b)(c+d)(a+c)(b+d)]. With a small expected frequency (< 5), Yates' correction is applied: replace |O − E| by |O − E| − 0.5. 5. Degrees of freedom = (r − 1)(c − 1) = (2 − 1)(2 − 1) = 1. 6. Critical value χ²(α; 1) from the table: 3.841 at 5%, 6.635 at 1%. 7. Decision. If calculated χ² > critical value, reject H0 (the attributes are associated). Otherwise do not reject H0 (independent). 8. Conclusion in the words of the problem.

✓ Answer checked by Claude Sonnet 5.5

All Probability and Statistics chapter 7 questions →