How to calculate
For each cell, square observed minus expected and divide by expected. Add all contributions and evaluate the chi-square upper tail.
Worked example
Use Test Goodness of fit · Observed group counts 15, 15, 30 · Expected counts or relative weights 1, 1, 1 · Parameters fitted in goodness of fit 0 · Significance level 5%. The result is ≈ 0.02351774586.
Input and result notes
Enter numbers using the same units. Rounded results are marked with ≈.
NIST chi-square goodness-of-fit