📊 Statistics
Chi-square = sum of (Observed minus Expected) squared divided by Expected. Always right-tailed.
Chi-Square Tests — All expected counts must be at least 5. Larger chi-square means stronger evidence against the null.
1
The chi-square formula
χ² = Σ[(Observed − Expected)² / Expected] — summed across every category or cell in the data. Larger discrepancies between observed and expected counts produce a larger chi-square value.
2
Goodness of Fit test
Tests whether observed categorical counts match a claimed distribution. Degrees of freedom = (number of categories) − 1.
3
Test for Independence
Tests whether there's an association between two categorical variables, using a two-way table. Degrees of freedom = (rows − 1) × (columns − 1). Expected count for each cell = (row total × column total) / grand total.
4
Conditions and directionality
All expected counts must be at least 5 for the test to be valid. Chi-square tests are always right-tailed (a larger chi-square value always indicates stronger evidence against the null hypothesis, never a smaller one).
1
A two-way table examines whether political party preference is associated with a specific policy opinion. This calls for a Chi-Square Test for Independence.
2
Calculate the expected count for each cell: (row total × column total) / grand total, for every cell in the table.
3
Compute χ² = Σ[(Observed − Expected)² / Expected] across all cells, then determine degrees of freedom: (rows−1)×(columns−1).
4
Compare the calculated χ² to a critical value (or find the corresponding p-value) — since chi-square tests are always right-tailed, a sufficiently large χ² value provides evidence of an association between the two categorical variables, leading to rejecting the null hypothesis of no association.

Exams test whether you can distinguish a Goodness of Fit test from a Test for Independence, correctly calculate expected counts and degrees of freedom for each, and understand that chi-square tests are always right-tailed.

The most common trap is forgetting to check that all expected counts are at least 5 before proceeding — this is a required condition for the chi-square test to be valid, similar to sample size conditions for other inference procedures.

1. What is the chi-square formula?
χ² = Σ[(Observed − Expected)² / Expected].
Tap to reveal / hide
2. What does a Goodness of Fit test check?
Whether observed categorical counts match a claimed distribution.
Tap to reveal / hide
3. What does a Test for Independence check?
Whether there is an association between two categorical variables.
Tap to reveal / hide
4. What is the degrees of freedom formula for a Test for Independence?
(rows − 1) × (columns − 1).
Tap to reveal / hide
5. What condition must be checked regarding expected counts before running a chi-square test?
All expected counts must be at least 5.
Tap to reveal / hide