Course contentsShow
← Data Science
Lesson 419 of 2,14511. Hypothesis Tests for Proportions and CategoriesFree lesson

Assumptions and Minimum Expected Frequencies

Understanding the requirement for expected frequencies of at least 5 and consequences of violating assumptions.

Assumptions and Minimum Expected Frequencies

You'll learn why chi-squared tests require expected frequencies of at least 5 in each category and what happens when this rule is violated.

Why the "Rule of 5" Exists

The chi-squared goodness of fit test relies on an approximation: your test statistic follows a chi-squared distribution only when sample sizes are large enough. The mathematical theory behind this test assumes that each category has a sufficient number of observations for the approximation to work well.

The golden rule: Each category should have an expected frequency of at least 5.

Think of it like weather forecasting. If you have only 2 days of data, you can't reliably predict next month's weather patterns. Similarly, with too few expected observations in a category, the chi-squared distribution doesn't accurately describe your test statistic's behavior.

What Are We Assuming?

When you run a chi-squared goodness of fit test, you're assuming:

  • Independence: Each observation belongs to exactly one category
  • Random sampling: Your data comes from a random process
  • Adequate sample size: Expected frequency ≥ 5 in every category

Consequences of Violation

When expected frequencies drop below 5:

  • Your p-values become unreliable (often too small)
  • You may reject the null hypothesis incorrectly (Type I error)
  • The test becomes overly sensitive to small differences

What to Do Instead

If you violate the minimum expected frequency rule:

  • Combine adjacent categories to increase expected counts
  • Use Fisher's exact test (for small samples)
  • Collect more data to increase all expected frequencies
  • Consider simulation-based tests (permutation or bootstrap)

Key Takeaway: The chi-squared test requires expected frequencies of at least 5 in each category because the mathematical approximation breaks down with smaller counts, leading to unreliable p-values and incorrect conclusions.