Sampling distribution and confidence interval for a proportion
How sample proportions vary from sample to sample, the mean and standard deviation of p-hat, when the normal model applies, the standard error, the 95% confidence interval p-hat plus or minus 2 SE, its frequency interpretation, the margin of error and the sample size needed for a given precision.
Textbook: Ch. 10 (third edition: ch. 9) · Sessions: Module 9, lectures 11 and 12, tutorial 11 · About 70 minutes
The sampling distribution of a proportionImportant
Think of the population as a box with tickets marked "success" (a share p) and "failure". A random sample of n tickets gives a sample proportion p̂ = X/n, where X is the number of successes. Another sample gives another p̂. The distribution of p̂ over all possible samples is its sampling distribution.
Because X is binomial with mean np and SD √(np(1 − p)), dividing by n (the aX rule of chapter 6) gives:
When the sample is large enough, p̂ is approximately normal. Check two conditions: independence (a random sample, and less than 10% of the population) and the success/failure condition (np ≥ 10 and n(1 − p) ≥ 10; with p unknown, use the observed numbers of successes and failures).
Loyalty card holders
30% of a supermarket's customers hold a loyalty card. Samples of 500 customers are drawn.
Conditions
Centre and spread
68-95-99.7
A range
A sample with 26% card holders would be unusual but not shocking; one with 22% would be very surprising if p really is 0.30.
The confidence interval for a proportionImportant
In practice p is unknown, so we estimate SD(p̂) with the sample proportion. This estimate is the standard error:
Since about 95% of all p̂ values lie within 2 SDs of p, an interval of 2 SEs around p̂ will contain p for about 95% of samples. The formula sheet gives the approximate 95% confidence interval:
The part after ± is the margin of error ME. Other confidence levels use another critical value z*: 1.645 for 90%, 1.96 for 95% (the exact value that the TI-84 uses in 1-PropZInt), 2.576 for 99%. A higher confidence level gives a wider interval.
Does a majority prefer the new logo?
In a random sample of 600 customers, 318 prefer a new logo.
Givens
Conditions
Estimate
Standard error
Margin of error
Interval
We are about 95% confident that between 48.9% and 57.1% of all customers prefer the new logo. Because 50% lies inside the interval, the data do not show that a majority prefers it.
What "95% confident" meansImportant
The frequency interpretation: if we took many random samples and built an interval from each in the same way, about 95% of those intervals would contain the true proportion p. The 95% describes the method. A single computed interval either contains p or does not; we just do not know which.
A sketch helps on the exam: draw a horizontal line at the true p and below it a stack of intervals from different samples; most cross the line, a few (about 1 in 20) miss it.
Margin of error and sample sizeImportant
The margin of error shrinks with the square root of n: to halve ME you need four times as many observations. Solving ME = z* √(p(1 − p)/n) for n gives the sample size needed for a chosen precision:
If you have no idea of p, use p = 0.5: p(1 − p) is then as large as possible, so the sample is large enough whatever the true p.
Planning a poll
A polling firm wants a 95% margin of error of at most 3 percentage points; and a client asks what 4 points at 90% would need.
95%, z* = 2, ME = 0.03
90%, z* = 1.645, ME = 0.04
Always round up. The population size does not enter the formula: the same sample size works for a city or a country.
Key takeaways
- E(p̂) = p and SD(p̂) = √(p(1 − p)/n).
- Normal model if random, under 10% of the population, and at least 10 successes and 10 failures.
- SE(p̂) = √(p̂(1 − p̂)/n).
- 95% interval: p̂ ± 2 SE (TI-84: 1-PropZInt uses 1.96).
- 95% confidence refers to the method: 95% of such intervals capture p.
- n = z*2p(1 − p)/ME2, rounded up; p = 0.5 if unknown.
Multiple choice (9)
200 students are asked; 70 work while studying. SE(p̂) is about...
Same data: the approximate 95% interval (z* = 2) is...
p = 0.54 and n = 400. SD(p̂) is about...
Which change makes a confidence interval narrower?
A 95% interval for p is [0.41, 0.47]. Which statement is correct?
Needed n for ME = 0.02 at 95% (z* = 2) with p unknown?
A sample has 6 successes out of 80. Can you use p̂ ± 2SE?
To cut the margin of error from 6 to 3 points you need...
A poll gives p̂ = 0.52 with ME = 0.03. Does a majority support the plan?
Exam-style open questions (2)
Full interval question
240 randomly chosen students are asked whether they have a side job; 84 say yes. (a) Give p̂. (b) Give its standard error. (c) Build a 95% interval (z* = 1.96) and check it with the TI-84. (d) Explain "95% confident" to a manager.
Show the worked outline
- (a) p̂ = 84/240 = 0.35. Conditions: 84 and 156 are both at least 10.
- (b) SE = √(0.35 × 0.65/240) ≈ 0.0308.
- (c) 0.35 ± 1.96 × 0.0308 = 0.35 ± 0.060, from 0.290 to 0.410; 1-PropZInt with x = 84, n = 240 gives the same.
- (d) If we repeated the survey many times and built an interval each time, about 95% of them would contain the true share of students with a side job.
Sample size
A bank wants to estimate the share of clients who use mobile payments within 2.5 percentage points with 95% confidence (z* = 2). Last year the share was about 70%. How many clients should it sample, and how many without that prior knowledge?
Show the worked outline
- With p = 0.7: n = 4 × 0.21/0.000625 = 1,344.
- With p = 0.5: n = 4 × 0.25/0.000625 = 1,600.
- The prior guess saves 256 interviews, but only if the share is still near 70%.
LabSampling distribution lab
Compare n = 25, 500 and 2000 to see the spread shrink.
LabConfidence interval for a proportion
The default numbers are the logo example.
LabSample size planner
Always rounded up.