Confidence Intervals for a Proportion
Opinion polls, quality checks and medical trials usually measure a proportion rather than a mean: the fraction of voters who support a policy, of components that are faulty, of patients who recover. A large random sample gives a sample proportion, and the same reasoning that produced confidence intervals for a mean turns it into an approximate confidence interval for the population proportion. On Paper 6 this appears as a short question or as one part of a longer one: calculate the interval, find a sample size for a required margin of error, recover the sample from an interval, or interpret the result.
The sample proportion
Suppose a proportion of a population has some property. A random sample of size is taken, and of the sampled members have the property. Then , and the sample proportion is
Its mean and variance follow from the binomial:
So is an unbiased estimator of . For large , the binomial is approximately normal (as in the normal approximation to the binomial), and therefore so is .
For a large random sample,
This result is in the formula booklet.
Building the interval
Follow the same steps as for a mean. With probability about ,
Rearranging would put in the middle, but also appears inside the square root, and is what we do not know. For a large sample, the observed proportion is close to , so it is used in its place to estimate the standard deviation. This is the second reason the interval is only approximate.
If of a large random sample of size have the property, and , then an approximate confidence interval for is
with for .
The margin of error is , half the width of the interval.
The interval is approximate for two reasons: the normal distribution only approximates the binomial, and is used in place of in the variance. Both errors shrink as grows, which is why the syllabus specifies a large sample. A useful check is that and should both be comfortably greater than .
There is no continuity correction in a confidence interval for a proportion. The correction is used when finding a probability for a single count, not here.
- Calculate , where is the sample size and the number with the property.
- Calculate and keep at least 4 significant figures.
- Choose for the confidence level.
- Calculate the margin of error and write the interval to 3 significant figures.
- If the question is about a number in a population of size , multiply both ends by .
In a random sample of residents of a town, say that they cycle to work. Find an approximate confidence interval for the proportion of all residents who cycle to work.
Solution
The interval is .
A quality check finds faulty items in a random sample of items from a production line. Find an approximate confidence interval for the proportion of faulty items produced.
Solution
The interval is .
Check the size condition: and , both well above .
Choosing the sample size
Pollsters usually decide the margin of error first and then work out how many people to ask. Setting the margin of error equal to the target gives
This needs a value for before the survey is done. There are two choices.
- Use an estimate of from a pilot survey or from past data.
- If nothing is known, use . The product is largest when , as the graph shows, so this gives the largest that could be needed: a safe answer whatever the true proportion.
A poll is planned to estimate the proportion of voters who support a proposal, with an approximate confidence interval.
(a) Find the smallest sample size that guarantees a margin of error of at most , whatever the true proportion.
(b) Find the smallest sample size needed if it is known from past polls that the proportion is about .
Solution
(a) Use , which gives the widest possible interval.
The smallest sample size is .
(b) With :
The smallest sample size is . Prior knowledge that is far from saves a lot of interviews.
Interpreting the interval
The interpretation is the same as for a mean. If many random samples were taken and an interval calculated from each in the same way, about of the intervals would contain the true proportion . A particular interval either contains or it does not.
A claimed value of that lies outside the interval is evidence against the claim at the corresponding level; a claimed value inside the interval is consistent with the data. Formal tests of a claimed proportion are covered in hypothesis tests for a binomial proportion.
An approximate confidence interval for a population proportion, calculated from a random sample of people, is . Find the number of people in the sample who had the property.
Solution
The interval is centred on :
The number with the property is .
Check the half-width: , which matches .
An approximate confidence interval for the proportion of left-handed students in a large school is .
(a) Find the sample size and the number of left-handed students in the sample.
(b) From the same sample, an approximate confidence interval is calculated, and its width is . Find .
(c) Comment on a claim that of the students in the school are left-handed.
Solution
(a) The centre gives , and the margin of error is .
The number of left-handed students is .
(b) The margin of error is , so
, so each tail contains , and the level is . So .
(c) lies below the confidence interval, so the sample suggests the claim is wrong and that the proportion of left-handed students is greater than .
- Using the count instead of the proportion. is a number between and . Putting into gives nonsense.
- Confusing the sample size with the count. In , is the number sampled, not the number with the property.
- Adding a continuity correction. Confidence intervals for proportions do not use one.
- Using a one-tailed . needs , not .
- Rounding a sample size down. It must satisfy an inequality: always round up.
- Using when the question gives a prior value for planning. In sample-size questions, use the value of stated in the question, or if none is given and the answer must work for any .
- Interpreting the interval as a probability statement about . is fixed; the describes the method.
- Show , the expression with numbers in, and the final interval. Each typically earns a mark.
- Give the endpoints to 3 significant figures. Percentages are acceptable if the question uses them, but do not mix the two.
- Questions often say "approximate" confidence interval. If asked why it is approximate, give either reason: a normal approximation to the binomial is used, or the sample proportion is used in place of the population proportion in the variance.
- If asked for an interval for the number in a population of size , multiply the proportion interval by and round sensibly.
- "Comment on the claim" questions: say whether the claimed value lies inside or outside the interval and what that suggests, in context. Avoid "proves".
- is an unbiased estimate of the population proportion .
- For large , approximately.
- Approximate confidence interval: .
- Margin of error ; the interval's centre is .
- Sample size for margin : , using if nothing is known.
- The interval is approximate: normal approximation, and replaces .
- No continuity correction. Round sample sizes up.
Practice questions
- In a random sample of seeds, fail to germinate. Find an approximate confidence interval for the proportion of seeds that fail to germinate.
- In a random sample of voters, support a proposal. Find an approximate confidence interval for the proportion of all voters who support it.
- A company wants an approximate confidence interval for the proportion of customers who are dissatisfied, with a margin of error of at most . Past surveys suggest the proportion is about . Find the smallest sample size needed.
- An approximate confidence interval for a proportion is . Find the sample size and the number in the sample with the property.
- Give two reasons why a confidence interval for a proportion calculated by the method in this note is only approximate.
- A town has households. In a random sample of households, own a dog. Find an approximate confidence interval for the number of households in the town that own a dog.
- A newspaper claims that of the residents of a town cycle to work. A random sample of residents found that cycle to work. Use an approximate confidence interval to comment on the claim.
- A market researcher wants to estimate the proportion of people who would buy a new product. A pilot survey of randomly chosen people finds that would buy it. (a) Find an approximate confidence interval for the proportion, based on the pilot survey. (b) Using the pilot estimate, find the smallest total sample size that would give a confidence interval with a margin of error of at most . (c) Explain why the researcher might prefer to base the sample size on a proportion of instead, and state the disadvantage of doing so.
Answers
-
; ; , giving .
-
; ; , giving .
-
. The smallest sample size is .
-
Centre , margin . . The number with the property is .
-
The normal distribution is used as an approximation to the binomial distribution of the number with the property. The sample proportion is used in place of the unknown population proportion in the variance .
-
; ; , giving . Multiply by : approximately households.
-
and the interval is (see the first example). lies above the interval, so the sample suggests the claim is wrong: the proportion who cycle to work appears to be less than .
-
(a) ; ; , giving to 3 s.f. (b) , so people. (c) The pilot estimate is itself uncertain (its interval reaches nearly ). If the true proportion is closer to , people would not achieve the required margin. Using guarantees the margin whatever the proportion. The disadvantage is cost: it needs , almost twice as many people.