Chi-Square Calculator
Perform a chi-square goodness-of-fit test.
Enter observed and expected frequencies to calculate the chi-square statistic and p-value.
Chi-Square Test Results
Chi-Square Statistic:
χ² = Σ (Observed - Expected)² / Expected
How it works:
- For each category, calculate (O - E)² / E
- Sum all the values to get χ²
- Compare to the chi-square distribution with the correct degrees of freedom
Degrees of freedom:
- Goodness-of-fit: df = number of categories - 1
When to use:
- Testing if observed frequencies match expected frequencies
- Comparing categorical data distributions
- Testing independence between two categorical variables
Example: Testing if a die is fair — roll it 60 times and check if each face appears roughly 10 times.