Chi-square Test
Statistics & analysis
A test of association between categorical variables (test of independence) or of an observed distribution against an expected one (goodness of fit).
The chi-square test compares observed frequencies against the frequencies expected under a null hypothesis. Its two common forms are the goodness-of-fit test, which compares one categorical variable against an expected distribution, and the test of independence, which examines whether two categorical variables are associated in a contingency table.
It requires categorical data expressed as counts rather than percentages, independent observations, and adequate expected frequencies. The usual rule is that no expected cell count should fall below 5, with Fisher's exact test as the alternative for small two-by-two tables.
A significant chi-square establishes that an association exists but says nothing about its strength or direction. Report an effect size — phi for two-by-two tables, Cramer's V for larger ones — and inspect standardised residuals to identify which cells are driving the result. Present the contingency table alongside the statistic.
Where it's used
- Testing whether adoption of a practice differs by sector
- Checking sample representativeness against known population proportions
Software used
Guides that use this concept
All guidesNot sure where to start?
Book a free 15-minute consult. We'll map your next three steps — no obligation.