Skip to main content

Chi-square: opinion change before election

Short answer

Chi-square test of homogeneity: χ² = 3.457, df = 2. Critical value at 0.05 is 5.991. Since 3.457 < 5.991, fail to reject H₀. No significant change in opinion distribution between the two polls; differences are due to sampling variability.

The results of polls conducted two weeks and four weeks before an election are shown in the following table:

Two weeks before electionFour weeks before election
For republican candidate7991
For democratic candidate8466
Undecided3743
Use the 0.05 level of significance to test whether there has been change in opinion during the 2 weeks between the polls.

A chi-square test of homogeneity (equivalently independence) is used: the opinion distribution is compared across the two polls (3 × 2 table, N = 400).

  1. H0: the distribution of opinion is the same in both polls (no change in opinion). H1: the distribution of opinion differs between the polls (there has been a change).
  2. Level of significance: α = 0.05
  3. Test statistic: χ² = Σ (O − E)²/E, where E = (row total × column total)/grand total.

Observed frequencies with totals:

                  2 wk    4 wk   Total
Republican          79      91     170
Democratic          84      66     150
Undecided           37      43      80
Total              200     200     400

Expected frequencies:

                  2 wk    4 wk   
Republican       85.00   85.00
Democratic       75.00   75.00
Undecided        40.00   40.00

Terms (O − E)²/E:

                  2 wk    4 wk   
Republican       0.424   0.424
Democratic       1.080   1.080
Undecided        0.225   0.225

χ² = Σ (O − E)²/E = 3.457

  1. Degrees of freedom = (r − 1)(c − 1) = (3 − 1)(2 − 1) = 2. Critical value: χ²(0.05; 2) = 5.991. Reject H0 if χ² > 5.991.
  2. Decision: calculated χ² < tabulated χ² (3.457 < 5.991, p-value = 0.1775), so fail to reject H0.

Conclusion: there is no significant change in opinion between the two polls; the difference is due to sampling variation.

✓ Answer checked by Claude Sonnet 5.5

All Probability and Statistics chapter 7 questions →