Lesson 5 of 7 · 16 min

The mean and standard deviation of p̂

Use E(p^)=pE(\hat{p}) = p and SD(p^)=p(1−p)/n\mathrm{SD}(\hat{p}) = \sqrt{p(1 - p)/n}, derive them from the binomial distribution, and work out how sample size and p control the spread.

What you will be able to do

  • State and use E(p^)=pE(\hat{p}) = p and SD(p^)=p(1−p)n\mathrm{SD}(\hat{p}) = \sqrt{\frac{p(1-p)}{n}}.
  • Derive both results from the mean and variance of the binomial distribution.
  • Explain and use the effect of nn and pp on the spread of p^\hat{p}, including finding the sample size for a required standard deviation.

In the simulator, the values of p^\hat{p} clustered around pp, and bigger samples gave tighter clusters. Here are the exact formulas behind both observations. They tell a pollster, before a single phone call, how far a poll of 1000 people is likely to land from the truth.

Key idea

Mean and standard deviation of the sample proportion

For random samples of size nn from a population with proportion pp,

E(p^)=pandSD(p^)=p(1−p)n.E(\hat{p}) = p \qquad\text{and}\qquad \mathrm{SD}(\hat{p}) = \sqrt{\frac{p(1-p)}{n}}.

The variance is Var(p^)=p(1−p)n\mathrm{Var}(\hat{p}) = \frac{p(1-p)}{n}.

Why these formulas are true

p^=1nX\hat{p} = \frac{1}{n}X with X∼Bin(n,p)X \sim \mathrm{Bin}(n, p), so E(X)=npE(X) = np and Var(X)=np(1−p)\mathrm{Var}(X) = np(1-p). Using E(aX)=aE(X)E(aX) = aE(X) and Var(aX)=a2 Var(X)\mathrm{Var}(aX) = a^2\,\mathrm{Var}(X) with a=1na = \frac{1}{n}:

E(p^)=1n×np=p,E(\hat{p}) = \frac{1}{n} \times np = p, Var(p^)=1n2×np(1−p)=p(1−p)n,\mathrm{Var}(\hat{p}) = \frac{1}{n^2} \times np(1-p) = \frac{p(1-p)}{n},

and the standard deviation is the square root of the variance.

The first result says p^\hat{p} is unbiased: on average over all possible samples it equals the true pp. Any one sample can still miss.

Random samples of 100 are taken from a population in which p=0.2p = 0.2. Calculate the standard deviation of p^\hat{p}.

Worked example

Mean and standard deviation of a poll's p̂

  • Simple familiar
  • Technology free

Suppose 36 % of voters in a federal electorate intend to vote for a particular party. A pollster surveys a random sample of 576 voters.

(a) Find the mean and standard deviation of the sample proportion p^\hat{p}.

(b) The pollster quadruples the sample size. Find the new standard deviation.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. E(p^)=pE(\hat{p}) = p.

  2. SD(p^)=p(1−p)/n\mathrm{SD}(\hat{p}) = \sqrt{p(1-p)/n}: multiply pp by 1−p1 - p, divide by nn, then take the square root.

Watch out for

  • Stopping at the variance, 0.0004.

  • Thinking that quadrupling nn divides the standard deviation by 4.

Interactive

How the spread depends on n and p

Here xx plays the role of pp, and the faint curve is n=100n = 100. For a fixed nn, which value of pp gives the largest standard deviation? Move nn to 400: what happens to the height of the curve?

Key idea

What controls the spread

  • Sample size. SD(p^)\mathrm{SD}(\hat{p}) is proportional to 1n\frac{1}{\sqrt{n}}. Multiplying nn by 4 halves the standard deviation; multiplying nn by 100 divides it by 10.
  • The proportion. p(1−p)p(1-p) is largest when p=0.5p = 0.5, where it equals 0.250.25. Proportions near 0 or 1 vary less. So for any nn, SD(p^)≤0.25n=12n\mathrm{SD}(\hat{p}) \le \sqrt{\frac{0.25}{n}} = \frac{1}{2\sqrt{n}}.

A survey company increases its sample size from 400 to 1600. What happens to the standard deviation of p^\hat{p}?

Choose one answer

Worked example

Choose a sample size for a required precision

  • Complex familiar
  • Technology free

A researcher plans a survey to estimate the proportion of Year 12 students who use a study app daily, and wants the standard deviation of p^\hat{p} to be at most 0.025.

(a) A previous study suggests p≈0.3p \approx 0.3. Find the smallest sample size that will do.

(b) Find the smallest sample size that will do whatever the value of pp.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Set p(1−p)/n≤\sqrt{p(1-p)/n} \le the required standard deviation.

  2. Square both sides and solve for nn.

  3. Round up to the next whole number if the answer isn't a whole number.

  4. If pp is unknown, use p=0.5p = 0.5, the worst case.

Watch out for

  • Forgetting to square 0.025.

  • Rounding a non-integer answer down, which gives a standard deviation slightly too big.

Common mistake

Three ways to lose the mark

  • Giving the variance p(1−p)n\frac{p(1-p)}{n} when the question asks for the standard deviation.
  • Using np(1−p)\sqrt{np(1-p)}, which is the standard deviation of the count XX, not the proportion.
  • Rounding the standard deviation early, then using the rounded value in later working. Keep it in your calculator.

When p=0.5p = 0.5, what sample size gives SD(p^)=0.02\mathrm{SD}(\hat{p}) = 0.02?

Summary

  • E(p^)=pE(\hat{p}) = p: on average, the sample proportion equals the population proportion.

  • SD(p^)=p(1−p)n\mathrm{SD}(\hat{p}) = \sqrt{\frac{p(1-p)}{n}} and Var(p^)=p(1−p)n\mathrm{Var}(\hat{p}) = \frac{p(1-p)}{n}.

  • Both follow from X∼Bin(n,p)X \sim \mathrm{Bin}(n, p) and p^=Xn\hat{p} = \frac{X}{n}.

  • Quadruple the sample size to halve the standard deviation.

  • For a given nn, the spread is greatest when p=0.5p = 0.5.

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 5 of 70% read

Save your progress with a free account