Glossary
Chi-Square Test
The chi-square test is a non-parametric statistical test used to assess whether there is a significant association between two categorical variables. It compares the observed frequencies in a contingency table against the frequencies that would be expected if the variables wer...
Definition
The chi-square test is a non-parametric statistical test used to assess whether there is a significant association between two categorical variables. It compares the observed frequencies in a contingency table against the frequencies that would be expected if the variables were independent.
Why It Matters
Many research questions involve categorical data — such as gender, treatment group, or survey response categories — where means and standard deviations are not meaningful. The chi-square test provides a rigorous way to evaluate relationships in these situations without assuming a normal distribution. It is essential in epidemiology, social science surveys, and market research.
Example
A public-health study examines whether smoking status (smoker vs. non-smoker) is associated with lung disease presence (yes vs. no). The observed counts are placed in a 2×2 table. The chi-square test yields a statistic of 12.4 with a p-value of 0.0004, leading the researchers to reject the null hypothesis of independence and conclude there is a statistically significant association between smoking and lung disease in their sample.
Related Terms
- P-Value
- Null Hypothesis
- Odds Ratio (quantifies the strength of association after chi-square significance)
- Logistic Regression
Software Notes
- SPSS: Analyze > Descriptive Statistics > Crosstabs. Move one variable to Rows and the other to Columns, then click Statistics and check Chi-square.
- R:
chisq.test(table(var1, var2))orchisq.test(matrix(c(a, b, c, d), nrow = 2)). Expected frequencies should all exceed 5 for validity. - Stata:
tabulate var1 var2, chi2for the Pearson chi-square test. Usetabi 10 20 \ 30 40, chi2for direct entry of observed counts.