Test of Independence 2×2 Problems

Problem 1: Test of Independence

The following table shows the relationship between Gender and Preference for Online Shopping.

Prefer Online Shopping Do Not Prefer Total
Male 40 20 60
Female 30 10 40
Total 70 30 100

Test whether gender and preference for online shopping are independent at 5% level of significance.

Step 1: State the Hypotheses

Null Hypothesis (H₀): Gender and preference for online shopping are independent.

Alternative Hypothesis (H₁): Gender and preference for online shopping are not independent.

Step 2: Calculate Expected Frequencies

Expected Frequency (E) = (Row Total × Column Total) / Grand Total

  • E₁₁ = (60 × 70) / 100 = 42
  • E₁₂ = (60 × 30) / 100 = 18
  • E₂₁ = (40 × 70) / 100 = 28
  • E₂₂ = (40 × 30) / 100 = 12

Step 3: Prepare Chi-square Table

Cell O E (O−E) (O−E)²/E
1 40 42 −2 0.095
2 20 18 2 0.222
3 30 28 2 0.143
4 10 12 −2 0.333

χ² = 0.095 + 0.222 + 0.143 + 0.333 = 0.793

Step 4: Degrees of Freedom

df = (r − 1)(c − 1)
df = (2 − 1)(2 − 1) = 1

Step 5: Table Value

At 5% level of significance and 1 df,
χ² (table) = 3.84

Step 6: Decision

Calculated χ² = 0.793
Table χ² = 3.84

Since calculated χ² < table χ², accept H₀.

Problem 2: Test of Independence

A survey examined the relationship between Advertisement Exposure and Purchase Decision.

Purchased Not Purchased Total
Exposed 50 30 80
Not Exposed 20 40 60
Total 70 70 140

Test the independence at 5% level of significance.

Step 1: Hypotheses

H₀: Advertisement exposure and purchase decision are independent.
H₁: They are associated.

Step 2: Expected Frequencies

  • E₁₁ = (80 × 70) / 140 = 40
  • E₁₂ = (80 × 70) / 140 = 40
  • E₂₁ = (60 × 70) / 140 = 30
  • E₂₂ = (60 × 70) / 140 = 30

Step 3: Chi-square Calculation

Cell O E (O−E)²/E
1 50 40 2.5
2 30 40 2.5
3 20 30 3.33
4 40 30 3.33

χ² = 11.66

Step 4: Degrees of Freedom

df = (2 − 1)(2 − 1) = 1

Step 5: Table Value

χ² (0.05, 1 df) = 3.84

Step 6: Decision

Calculated χ² > Table χ²
Reject H₀

Important Exam Notes

  • Test of independence is applied only to qualitative data
  • Expected frequency should preferably be ≥ 5
  • Degrees of freedom for 2×2 table is always 1
  • Used in market research, consumer behavior, HR studies
error: Content is protected !!