🔍

What is the Chi-Square Statistic?

The chi-square (χ²) goodness-of-fit statistic measures how far a set of observed category counts is from what you’d expect under some hypothesis — for example, comparing actual dice roll counts to the counts you’d expect from a fair die.

The Formula

χ² = Σ (Observed − Expected)² / Expected, summed across every category with a positive expected value. Degrees of freedom equal the number of categories minus one. The p-value is estimated using the Wilson–Hilferty approximation to the chi-square distribution; a small p-value suggests the observed data doesn’t fit the expected pattern well.

  • Leave unused category rows blank.
  • Expected values must be greater than zero to be counted.

The p-value shown is an approximation suitable for general learning and quick checks, not a substitute for a full statistical software package in formal research.

Last reviewed August 2026