The friend with the lucky coin
Data scientists say: “the coin is fair” is the null hypothesis (H0), and “how often luck alone does this” is the P-value.
Pip’s friend flips a coin six times and gets six heads. “It’s a lucky coin!” Pip thinks like a court: innocent until proven guilty. Assume the coin is perfectly fair, then ask how often a fair coin would do something this extreme anyway.
Six tails would be just as suspicious, so Pip counts both. Flip a fair coin six times, or let Pip do it a thousand times.
0 of 0
tries landed six of the same face.
How rare is rare enough?
Data scientists call the “beyond reasonable doubt” line the significance level, α, usually 0.05. Below it they reject H0; above it they fail to reject H0.
A court needs evidence beyond reasonable doubt. Pip’s version: if luck alone would do this fewer than 5 times in 100 (0.05), Pip stops believing it is luck. Slide to change how many of the same face came up in a row.
Luck alone does this of the time.
- Two in a row is the coin example from the session: P = 0.50. Half of all pairs of tosses do that, so it says nothing.
- “Fail to reject” is not “proved fair”. A court that finds someone not guilty has not proved them innocent. It just lacked the evidence.
For the curious: where the numbers come from
The three parts of a P-value: what you saw, the equally rare outcome in the other tail, and anything more extreme still.
With k = 6: 2 × 1/64 = 2/64 ≈ 0.031, below 0.05. With k = 2: 2 × 1/4 = 0.50.
Did the holiday change anyone’s weight?
Data scientists call the same people measured twice a paired t-test, and two separate groups an unpaired (independent) t-test.
Eight friends weigh themselves before and after a fortnight away. They are all different sizes, more than 35 kg apart. Did the holiday change anything? Look at the same numbers two ways.
For the curious: degrees of freedom
One difference per person, so a paired test works on 8 numbers.
For two genuinely separate groups, such as people in two different towns.
The sat nav is never quite right
Data scientists call the minutes early or late the prediction error or noise. Early as often as late is a mean of 0; the typical size of a miss is the standard deviation, σ.
The sat nav says 14:20. Pip logs how many minutes early or late each journey really is. This sat nav’s typical miss is about 4 minutes. Drive some journeys and watch the pattern appear.
Keep driving: the middle settles near 68% and the wider band near 95%, the empirical rule from Part A. The patient risk model’s noise is exactly this, with a standard deviation of 4 units instead of 4 minutes.
Turn minutes into a chance
Data scientists call “how many typical misses away” a Z-score, and the shaded area the upper tail.
How often is Pip more than x minutes late? First, count how many typical misses that is: x divided by 4. Then read off the area beyond it under the curve.
For the curious: the session’s worked example, line by line
From the standard normal table: the area between the middle and Z = 1.
The whole upper half is 0.5000, so take away the table area: about 15.9%.
The car alarm that cries wolf
Data scientists call an alarm with nothing wrong a false alarm (false positive), staff tuning them out alarm fatigue, and the line itself the alert threshold.
A car alarm set too sensitive goes off for every passing cat, and soon nobody looks up. Pip has to set the line for a ward monitor that checks a perfectly stable patient 24 times a day. Every reading outside the line sounds the alarm.
Set the line too far out, though, and a patient who really is getting worse can stay inside it for longer. Choosing the line is a trade-off, and explaining that trade-off is what strong work does.