Test goodness of fit or independence between categorical variables.
Last updated: March 2026
| df | α = 0.10 | α = 0.05 | α = 0.01 | α = 0.001 |
|---|---|---|---|---|
| 1 | 2.71 | 3.84 | 6.64 | 10.83 |
| 2 | 4.61 | 5.99 | 9.21 | 13.82 |
| 3 | 6.25 | 7.82 | 11.35 | 16.27 |
| 4 | 7.78 | 9.49 | 13.28 | 18.47 |
| 5 | 9.24 | 11.07 | 15.09 | 20.52 |
The Chi-Square test is a statistical hypothesis test used to determine whether there is a significant association between categorical variables. It compares observed frequencies with expected frequencies under a null hypothesis of independence or goodness of fit.
The Chi-Square test has two main varieties: the Goodness of Fit test, which determines whether sample data follows an expected distribution, and the Test of Independence, which examines whether two categorical variables are independent of each other in a population.
The Chi-Square statistic (χ²) measures the discrepancy between observed and expected frequencies. A large χ² value suggests the variables are related or the data does not fit the expected distribution. The p-value indicates the probability of observing such a discrepancy by chance alone if the null hypothesis were true.
A fair die is rolled 60 times. Are the results consistent with a fair die?
Use Chi-Square when testing hypotheses involving categorical data (e.g., colors, yes/no, categories). If your data is continuous (e.g., height, weight), use other tests like t-tests or ANOVA.
Conventionally, p < 0.05 is considered statistically significant, suggesting the null hypothesis should be rejected. However, the threshold depends on your field and context.
If any expected frequency is less than 5, the Chi-Square test may be unreliable. Consider combining categories or using Fisher's Exact Test for 2×2 tables.
Goodness of Fit tests one categorical variable against a theoretical distribution. Independence tests the relationship between two categorical variables in a cross-tabulation.
A high χ² value indicates a large discrepancy between observed and expected frequencies, suggesting either the variables are related (independence) or data doesn't fit the theoretical distribution (goodness of fit).
For goodness of fit: df = k - 1 (number of categories - 1). For independence: df = (r - 1)(c - 1), reflecting how many values can vary freely given the constraints.
Related Tools