Data and statistics · cheat sheet

Sample size and power

Working out how much data is needed to estimate something precisely enough, or to give a test a good chance of detecting a difference that matters.

Common practice
5 steps
Used by Process Improvement Specialist

What it is

Sample size is how much data you need. Power is the chance a test detects a real difference of a given size. Too little data gives low power: real effects get missed.

When to use it

Before collecting data for an estimate or a comparison, and when a test comes back “not significant”.

Why it works

It avoids both wasted effort (too much data) and false comfort (too little).

Do

  • Halving the difference you want to detect needs four times the data.

Don't

  • Guessing the spread.
  • Running a test with too little data, then reading “not significant” as “no difference”.

Step by step

  1. Agree what matters Precision or difference.
  2. Estimate the spread
  3. Choose alpha and power
  4. Calculate
  5. Round up
Also called: Power analysis, sample size calculationPrint the blank template ↗

Worked example

The situation. A team wants to know if a new layout cuts picking time by 1 minute; standard deviation about 2.5 minutes.

  1. Alpha 0.05, power 80%.

The result. The team collected 100 picks per layout and found a real 1.2-minute saving.

Sample size worksheet Print blank
StepCal­culationValue
Formula2 × (1.96 + 0.84)² × 2.5² ÷ 1²98
Per groupround up98 picks per layout
Power with 40 per groupΦ(1 ÷ (2.5 × √(2/40)) − 1.96)about 48%

Filled in for: A team wants to know if a new layout cuts picking time by 1 minute; standard deviation about 2.5 minutes.

InputValue

Copy this structure, or print the blank version and fill it in by hand. One average: n = (z × s ÷ E)² · Two groups: n = 2 × (zα + zβ)² × s² ÷ d² (zα = 1.96 for 95%, zβ = 0.84 for 80% power)

Before you use it: check these

CheckIf it fails
A realistic estimate of the spreadRun a small pilot first
The smallest difference that matters, agreed in advanceAgree it with the process owner before calculating

How to do it with real data

The full calculation, as it happens in the story: the data, every step, how to read the result, and the spreadsheet functions to do it yourself.

Worked example with real data

How many records do we need?

From Day 17: What exactly do we count? of the Process Improvement Specialist story

To estimate the average wait within ±2 days with 95% confidence, Augustin (Black Belt) shows the sample size formula. A pilot of 20 records gave a standard deviation of about 6.5 days.

Step by step

  1. Formulan = (z × s ÷ E)²
  2. Fill in(1.96 × 6.5 ÷ 2)²= 40.6
  3. Round upalways round up= 41 records
  4. What 60 givesE = 1.96 × 6.46 ÷ √60= ±1.6 days
InputValue
Confidence95% (z = 1.96)
Standard deviation (pilot)6.5 days
Precision wanted (±)2 days

How to read the result

At least 41 random records are needed to know the average wait within 2 days. With 60, the estimate is within about 1.6 days.

What it led to

Astrid (Data Analyst) takes 60 requests at random from weeks 12 to 20, the period since the process shifted.

Do it in a spreadsheet

Sample size=ROUNDUP((1.96*B3/B4)^2,0)
z for 95%=NORM.S.INV(0.975)
Random sample=RANDARRAY to number the records, then sort and take the first 60
Try it yourself: How many records would you need for ±1 day?

(1.96 × 6.5 ÷ 1)² = 162.3, so 163 records. Halving the error quadruples the sample.

Worked example with real data

How much data does a test need?

From Day 28: Real, or just chance? of the Process Improvement Specialist story

Before comparing two groups, Amara wants an 80% chance of detecting a 3-day difference in waits, if it's real. The waits' standard deviation is about 6.5 days; alpha is 0.05.

Step by step

  1. Formula (two groups)n per group = 2 × (z for alpha + z for power)² × s² ÷ difference²
  2. Fill in2 × (1.96 + 0.84)² × 6.5² ÷ 3²= 73.7
  3. Round up= 74 per group
  4. What 30 per group would givepower = chance of detecting it: Φ(3 ÷ (6.5 × √(2/30)) − 1.96)= 43%
  5. Check at 74Φ(3 ÷ (6.5 × √(2/74)) − 1.96)= 80%
InputValue
Difference worth detecting3 days
Standard deviation6.5 days
Alpha (two-sided)0.05 (z = 1.96)
Power wanted80% (z = 0.84)

How to read the result

With 30 per group, a real 3-day difference would be missed more than half the time. A “not significant” result from too little data proves nothing.

What it led to

Plan comparisons of individual waits with at least 74 per group, or compare weekly figures that vary less, as the team does for week 12.

Do it in a spreadsheet

Sample size=ROUNDUP(2*(NORM.S.INV(0.975)+NORM.S.INV(0.8))^2*6.5^2/3^2,0)
Power for n = 30=NORM.S.DIST(3/(6.5*SQRT(2/30))-NORM.S.INV(0.975),TRUE)
Try it yourself: How many per group to detect a 2-day difference with the same spread?

2 × 2.8² × 6.5² ÷ 2² = 165.6, so 166 per group. Smaller differences need far more data.

In the roles

How a Process Improvement Specialist uses it

To detect a 3-day difference with a spread of 6.5 days: 74 per group. With 30, power would be only 43%.

Questions people ask

What if I can't get that much data?

Look for a measure with less spread, compare periods instead of single items, or accept a larger detectable difference.

Related techniques

← All techniques and tools