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

When to Use the One-Sample Z-Test for Proportions

Understanding the appropriate scenarios for testing a single population proportion against a hypothesized value.

When to Use the One-Sample Z-Test for Proportions

You'll learn when it's appropriate to test whether a population proportion matches a specific hypothesized value.

The Core Idea

Up until now, you've been testing means (averages) using t-tests and rank-based methods. But what if your data isn't about averages—what if it's about proportions? For example: "Is 60% of voters really in favor of this policy?" or "Does our website have a 10% click-through rate?"

The one-sample Z-test for proportions is designed specifically for these yes/no, success/failure, category questions where you want to compare an observed proportion from your sample against a hypothesized population proportion.

When to Use It

Use the one-sample Z-test for proportions when:

  1. Your data is categorical/binary: Each observation falls into one of two categories (success/failure, yes/no, clicked/didn't click)
  2. You have a single sample from one population
  3. You want to test against a specific proportion: You have a hypothesized value (e.g., H₀: p = 0.50)
  4. Sample size is large enough: Generally, you need both np ≥ 10 and n(1-p) ≥ 10, where n is sample size and p is the hypothesized proportion
  5. Observations are independent: Each observation doesn't influence others

Analogy

Think of flipping a coin. If someone claims a coin is fair (p = 0.50 heads), you flip it 100 times and get 65 heads. The one-sample Z-test for proportions helps you decide: is this coin really unfair, or did you just get lucky?

Key Takeaway: Use the one-sample Z-test for proportions when you have binary/categorical data from a single sample and want to test if the true population proportion equals a specific hypothesized value, assuming sufficient sample size and independence.