Goodness of fit
MathDefinition
A chi-square test that determines whether observed frequency data fits an expected distribution. It compares what you observed in a sample to what you would expect if a certain hypothesis were true.
How It Works
- State the null hypothesis that the data follows the expected distribution.
- Calculate expected counts for each category.
- Compute χ² = Σ(observed − expected)² / expected for each category.
- Find degrees of freedom (df = number of categories − 1).
- Compare χ² to the critical value or find the p-value.
- Reject or fail to reject the null hypothesis.
Examples
- Testing if a die is fair by rolling it 120 times and checking if each face appears about 20 times
- Checking if customer visits are evenly distributed across weekdays
- Testing whether M&M color proportions match the company's claimed distribution
Key Fact
χ² = Σ(O − E)² / E, with df = number of categories − 1
Study This Concept
Practice goodness of fit with free review games in these units: