Chi-Square Test of Independence
Enter observed frequencies in a contingency table (up to 4x4) to test whether two categorical variables are independent. The calculator shows expected frequencies, chi-square statistic, p-value, and Cramer's V effect size.
Observed vs Expected
Contingency Table
| Col 1 | Col 2 | |
|---|---|---|
| Row 1 | ||
| Row 2 |
Results
Expected Frequencies
| 23 | 18 |
| 23 | 18 |
Step-by-Step Calculation
1. Expected Frequencies
2. Cell Contributions
3. Chi-Square Statistic
4. Degrees of Freedom
5. P-value and Decision
6. Cramer's V
Reference Guide
The Chi-Square Test
The chi-square test of independence checks whether two categorical variables are related or independent. It compares observed counts to the counts you would expect if the variables were independent.
Expected Frequencies
Under the null hypothesis (no association), the expected count for each cell is calculated from the row and column totals.
As a rule of thumb, all expected frequencies should be at least 5 for the test to be reliable.
Cramer's V
Cramer's V measures the strength of association between the two variables. It ranges from 0 (no association) to 1 (perfect association).
Guidelines: below 0.1 is negligible, 0.1 to 0.3 is small, 0.3 to 0.5 is medium, and above 0.5 is large.
When to Use This Test
Use this test when you have count data for two categorical variables and want to know if they are related. Common examples include survey responses by demographic group, A/B test results, and medical study outcomes.
The test requires independent observations and sufficiently large expected counts (typically 5 or more per cell).