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

Calculating Expected Frequencies

Computing expected counts for each category based on the hypothesized theoretical distribution.

Calculating Expected Frequencies

You'll learn how to compute the expected counts for each category when testing whether your observed data matches a theoretical distribution.

The Core Idea

When performing a Chi-Squared Goodness of Fit test, you need two sets of numbers: the observed frequencies (what you actually counted in your data) and the expected frequencies (what you would expect to see if the hypothesized distribution were true). Calculating expected frequencies means determining how many observations should fall into each category according to your null hypothesis.

The formula is straightforward:

Expected Frequency = Total Sample Size × Hypothesized Proportion

For each category, multiply your total number of observations by the proportion that category should represent under your theoretical distribution.

An Everyday Analogy

Imagine you have a bag that's supposed to contain 100 candies: 50% red, 30% blue, and 20% green according to the manufacturer. If you buy a bag with 200 candies, you'd expect to find:

  • Red: 200 × 0.50 = 100 candies
  • Blue: 200 × 0.30 = 60 candies
  • Green: 200 × 0.20 = 40 candies

These are your expected frequencies. You'd then compare these to what you actually count in your bag (the observed frequencies) to see if the manufacturer's claim holds up.

Why This Matters

Expected frequencies form the baseline for your goodness of fit test. Without them, you can't measure how far your observed data deviates from what the hypothesized distribution predicts. They're the "benchmark" against which reality is measured.

Key Takeaway: Expected frequencies are calculated by multiplying your total sample size by each category's hypothesized proportion—they represent what you'd expect to see if your null hypothesis were perfectly true.