Real, or just chance?
Every comparison will show some difference. Amara learns the logic that decides whether a difference is real.
- 09:00Hypothesis testing with Augustin (Black Belt)
- 11:00Test the gap to the target
- 15:00Plan the tests ahead with Augustin (Black Belt)
Situation 1 of 2
09:00 · Hypothesis testing with Augustin (Black Belt)Which is right?
Situation 2 of 2
15:00 · Plan the tests ahead with Augustin (Black Belt)How do you manage both risks?
How much data does a test need?
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.
| Input | Value |
|---|---|
| Difference worth detecting | 3 days |
| Standard deviation | 6.5 days |
| Alpha (two-sided) | 0.05 (z = 1.96) |
| Power wanted | 80% (z = 0.84) |
- Formula (two groups)
n per group = 2 × (z for alpha + z for power)² × s² ÷ difference² - Fill in
2 × (1.96 + 0.84)² × 6.5² ÷ 3²= 73.7 - Round up
= 74 per group - What 30 per group would give
power = chance of detecting it: Φ(3 ÷ (6.5 × √(2/30)) − 1.96)= 43% - Check at 74
Φ(3 ÷ (6.5 × √(2/74)) − 1.96)= 80%
Try it yourself 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) |
How many per group to detect a 2-day difference with the same spread?
Show the answer
2 × 2.8² × 6.5² ÷ 2² = 165.6, so 166 per group. Smaller differences need far more data.
Is the average wait really above 7 days?
Atticus (Sponsor) asks whether the wait could really be 7 days on average and the sample is just unlucky. Amara tests it.
| Input | Value |
|---|---|
| Sample size | 60 |
| Sample mean | 10.43 days |
| Standard deviation | 6.46 days |
| Value tested | 7 days |
| Significance level (alpha) | 0.05 |
- Hypotheses
H0: the true mean is 7 days. H1: it is more than 7 - Choose the test
continuous data, one group, compared with a value; 60 records, so averages are close to normal= one-sample t-test - Test statistic
t = (mean − 7) ÷ (s ÷ √n) = (10.43 − 7) ÷ 0.834= 4.11 - p-value
chance of a mean this high if the truth were 7= 0.00006 - Decide
p is below 0.05: reject H0 - Practical size
3.4 days above the target matters to patients= statistically and practically significant
Try it yourself in a spreadsheet
| t statistic | =(AVERAGE(B2:B61)-7)/(STDEV.S(B2:B61)/SQRT(60)) |
| p-value (one-sided) | =T.DIST.RT(D2,59) |
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?
Show the answer
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.
Key concepts
The ideas behind today. Concept how the work is done, in our own words · Common practice widely used ways of working.
The logic of a test
- Assume no difference (the null hypothesis). Calculate how surprising the data would be if that were true: the p-value. Below 0.05, reject the null hypothesis.
Where you will meet this: Null and alternative hypotheses · p-value
Two risks
- Alpha: a false alarm, seeing a difference that isn't there (usually 5%). Beta: missing a real difference. Power (1 − beta), usually 80%, depends on sample size, spread and the size of the difference you care about.
Where you will meet this: Alpha and beta risk · power · sample size
Statistical and practical significance
- A significant result says the difference is probably real, not that it matters. Always ask whether the size of the difference is worth acting on.
Explained in our own words. This helps you understand the concepts behind the certifications; it does not reproduce or replace any official guide. Sources
Day 28 complete
2 situations today.
- A test starts from the null hypothesis (no difference). A small p-value means the data would be surprising if it were true.
- Alpha is the risk of a false alarm, beta the risk of missing a real difference. Plan the sample size for both.