Chi-Squared Goodness of Fit Test

Jul 18, 2025

Overview

This lecture covers the Chi-Squared goodness of fit test for categorical data, focusing on how to compare observed data to expected distributions and interpret results.

Chi-Squared Goodness of Fit Test

  • Used to test if categorical data with more than two categories fits an expected distribution.
  • Not used for data with only two categories (use one-prop or two-prop test instead).
  • Compares observed frequencies to expected frequencies based on previous information.

Calculating Chi-Squared Statistic

  • Chi-Squared = Σ[(Observed - Expected)² / Expected] for all categories.
  • For a fair coin (n = 100), expect 50 heads, 50 tails; large differences yield a high Chi-Squared value.
  • For a fair six-sided die (n = 180), expect 30 for each outcome; deviations analyzed with the formula.
  • Calculations can be done by hand or with graphing calculators using lists.

Hypothesis Testing Steps

  • Step 1: State hypotheses. Null (H₀): Observed = Expected. Alternative (Hₐ): Observed ≠ Expected.
  • Step 2: Prepare by stating alpha (often 0.05) and checking all expected counts are at least 5.
  • Step 3: Compute using calculator or by hand. Input observed values (list 1) and expected values (list 2).
  • Step 4: Note degrees of freedom = number of categories - 1.
  • Step 5: Obtain Chi-Squared statistic and p-value.
  • Step 6: If p-value < alpha, reject H₀; otherwise, fail to reject H₀.
  • Interpret results in the context of the problem.

Calculator Instructions

  • Enter observed data into list 1, expected counts into list 2.
  • Use the calculator's Chi-Squared test function for results.
  • For older calculators (TI-83), calculations may require manual steps and use of list functions.

Key Terms & Definitions

  • Chi-Squared statistic — Measures the discrepancy between observed and expected frequencies.
  • Goodness of fit test — A hypothesis test for whether observed data matches expected distribution.
  • Degrees of freedom — Number of categories minus one.
  • p-value — Probability of obtaining results as extreme as observed, assuming H₀ is true.

Action Items / Next Steps

  • Review calculator instructions for the Chi-Squared goodness of fit test.
  • Practice applying the four hypothesis testing steps with sample data.
  • Ensure you understand how to interpret p-values in the context of categorical data.