Short Answer
The chi-square test examines whether there is a statistically significant relationship between two or more categorical variables by comparing observed frequencies with expected frequencies. It works not with continuous numbers but with categorical data such as sex, diagnosis, or treatment response, and you use it instead of the t-test and ANOVA. If the expected frequency is 5 or above in all cells, the chi-square test is used; if it drops below 5 in any cell, Fisher's exact test is preferred. The most common mistake is reporting the chi-square without checking the minimum expected frequency, and using the chi-square, which assumes independence, on matched data such as the same patient before and after; in that case the McNemar test is needed. In addition, when a significant result is obtained, an effect size such as Cramer's V is expected to be reported alongside the p value to show the strength of the relationship.
Serteser Consulting is run by a biomedical engineer (BME MSc) with peer-reviewed publications and PROSPERO-registered systematic reviews; it designs and carries out thesis, article, and clinical research statistics, including categorical data analysis and the chi-square/Fisher choice, using SPSS, R, and Python in a manuscript-ready form that can be defended before a jury or reviewer.
In your research you are comparing two groups, but what you measure is not a continuous number; it is a categorical variable such as sex, diagnosis, or treatment response. In this case the t-test or ANOVA cannot be used. The chi-square test fills exactly this gap.
What Does the Chi-Square Test Do?
The chi-square test examines whether there is a statistically significant relationship between two or more categorical variables.
The basic logic: observed frequencies are compared with the frequencies expected when there is no relationship at all between the groups. If the difference between these two values is large, a relationship exists.
Null hypothesis: there is no relationship between the two variables (they are independent).
When Chi-Square, When Fisher?
Asking this question is important; using one in place of the other leads to reviewer criticism.
Chi-square test: used when all expected cell frequencies are 5 or above. It is the standard for large samples.
Fisher's exact test: used when the expected frequency in any cell is below 5. It is preferred in small samples, in 2x2 tables, and in data containing rare events.
In the SPSS output, the results of both tests appear together. If the "Minimum expected count" value is below 5, report Fisher's. You need to explain this in a note below the table.
Assumptions of the Chi-Square Test
-
Observations must be independent of one another.
-
Each observation must fall into only one cell.
-
The sample size must be adequate (the expected frequency rule).
-
The data must be categorical or ordinal.
For dependent (matched/paired) categorical data, the McNemar test is used instead of the chi-square. For example, comparing the same patient's status before and after treatment.
Cramer's V: Effect Size
When the chi-square is significant, the effect size is calculated to answer the question "how strong is the relationship?" Cramer's V is used for this purpose:
0.10 = small effect
0.30 = medium effect
0.50 = large effect
In high-impact journals, Cramer's V is expected to be reported alongside the p value.
Chi-Square with SPSS
In the output, report the "Pearson Chi-Square" row. In asymmetric cross tables, "Likelihood Ratio" can be used as an alternative.
Common Mistakes
Skipping the expected frequency check: check the minimum expected count before every analysis. SPSS warns about this automatically, but skipping this warning is a common mistake.
Using chi-square on dependent data: two measurements taken from the same patient are not independent. The McNemar test should be used.
Comparing by placing counts instead of percentages: if the table contains only counts, interpretation becomes difficult. Add row or column percentages.
Request a free consultation for chi-square analysis and categorical data interpretation.
Where Do People Get Stuck Most in This Analysis?
- Expected frequencies are below 5, but it is unclear whether you should use Fisher's exact test or the chi-square.
- The chi-square came out significant in tables larger than 2x2 (3x4), but you do not know which cells created the difference.
- In matched data, it is confusing whether to use the McNemar test or the standard chi-square.