Data and statistics · cheat sheet

Hypothesis testing

A way of deciding whether a difference seen in data is real or could be chance, by assuming there is no difference and checking how surprising the data would be.

Common practice
6 steps
Used by Process Improvement Specialist

What it is

A hypothesis test assumes nothing is going on (the null hypothesis, H0) and asks how surprising the data would be if that were true. The p-value is that chance.

Two risks: alpha, a false alarm (rejecting a true H0), usually 5%; beta, missing a real difference. Power = 1 − beta, usually aimed at 80%.

When to use it

Whenever a decision depends on whether a difference or a link is real: comparing groups, before and after, against a target.

Why it works

It stops teams acting on differences that are just noise, and from dismissing real ones.

Do

  • Decide the test before seeing the data.
  • p above 0.05 means “not shown”, not “no difference”.

Don't

  • Choosing the test after seeing the results.
  • Treating p above 0.05 as proof of no difference.
  • Ignoring practical significance with large samples.

Step by step

  1. Practical question
  2. H0 and H1
  3. Alpha and sample size For enough power.
  4. Choose the test See the table below.
  5. Check assumptions
  6. Decide p-value and practical size.
Also called: Significance testing, p-value, alpha and beta risk, powerPrint the blank template ↗

Worked example

The situation. Choosing the right test.

  1. Pick by the type of data and the number of groups.

The result. Using the table, a team picked Kruskal-Wallis for skewed repair times across four depots.

Hypothesis test plan Print blank
QuestionCon­tinuous, normal enoughCon­tinuous, skewedYes or no, or cate­gories
One group against a targetOne-sample t-testWilcoxon or sign testOne-proportion test
Two groupsTwo-sample t-testMann-WhitneyTwo-proportion test
Paired, before and afterPaired t-testWilcoxon on differencesExact paired test
Three or more groupsOne-way ANOVAKruskal-Wallis or Mood's medianChi-square test
Blocks (same weeks, people)Two-way ANOVAFriedman testChi-square by block
SpreadsF-test, one-sample varianceLevene's test

Filled in for: Choosing the right test.

Prac­tical questionH0H1Data typeTest chosenAlphaSample sizeResultDecision

Copy this structure, or print the blank version and fill it in by hand.

Before you use it: check these

CheckIf it fails
The question and the test chosen before looking at resultsChoosing afterwards inflates false alarms: state it, and confirm with new data
Enough data for the size of difference that matters (power)Calculate the sample size; a non-significant result from too little data proves nothing
Independent data pointsUse paired or blocked tests when the same items or periods repeat

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 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.

Worked example with real data

Is the average wait really above 7 days?

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

Atticus (Sponsor) asks whether the wait could really be 7 days on average and the sample is just unlucky. Amara tests it.

Step by step

  1. HypothesesH0: the true mean is 7 days. H1: it is more than 7
  2. Choose the testcontinuous data, one group, compared with a value; 60 records, so averages are close to normal= one-sample t-test
  3. Test statistict = (mean − 7) ÷ (s ÷ √n) = (10.43 − 7) ÷ 0.834= 4.11
  4. p-valuechance of a mean this high if the truth were 7= 0.00006
  5. Decidep is below 0.05: reject H0
  6. Practical size3.4 days above the target matters to patients= statistically and practically significant
InputValue
Sample size60
Sample mean10.43 days
Standard deviation6.46 days
Value tested7 days
Significance level (alpha)0.05

How to read the result

A sample mean this far above 7 would almost never happen by chance if the real average were 7. The difference is also big enough to matter to patients.

What it led to

The gap to the target is real. The project moves on to finding which causes create it.

Do it in a spreadsheet

t statistic=(AVERAGE(B2:B61)-7)/(STDEV.S(B2:B61)/SQRT(60))
p-value (one-sided)=T.DIST.RT(D2,59)
Try it yourself: With a sample of 2,000 a test finds the mean wait is 7.1 days, p = 0.01, against a target of 7. Is it a problem worth a project?

It's statistically significant but practically tiny: 0.1 day. Large samples make small differences significant. Always ask whether the size of the difference matters.

In the roles

How a Process Improvement Specialist uses it

One-sample t-test: mean wait 10.43 against 7 days, t = 4.11, p = 0.00006.

Questions people ask

Statistical or practical significance?

Both matter. With huge samples tiny differences are significant; ask whether the size of the difference matters.

How big a sample?

For two groups: n per group ≈ 2 × (1.96 + 0.84)² × s² ÷ difference², for 95% confidence and 80% power.

Related techniques

← All techniques and tools