Chi-Square Calculator
χ² = Σ (O−E)²/E from two equal-length comma lists. Click any i for detail.
Counts
Observed counts
i
Observed
Comma-separated numbers. |
|
|---|---|
Expected counts
i
Expected
Comma-separated; same length as observed. |
How to use this calculator
- Paste observed counts as a comma list.
- Paste expected counts of equal length.
- Read χ² and df = k−1.
- Compare to a critical value from your textbook table if needed.
Results explained
Pearson’s goodness-of-fit chi-square sums squared residuals over expected counts. Degrees of freedom here are categories minus one, assuming expected counts are fully specified (no estimated parameters).
Quick reference: χ² GOF
χ² = Σ ((Oᵢ − Eᵢ)² / Eᵢ); df = k − 1.
| Item | Detail |
|---|---|
| Equal expects | Uniform null |
| Eᵢ should be >0 | Avoid zeros |
| Rule of thumb | Often Eᵢ ≥ 5 preferred |
| p-value | Not computed here |
Statistic only — bring your own critical value or software for p.
How the estimate is built
χ² = Σ (O−E)²/E; df = k−1.
Example scenario
O=20,30,25,25 vs E=25,25,25,25 → χ² = 2.0, df=3.
FAQ
Independence test?
Needs a contingency table — different setup.
Must expects sum to observed sum?
Usually yes for a proper multinomial null.
Continuity correction?
Not applied here.
Tiny expected counts?
Asymptotic χ² may be a poor approximation.