Math

Goodness of fit.

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 · 6 phases

Step by step.

  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

Real-world.

  • 1 Testing if a die is fair by rolling it 120 times and checking if each face appears about 20 times
  • 2 Checking if customer visits are evenly distributed across weekdays
  • 3 Testing whether M&M color proportions match the company's claimed distribution
Key Fact

χ² = Σ(O − E)² / E, with df = number of categories − 1

Studied in

1 unit use this concept.