Discover whether two categorical variables are independent — or whether there's a real association worth reporting.
The Chi-Square Test of Independence is the standard method for determining whether two categorical variables are associated in a sample. If you have survey data, experimental treatment groups, or any situation where you've counted how many people fall into each combination of categories, the Chi-Square test tells you whether those counts could plausibly have occurred by chance alone.
The test is ubiquitous across the social sciences, public health, marketing research, and medicine. Researchers use it to ask questions like: Does smoking status depend on gender? Does customer satisfaction differ by region? Is vaccine uptake associated with political affiliation? The Chi-Square statistic measures the overall distance between observed and expected cell frequencies, converting that distance into a probability (p-value) under the null hypothesis of independence.
StatRyx automates the complete Chi-Square workflow: it builds the contingency table from your raw data, verifies that expected cell counts meet the minimum threshold (5 per cell), calculates the Chi-Square statistic and degrees of freedom, computes Cramer's V as an effect size measure, and formats everything in APA 7 style. If expected counts are too low, StatRyx recommends Fisher's Exact Test automatically.
| Cancer: Yes | Cancer: No | Row Total | |
|---|---|---|---|
| Smoker | 68 | 132 | 200 |
| Non-Smoker | 34 | 246 | 280 |
| Column Total | 102 | 378 | 480 |
A chi-square test of independence was performed to examine the relation between smoking status and lung cancer diagnosis. The relation between these variables was significant, χ²(1, N = 480) = 33.31, p < .001, Cramér's V = .26, indicating a small-to-medium effect.
Yes. You can run it without an account (3 free analyses), and a free account adds 10 more — a one-time allowance, no payment needed. Every result includes the APA 7 write-up. Paid plans (Student from $9/month) add more analyses and Word, PDF and Excel export.
No coding required. You describe what you want to test in plain English, and StatRyx's AI selects the correct test, checks your data assumptions, and returns results in professional APA format. Prior statistical knowledge is helpful but not necessary.
A common rule of thumb is that at least 80% of expected cell counts should be 5 or greater, and no expected cell count should be zero. In practice, for a 2×2 table you generally want at least 20–40 total observations. StatRyx checks these conditions automatically and warns you if they are violated.
Cramer's V is an effect size measure for Chi-Square, ranging from 0 (no association) to 1 (perfect association). Reporting just a p-value tells you whether an effect exists but not how large it is. Cramer's V provides practical significance: values around 0.10 are small, 0.30 medium, and 0.50 large by convention.
Use Fisher's Exact Test when your sample is small and some expected cell counts fall below 5. Fisher's Exact Test calculates exact probabilities rather than relying on the chi-square approximation, making it more accurate for sparse tables. StatRyx automatically detects this situation and suggests the appropriate test.
Run a Chi-Square Test on your data →