Cross-Sectional Study — Chi Square Test
The Cross-Sectional Study calculator runs chi-square tests of independence on contingency tables of any dimension (2x2, 2x3, 3x3, RxC). It automatically chooses the most appropriate test depending on your data.
Step 1 — Choose input mode
| Mode | What it does |
|---|---|
| Excel (default) | Upload file and select columns |
| Manual | Build contingency table cell by cell |
A Sample Data Selector is available.
Step 2 — Define table (Manual) or map columns (Excel)
In manual mode, specify rows and columns counts then fill cell values.
In Excel mode, pick two categorical columns for the contingency table.
Step 3 — Calculate
Results panel shows:
- Chi-square statistic with df and p-value
- Expected frequencies table
- Cell contributions to chi-square
- Cramer's V with interpretation label
- Likelihood Ratio Chi-Square (G2) — always computed
- Fisher's Exact Test — for 2x2 tables with small expected counts
- Recommended test based on data properties
- Sample Size Recommendation
Step 4 — Analysis history
Previous tests shown in history panel.
A UniversalChatBot is available below.
Statistical methods used
Pearson's Chi-Square
chi2 = sum((O - E)^2 / E) with df = (R-1) * (C-1)
Automatic test recommendation
| Condition | Recommended test |
|---|---|
| min expected >= 5 | Pearson's Chi-Square |
| min expected < 5 AND 2x2 | Fisher's Exact Test |
| min expected < 5 AND not 2x2 | Likelihood Ratio Chi-Square |
Cramer's V
V = sqrt(chi2 / (N * min(R-1, C-1)))
| V | Label |
|---|---|
| < 0.10 | Negligible |
| 0.10 - 0.20 | Weak |
| 0.20 - 0.40 | Moderate |
| 0.40 - 0.60 | Relatively strong |
| 0.60 - 0.80 | Strong |
| >= 0.80 | Very strong |
Likelihood Ratio (G2)
G2 = 2 * sum(O * ln(O / E))
Fisher's Exact Test — hypergeometric enumeration for 2x2 tables.