Chi-Square Goodness of Fit Calculator Formula
Understand the math behind the chi-square goodness of fit calculator. Each variable explained with a worked example.
Formulas Used
Chi-square Contribution
chi2_contribution = pow(observed - expected, 2) / expectedDeviation (O - E)
deviation = observed - expectedDegrees of Freedom
df = k - 1Variables
| Variable | Description | Default |
|---|---|---|
observed | Observed Frequency | 45 |
expected | Expected Frequency | 50 |
k | Number of Categories | 5 |
How It Works
Chi-Square Goodness of Fit
chi2 = Sum((O-E)^2/E)
Tests observed vs expected frequency distribution.
Worked Example
O=45, E=50, k=5.
observed = 45expected = 50k = 5
- 01chi2 = 25/50 = 0.5
- 02df = 4
Ready to run the numbers?
Open Chi-Square Goodness of Fit Calculator