Before the method: the idea behind it
Putting a number on how much samples vary
Last lesson ended with a fact and no way to use it: different random samples give different results. This lesson turns that vague warning into two exact formulas and one remarkable shape. Once you have them, a single sample can tell you not just an estimate but how far wrong that estimate is likely to be, which is what the whole of statistical inference rests on.
Part one
The sample proportion is itself a random variable
This is the shift in thinking that makes everything else work.
Take a sample of n people and count how many have some characteristic. That count, call it X, is binomial: n independent trials, each a success with probability p. You know its mean is np and its variance is np(1 − p).
Now divide by n to get the proportion. Because the count is random, the proportion is random too. So \(\hat{p}=\dfrac{X}{n}\) is not just a number you computed, it is a random variable with its own distribution, its own mean and its own standard deviation. That distribution is called the sampling distribution of the sample proportion.
And since \(\hat{p}\) is just X multiplied by the constant 1/n, the linear-change rules from the discrete lesson give both results immediately.
\(\text{Var}(\hat{p})=\text{Var}\!\left(\dfrac{1}{n}X\right)=\dfrac{1}{n^2}\text{Var}(X)=\dfrac{np(1-p)}{n^2}=\dfrac{p(1-p)}{n}\)
Look at what the first line says. On average, across all possible samples, the sample proportion equals the population proportion exactly. It does not systematically overshoot or undershoot. A statistic with this property is called unbiased, and it is the mathematical justification for using \(\hat{p}\) as an estimate at all.
The second line is the one that lets you control accuracy. The n in the denominator means that increasing the sample size shrinks the variance, and as n grows without limit the variance approaches zero: with a large enough sample, nearly every sample proportion lands very close to p.
Note the square root. To halve the standard deviation you must quadruple the sample size, not double it. That single fact governs the cost of every survey ever commissioned: doubling your accuracy costs four times as much.
Part two
The shape, and where it comes from
Knowing the centre and spread is not enough. To compute probabilities you need the shape as well.
Below is the actual distribution of \(\hat{p}\) for a given p and n, computed exactly from the binomial. Change the sliders and watch what happens to the shape.
The teal bar below the axis shows one standard deviation either side of the mean.
Two things should be visible. As n increases the distribution narrows, exactly as the formula predicts. And as n increases the shape becomes smooth and symmetric: the red normal curve, drawn with the mean and standard deviation from Part one, fits it more and more closely.
That convergence is the central limit theorem at work, and it is what makes the whole topic practical: it means you can answer questions about \(\hat{p}\) using the normal distribution you learned last topic.
When is n large enough? Push p towards 0 or 1 in the explorer above with a small n and watch the shape go badly lopsided, with the normal curve fitting poorly and even extending below zero. The usual check is that both np ≥ 10 and n(1 − p) ≥ 10, meaning you expect at least 10 successes and at least 10 failures. An equivalent check: three standard deviations either side of p should stay inside the interval from 0 to 1, since a proportion cannot be negative or exceed 1.
Part three
When you don’t know p, which is nearly always
There is a circularity in the formulas so far. The standard deviation depends on p, but p is the very thing you don’t know.
The practical resolution is to use your sample’s own proportion in its place. Having observed \(\hat{p}\), treat it as a point estimate for p and substitute it into the formula. The result is the standard deviation you can actually compute from data.
Watch which form a question needs. If the population proportion is stated, use p. If you are only given sample data, use \(\hat{p}\). Exam questions deliberately include both kinds, and the phrase “it is known that” usually signals the first.
A point estimate is a single number offered as the best guess for a parameter. Its weakness is that it carries no indication of how good a guess it is: 0.28 from a sample of 20 and 0.28 from a sample of 2000 look identical but deserve very different levels of trust. Attaching that missing information is what the next lesson does, and the standard deviation you now know how to compute is exactly the ingredient it needs.
Where this shows up in real life
Why polls use about 1000 people
With n = 1000 and p near 0.5, the standard deviation of p is about 0.016, so results are typically within about 3 percentage points of the truth. Going to 4000 people would only halve that, at four times the cost, which is why almost every national poll lands near a thousand respondents.
Medical trials and sample size
Before a trial begins, researchers use this formula in reverse: they decide how precise the result must be, then solve for the number of patients required. Recruiting too few makes the trial incapable of detecting a real effect, which is both wasteful and unethical.
Before you start
What to reach for
| The question asks for… | Use |
|---|---|
| the sample proportion from data | p = count ÷ sample size |
| E(p), Var(p) or SD(p) with p known | p, p(1−p)/n, and its square root |
| the same with p unknown | Substitute p for p throughout |
| whether the normal model applies | Check np ≥ 10 and n(1−p) ≥ 10 |
| a probability about p | Normal with mean p and SD √(p(1−p)/n) |
| the sample size for a required accuracy | Set SD(p) ≤ target and solve for n, rounding up |
Next: the working method, twenty practice questions, ten harder ones, and the ClassPad guide including how to simulate a sampling distribution.