Chi-Square Calculator

Find the chi-square goodness-of-fit statistic.

Chi-square statistic 2.72
Degrees of freedom 3

Formula: χ² = Σ (O − E)² ÷ E

Step-by-step with your numbers:
1. Values used:
2. Observed 1 = 30
3. Expected 1 = 25
4. Observed 2 = 20
5. Expected 2 = 25
6. Observed 3 = 28
7. Expected 3 = 25
8. Observed 4 = 22
9. Expected 4 = 25
10.
11. Chi-square statistic = 2.72
12. Degrees of freedom = 3
Did we solve your problem today?

The chi-square test compares observed counts to expected counts.

How the Math Works

The chi-square goodness-of-fit statistic measures how much your observed data deviates from expected outcomes. Using the formula χ² = Σ (O - E)² ÷ E, you subtract each expected value from its corresponding observed value, square the difference to eliminate negatives, divide by the expected value to weight larger discrepancies more heavily, then sum all these components. A larger chi-square value indicates greater deviation from your hypothesized distribution.

Practical Applications

To apply this calculation, first determine your expected frequencies based on your null hypothesis or theoretical model. Count your actual observations for each category. Then for each category, compute (observed - expected) squared divided by expected, and add them all together. Use this statistic with chi-square distribution tables to determine if your results are statistically significant, helping you accept or reject your hypothesis about population characteristics.

Day-to-Day Use

This calculator helps you make data-driven decisions in everyday situations. You might use it to check if dice are fair for board games, verify if customer traffic matches your store's expected hourly patterns, or determine if website analytics align with predicted user behavior. It's also useful for quality control in manufacturing, analyzing survey responses, or simply satisfying your curiosity about whether real-world outcomes match theoretical expectations in any categorical data situation.

Worked example

Observed 30/20/28/22 vs 25 each → χ² = 2.72, df 3.

FAQ

When is it significant?

When χ² exceeds the critical value for your df and chosen α.