Course contentsShow
← Mathematics
Lesson 3013 of 3,12159. Statistics — Descriptive and InferentialFree lesson

Choosing Sample Size for Desired Margin of Error

Calculate the required sample size to achieve a specified margin of error for a given confidence level.

Choosing Sample Size for Desired Margin of Error

You'll learn how to calculate the sample size needed to achieve a target margin of error at a specific confidence level.

The Core Idea

When constructing a confidence interval for a population mean (with known σ), you've seen that the margin of error is:

E = z* × (σ / √n)

where z* is the critical value for your confidence level, σ is the population standard deviation, and n is the sample size.

Often in practice, you want to control how precise your estimate is. For example, you might need to estimate average customer wait time within ±2 minutes with 95% confidence. This requires choosing your sample size before collecting data.

The Formula

To find the required sample size, solve the margin of error formula for n:

n = (z × σ / E)²*

You need three inputs:

  1. Desired margin of error (E): How precise you want to be
  2. Confidence level: Determines z* (e.g., 1.96 for 95%)
  3. Population standard deviation (σ): Often estimated from prior studies or a pilot sample

Always round up to the next whole number, since you can't survey a fraction of a person!

Example

Suppose you want to estimate mean income with margin of error 500,99500, 99% confidence, and you know σ = 3,000 from past data. Here, z* = 2.576 (for 99%), so:

n = (2.576 × 3000 / 500)² = (15.456)² ≈ 238.9

Round up: you need n = 239 people.

Key Takeaway: To achieve a desired margin of error at a given confidence level, calculate the required sample size using n = (z × σ / E)²* and always round up to ensure you meet or exceed your precision goal.