Mistake Master
Setting Up a Test for a Population Proportion
Every Rule in the Setup Is a Promise About How Often You Are Wrong
You'll learnwhy both hypotheses are claims about the parameter and never about the sample, where the alternative's direction comes from, why the conditions and the standard error use the hypothesized proportion, what the significance level is committing to — and what each of those rules costs in false alarms when it is broken after the data arrive.
A company says 40% of its customers renew. A manager thinks it is lower, surveys 250 of them, and 88 renew — a sample proportion of 0.352. Setting up the test means writing four things down before any of that arithmetic happens, and those four rules sound like manners. This page prices them instead. Under a claim that is exactly true, a one-sided test at the 5% level cries wolf 5.24% of the time, as advertised; let the sample decide which tail to use and the same test cries wolf 10.64% of the time, under the same 5% label. And this survey's p-value is 0.0607, which sits between the two most common levels, so a level chosen afterwards picks the verdict by itself. Twelve short steps; press Next for each one.
Read all 12 steps as text
What the company’s claim would look like
A company says 40% of its customers renew, and that one claim decides the whole shape on screen: every survey of 250 customers it could produce, each with its own exact chance.
The real survey came back low
A manager surveys 250 randomly chosen customers and 88 of them renew, so the survey's own proportion is 0.352 — below the claim, but not off the picture.
A hypothesis is about p, never about p-hat
Both hypotheses are claims about the parameter — \(H_0: p = 0.40\) against \(H_a: p < 0.40\), where \(p\) is the share of all the company's customers who renew — and a hypothesis written with a hat tests a number the data have already handed over.
The question picks the tail, and picks it first
"Is the rate lower?" gives \(H_a: p < p_0\); "higher?" gives \(>\); "changed either way?" gives \(\ne\) — and the manager suspected lower before collecting anything, so the shaded left tail is what this test agreed in advance to be surprised by.
No direction named? Then both tails
When the question names no direction, or a change either way would matter, the alternative is two-sided: the same 5% is split between the two ends, and the p-value doubles — which is the price of having been open to two answers, not a penalty.
Let the data pick the tail and you pay twice
Suppose the direction is chosen after the sample is seen: whichever tail it fell into becomes the alternative, and the one-sided arithmetic proceeds at \(\alpha = 0.05\). The red region is what that rule actually uses — both tails, each cut at the one-sided value — and on a claim that is exactly true it fires 10.64% of the time while the write-up still says 5%.
The spread comes from the claim too
Every curve on this page was drawn assuming \(p = 0.40\), so the standard error the test uses is \(\sqrt{p_0(1-p_0)/n} = 0.0310\); an interval, which assumes no value of \(p\), uses the sample's own \(\sqrt{\hat{p}(1-\hat{p})/n} = 0.0302\) instead.
Check the counts with the claim’s number
Every square is one surveyed customer, and the blue ones are the 100 the claim says would renew: \(np_0 = 250(0.40) = 100\) and \(n(1-p_0) = 250(0.60) = 150\), both far past 10, which is what licenses the curve every other beat is measured against.
How unusual is this survey, exactly?
Shade every survey the claim could produce that is at or below the one that actually happened: that amber area is 0.0607 of the whole curve, and the exact enumeration of all 251 outcomes puts it at 0.0680.
One p-value, two verdicts
The significance level \(\alpha\) is the decision rule — reject \(H_0\) when the p-value falls below it — and this p-value of 0.0607 sits above 0.05 and below 0.10, so choosing the level after seeing it is not picking a standard but picking an answer.
The whole setup is four lines
Here is the entire setup, and every line of it could have been written the moment the manager decided to survey — before a single response arrived.
Decide the picture first, then read the data
The setup is a promise about how often the test cries wolf, and it can only be a promise if it is made first: the direction fixed by the question, the level fixed beside it, the conditions computed from \(p_0\), and the parameter named in a sentence about real customers.