Chi-Square Calculator
Compare observed counts to expected counts and compute the chi-square statistic for goodness-of-fit tests.
Separate values with spaces or commas.
Chi-square Statistic
1.458
Degrees of freedom: 2
| Category | Observed | Expected | (O − E)² / E |
|---|---|---|---|
| 1 | 25.00 | 30.00 | 0.833 |
| 2 | 30.00 | 30.00 | 0.000 |
| 3 | 45.00 | 40.00 | 0.625 |
How to Use This Calculator
- Enter observed counts for each category.
- Enter expected counts under the null hypothesis for the same categories.
- Confirm the lists are the same length to compute χ² and degrees of freedom.
- Compare the statistic to chi-square critical values or compute a p-value.
Formula
Degrees of freedom for a goodness-of-fit test equal the number of categories minus one. Subtract any parameters estimated from the data to adjust the degrees of freedom.
Frequently Asked Questions
What minimum expected value is acceptable?
Common practice requires expected counts at least 5. Combine categories when necessary to meet this guideline.
How do I find the p-value?
Use a chi-square distribution table or software to compute P(Χ² ≥ statistic) with the reported degrees of freedom.
Can this be used for contingency tables?
Yes. Use row and column totals to derive expected counts, then apply the same χ² formula to assess independence.
What if expected counts arise from parameter estimation?
Reduce degrees of freedom by the number of estimated parameters to maintain accurate significance levels.