c. Putting It All Together
Topic 3 so far:
We have all the tools — time to apply them.
Today’s plan:
Priority isn’t just the steps (you’ve seen those) — it’s the why behind each one.
Rothamsted Experimental Station, England, 1920s. Over afternoon tea, Muriel Bristol claims she can tell whether the milk was poured into the cup before or after the tea.
Sitting across from her, Ronald Fisher designs an experiment on the spot: brew 8 cups — some milk-first, some tea-first — and ask her to identify which is which.
We’ll work a slightly simpler version: flip a coin for each of 12 cups to decide milk-first or tea-first.
Result: she gets 9 of 12 correct.
The question: Is she really better than guessing — or just a lucky run?
The question — “could she be guessing and just got lucky?” — is hard to answer with intuition alone.
A hypothesis test gives us a structured way to ask:
How often would pure guessing produce a result this good or better?
Let p = the lady’s true probability of correctly identifying a cup.
H_0 is the skeptical default — what we assume unless the data force us otherwise.
H_A is the claim Fisher set out to test. One-sided because he only cared whether she’s better than chance, not worse.
If H_0 is true (lady is guessing), each cup is essentially a coin flip — half a chance she’s right.
But how many of 12 would she get right? Depends on luck:
Simulation will give us the full distribution.
We’ve simulated with spinners and random integers. For a 50/50 outcome, any of these would work:
50/50 spinner
fair coin
random 1 or 2
The most natural tool is a coin. Let’s dig into how that works.
For the lady tasting tea:
Repeat many times → many simulated \hat{p} values → the null distribution.
We pretend H_0 is true and run 1000 simulated trials of 12 cups each (1000 sets of 12 coin flips), calculating \hat{p} for each.
This gives us the null distribution. Notice it clusters around \hat{p} = 0.5.
Her observed \hat{p} = 9/12 = 0.75. (red dashed line). Pink bars = guessing-trials that did as well or better. Now we can calculate how rare her result would be if she is guessing.
The p-value is the fraction of simulations at or above her observed \hat{p} = 0.75 — a direct measure of how rare.
From our 1000 simulations: 76 of 1000 were that high.
\text{P-value} \approx \frac{76}{1000} = 0.076
In words: if she’s truly guessing, she’d get 9 or more right about 8% of the time.
Not extremely rare — but not common either.
To decide, we need a standard — we’ll use \alpha = 0.05.
At this significance level we fail to reject H_0.
The data don’t provide convincing evidence that the lady can tell the difference.
But careful — that does not mean she’s guessing. Failing to reject just means we lack strong evidence either way.
The story goes that Muriel Bristol identified all 8 cups correctly.
Fisher’s real design tied the cups to one another in a way ours doesn’t, so his p-value is computed differently — but it comes out to about 0.014.
Below \alpha = 0.05, so that result would have been convincing — unlike the borderline 9-of-12 we just worked through.
There’s nothing magical about the 0.05 cutoff — Fisher picked it as a rough heuristic in the 1920s, and we’ve used it since.
Modern thinking moves away from a single threshold toward describing the strength of evidence as a continuum:
A p-value of 0.049 vs. 0.051 isn’t meaningfully different — but a strict cutoff treats them as opposites.
In 3b we saw: an observed \hat{p} further from the value H_0 predicts → smaller p-value → stronger evidence.
But there’s another factor — sample size. Going back to our 9-of-12 case (75% accuracy): what if she’d been tested on more cups instead of 12?
| n | \hat{p} | p-value |
|---|---|---|
| 12 | 0.75 | ~0.076 (borderline) |
| 60 | 0.75 | ~0.0001 (decisive) |
Same observed proportion — much stronger evidence. Why?
Suppose the observed \hat{p} = 0.60, testing H_0: p = 0.50 vs H_A: p > 0.50. Click through to see the null distribution change as n grows.
Intuition: larger samples are less noisy.
With only 20 flips, 60% heads is plausible even from a fair coin — there’s a lot of random wobble in small samples.
With 500 flips, 60% from a fair coin would be extraordinary — large samples settle close to the true rate, so an extreme reading carries real signal.
Same observed proportion — very different evidence.
The strength of evidence against H_0 depends on:
With the same observed \hat{p}, a larger sample produces a narrower null distribution — putting the observed value further into the tail and shrinking the p-value.
Three pairs of researchers, each testing H_0: p = 0.5 vs H_A: p > 0.5 on a possibly-biased coin. For each pair, decide whose result is stronger evidence — then advance to check.
Pair 1. Avery (n = 20, \hat{p} = 0.65) vs. Cam (n = 100, \hat{p} = 0.65)
Cam. Same effect, larger n — narrower null distribution puts \hat{p} = 0.65 further into the tail.
Pair 2. Dana (n = 100, \hat{p} = 0.55) vs. Ellis (n = 100, \hat{p} = 0.65)
Ellis. Same n, larger effect — \hat{p} = 0.65 is further from 0.5 than \hat{p} = 0.55.
Pair 3. Avery (n = 20, \hat{p} = 0.65) vs. Blake (n = 200, \hat{p} = 0.55)
Not obvious! Avery’s effect is bigger but n is small; Blake’s effect is smaller but n is large. The two factors push opposite ways — we need to see the null distributions to decide. (Next slide.)
Avery (n = 20, \hat{p} = 0.65)
Blake (n = 200, \hat{p} = 0.55)
Blake has stronger evidence — even with the smaller effect. The larger n narrowed his null distribution enough that \hat{p} = 0.55 reaches further into the tail than Avery’s \hat{p} = 0.65.