Calculator Directory
Statistics

Chi-Square Statistic From Observed and Expected Counts

Calculate Pearson’s goodness-of-fit statistic from counts in matching categories and the expected frequencies predicted under your model.

Inputs

Chi-square statistic
0.383333333

Formula & assumptions

χ² = Σ(Oᵢ − Eᵢ)²/Eᵢ

Observed counts are nonnegative integers and expectations are positive with matching totals. The output is the statistic for the supplied bins.

NIST chi-square goodness of fit

Worked example

Observed counts
14,19,17
Expected counts
15,20,15
Chi-square statistic
0.383333333

Interpreting the result

A statistic of zero means every observed count matches its expected count exactly.