Goodness of fit

Math

Definition

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

  1. State the null hypothesis that the data follows the expected distribution.
  2. Calculate expected counts for each category.
  3. Compute χ² = Σ(observed − expected)² / expected for each category.
  4. Find degrees of freedom (df = number of categories − 1).
  5. Compare χ² to the critical value or find the p-value.
  6. 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: