Select Scenario
Expected Distribution
Sample Data
Run Test
Observed vs Expected Frequencies
Chi-Square Contributions
Understanding Chi-Square Goodness of Fit
The chi-square goodness of fit test determines if observed categorical data matches an expected distribution:
- Null hypothesis: The observed data follows the expected distribution
- Chi-square formula: χ² = Σ(O - E)² / E, where O = observed, E = expected
- Degrees of freedom: Number of categories - 1 - number of estimated parameters
- Each category contributes: (O - E)² / E to the total chi-square statistic
- Larger χ²: Greater evidence against the null hypothesis
- Assumption: Expected frequency ≥ 5 in each category (some say ≥ 1 is acceptable)
- P-value: Probability of observing this chi-square (or larger) if null is true
- Applications: Fair dice, survey responses, demographic distributions, genetic ratios