Read this lesson as text
Goodness of Fit Test
Statistics · Axiom Academy
Testing whether observed data follows an expected distribution using the chi-square statistic The Goodness of Fit Test answers the question: "Does my observed data distribution match what I expected?" The test compares observed frequencies (O) with expected frequencies (E) across different categories. If the differences are small, we fail to reject H₀. If the differences are large, we reject H₀. 2. The Chi-Square Test Statistic The test statistic measures the total deviation between observed and expected frequencies across all categories. χ² = chi-square test statistic O = observed frequency for each category E = expected frequency for each category For each category, we calculate (O - E)² / E, then sum these values. Larger χ² values indicate greater deviation from the expected distribution. The degrees of freedom determine which chi-square distribution to use for finding the critical value or p-value. Where k is the number of categories in your data. The degrees of freedom help us determine the shape of the chi-square distribution used to evaluate our test statistic. 4. Example: Testing Dice Fairness Suppose we roll a die 60 times and want to test if it's fair (each face should appear equally often). We compare χ² = 1.4 to the critical value from the chi-square distribution with df = 5. At α = 0.05, the critical value is 11.07. Conclusion: Since 1.4 < 11.07, we fail to reject H₀. The die appears to be fair. 5. Example: Genetic Inheritance Ratios
This is the written version of the interactive lesson above. See the full Statistics course.