Chi-Square Calculator

χ² = Σ (O−E)²/E from two equal-length comma lists. Click any i for detail.

Jump to result

Counts

Observed counts
i
Observed

Comma-separated numbers.

Expected counts
i
Expected

Comma-separated; same length as observed.

How to use this calculator

  1. Paste observed counts as a comma list.
  2. Paste expected counts of equal length.
  3. Read χ² and df = k−1.
  4. 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.

ItemDetail
Equal expectsUniform null
Eᵢ should be >0Avoid zeros
Rule of thumbOften Eᵢ ≥ 5 preferred
p-valueNot 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.