Sample Size: How Much Data Is Enough?
Sample size is the number of observations needed to estimate a parameter with a chosen precision and confidence, or to detect a given difference with a chosen power. For a mean, n = (z × σ / E)²; for a proportion, n = z² × p(1 − p) / E². The result is always rounded up.
Quick facts
- Type
- Planning calculation, done before data collection
- Mean
- n = (z × σ / E)², with E the margin of error
- Proportion
- n = z² × p(1 − p) / E²; use p = 0.5 with no prior estimate
- Drivers
- Confidence, variation, precision; for tests also α, power and the difference to detect
- Rounding
- Always up to the next whole number
- Reference
- IASSC™ Green Belt Body of Knowledge §3.2.2
- Exam relevance
- Green Belt (Analyze phase); calculation and reasoning items
Why does sample size matter in a Lean Six Sigma project?
Sample size is decided in the data collection plan, usually in Measure, and it shapes what Analyze and Improve can conclude.
- Too small, and confidence intervals are wide and tests have little power. A pilot that really works can come out "not significant", and the team drops a good solution.
- Too large, and data collection costs time and money, and differences too small to matter become statistically significant.
The right size depends on the question. Estimation asks how precisely a mean or a proportion must be known (the margin of error E). Testing asks how large a difference must be detected, and with what risks (α and power).
Sample size also depends on how the units are chosen. The formulas assume a random, representative sample; a large biased sample is still biased.
Planning the sample size turns "collect some data" into a decision about precision and risk that the sponsor can agree to before the work starts.
How do you calculate the sample size for a mean?
To estimate a mean within ±E at a given confidence:
n = (z × σ / E)²
σ comes from a pilot study, historical data or a conservative guess (range / 4 is a rough fallback often used in practice). The result is always rounded up: rounding down would miss the stated precision.
Worked example. Brightwater Health wants to estimate the mean wait in its outpatient clinic. A pilot suggests σ = 12 minutes.
| Requirement | Calculation | Result | Sample size |
|---|---|---|---|
| ±3 min at 95% | (1.96 × 12 / 3)² = 7.84² | 61.47 | 62 |
| ±3 min at 99% | (2.58 × 12 / 3)² = 10.32² | 106.50 | 107 |
| ±1.5 min at 95% | (1.96 × 12 / 1.5)² = 15.68² | 245.86 | 246 |
Results are rounded to two decimals, then up to the next whole patient. Halving the margin of error multiplies the sample size by four, because E is squared in the denominator. Moving from 95% to 99% confidence adds about 73% more data.
The sample size for a mean grows with the square of σ/E: precision is expensive.
How do you calculate the sample size for a proportion?
To estimate a proportion within ±E:
n = z² × p(1 − p) / E²
p is a prior estimate. When nothing is known, use p = 0.5: p(1 − p) is then at its largest (0.25), so the sample is large enough whatever the true proportion.
Worked example. Kestrel Retail wants to estimate the share of online orders shipped with a wrong item, within ±0.04 at 95% confidence.
| Prior estimate | Calculation | Result | Sample size |
|---|---|---|---|
| p = 0.10 (last year's audit) | 1.96² × 0.10 × 0.90 / 0.04² | 216.09 | 217 |
| No prior, p = 0.5 | 1.96² × 0.25 / 0.04² | 600.25 | 601 |
Results are rounded to two decimals, then up. A credible prior estimate cuts the sample by almost two thirds here. Attribute data carry less information per observation than continuous data, which is why proportions typically need hundreds of observations where means need dozens.
When the sample would be a large share of a small population (a few hundred contracts, for example), a finite population correction can reduce n; a common guideline applies it once the sample exceeds about 5% of the population.
The sample size for a proportion depends on how close p is to 0.5 and on the square of the margin of error.
How do you size a sample to detect a difference?
For a hypothesis test, the question becomes: how many observations are needed to detect a true difference δ with power 1 − β at significance α? For a one-sample test of a mean with σ known:
n = [ (z(α/2) + z(β)) × σ / δ ]²
z(β) for 80% power is 0.84, because Φ(0.84) = 0.7995 ≈ 0.80 in the z table.
Worked example. Larchfield Logistics wants to detect a 5-minute change in mean loading time, with σ = 10 minutes, α = 0.05 (two-sided) and 80% power.
| Step | Calculation | Result |
|---|---|---|
| Sum of z values | 1.96 + 0.84 | 2.80 |
| Sample size | (2.80 × 10 / 5)² = 5.6² | 31.36, so 32 |
| Two independent groups | 2 × 31.36 per group | 62.72, so 63 per group |
Results are rounded up. The two-group line uses the usual approximation for a two-sample comparison; t-based calculations give slightly larger numbers.
| To detect… | Sample size needed |
|---|---|
| A smaller difference δ | Larger |
| With more power (90% instead of 80%) | Larger |
| With a smaller α (0.01 instead of 0.05) | Larger |
| In noisier data (larger σ) | Larger |
Sizing a test means agreeing in advance on the smallest difference worth finding and the risks the team accepts.
What are the common mistakes with sample size?
A few lines of arithmetic before data collection prevent the two costliest outcomes: an inconclusive study and a wasted one. The usual mistakes:
- Rounding down. 61.47 becomes 62, never 61.
- Forgetting to square. 1.96 × 12 / 3 = 7.84 is not a sample size; 7.84² = 61.47 is.
- Using 2.58 at 95%. 1.96 is the 95% value; 2.58 is for 99%.
- Confusing E with the full width. E is the half-width of the interval.
- Guessing σ too low. An optimistic σ gives a sample that is too small; use a pilot or a conservative value.
- Thinking a larger α or lower power needs more data. Both reduce the required n.
- Ignoring losses. Unusable records, missing data and non-responses reduce the effective sample; plan for them.
The sample size formulas are simple; the judgment lies in choosing σ, E and the difference worth detecting.
Sample size vs. sampling technique: what is the difference?
| Sample size | Sampling technique | |
|---|---|---|
| Question answered | How many observations? | Which observations, and how are they chosen? |
| Controls | Random sampling error (precision, power) | Bias (representativeness) |
| Depends on | σ or p, margin of error, confidence, α, power | Population structure: strata, clusters, time order |
| Typical outputs | n = 97 | Stratified random sample by district |
| If wrong | Wide intervals or low power | Precise answers about the wrong population |
Sample size sets how precise the answer is; sampling technique decides whether it is the answer to the right question. A plan needs both.
Exam focus
Sample size is IASSC™ section 3.2.2, in Green Belt scope. Expect calculations with n = (z × σ / E)² for a mean and n = z² × p(1 − p) / E² for a proportion, with p = 0.5 when nothing is known, and reasoning items on what increases the required n. The traps are rounding down, forgetting to square, using the 99% z value at 95%, and thinking that a larger α or lower power needs more data. Practise in the Analyze phase drill.
Practise this DMAIC phase →FAQ
Why do you always round sample size up?
The formula gives the minimum number of observations that achieves the stated precision or power. Rounding down, even from 61.47 to 61, would fall just short of that requirement. Rounding up to the next whole observation guarantees the margin of error or power you planned for.
Why use p = 0.5 when calculating sample size for a proportion?
The product p(1 − p) is largest when p = 0.5, so using 0.5 gives the largest, most conservative sample size. The precision target is then met whatever the true proportion turns out to be. If a reliable prior estimate exists, using it reduces the required sample.
How does the margin of error affect sample size?
The margin of error sits squared in the denominator, so halving it multiplies the sample size by four. Asking for ±1.5 minutes instead of ±3 minutes, with the same σ and confidence, turns 62 observations into 246.
Is a sample of 30 always enough?
No. Thirty is a rule of thumb for when sample means become roughly normal, not a sample size calculation. The data needed depend on the variation, the precision or difference required, and the risks accepted. A proportion estimated within a few percentage points usually needs hundreds of observations.
What is the difference between precision-based and power-based sample size?
Precision-based sample size targets a margin of error for an estimate, such as a mean within ±3 minutes. Power-based sample size targets a test: detecting a difference of a given size with a chosen α and power. The second adds z(β) to the formula, so it usually needs more data.
Sources
- Cochran, W. G. (1977). Sampling Techniques (3rd ed.). Wiley.
- Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum Associates.
- Montgomery, D. C. & Runger, G. C. (2018). Applied Statistics and Probability for Engineers (7th ed.). Wiley.
- IASSC™ (n.d.). Lean Six Sigma Green Belt Body of Knowledge, §3.2.2.
- Last reviewed