Step 12: Inference for One Proportion
- A sample proportion \( \hat{p} \) estimates an unknown population proportion \( p \). Inference tells you how far you can trust it.
- Confidence interval: \( \hat{p} \pm z^*\sqrt{\hat{p}(1-\hat{p})/n} \). Significance test: \( z = (\hat{p}-p_0)\big/\sqrt{p_0(1-p_0)/n} \).
- Check three conditions first: Random, 10% (\( n \le 0.1N \)) and Large Counts (at least 10 successes and 10 failures).
- Every AP answer follows four steps: State, Plan, Do, Conclude, with the conclusion written in context.
The idea: from a sample to the whole population
Suppose a college has 6,000 students and you want to know what proportion use a revision app. Asking everyone is slow, so you ask a random sample of 400 students, and 248 say yes. Your sample proportion is \( \hat{p} = 248/400 = 0.62 \).
But a different random sample of 400 would give a slightly different answer, perhaps 0.59 or 0.64. So 0.62 is a good guess at the true proportion \( p \), but almost certainly not exactly right. Inference gives two tools for handling this uncertainty:
- A confidence interval answers “what values of \( p \) are plausible?”
- A significance test answers “is a claimed value of \( p \) believable, given my data?”
The conditions you must check
Both procedures rely on the sampling distribution of \( \hat{p} \) being approximately Normal with a standard deviation we can calculate. That is only true if three conditions hold.
- Random. The data come from a random sample from the population (or a randomised experiment). Without this, you cannot generalise at all.
- 10% condition. When sampling without replacement, the sample size must be no more than 10% of the population: \( n \le 0.1N \). This makes individual observations close enough to independent for the standard deviation formula to work.
- Large Counts. The expected numbers of successes and failures must both be at least 10, so the sampling distribution is approximately Normal.
- For a confidence interval, use the sample: \( n\hat{p} \ge 10 \) and \( n(1-\hat{p}) \ge 10 \).
- For a significance test, use the claimed value: \( np_0 \ge 10 \) and \( n(1-p_0) \ge 10 \).
One-sample z-interval for a proportion
A confidence interval has the shape point estimate ± margin of error. The margin of error is a critical value times the standard error of \( \hat{p} \).
The critical value \( z^* \) depends on the confidence level:
| Confidence level | 90% | 95% | 99% |
|---|---|---|---|
| \( z^* \) | 1.645 | 1.960 | 2.576 |
Higher confidence means a larger \( z^* \) and so a wider interval. A larger sample size means a smaller standard error and so a narrower interval.
What the interval and the confidence level mean
These two interpretations are tested every year, so learn the wording.
- Interpreting the interval: “We are 95% confident that the interval from 0.572 to 0.668 captures the true proportion of all students at this college who use a revision app.”
- Interpreting the confidence level: “If we took many random samples of the same size and built a 95% confidence interval from each, about 95% of those intervals would capture the true proportion.”
The confidence level describes the method, not one particular interval. Once you have calculated an interval, it either contains \( p \) or it does not; you just do not know which.
Worked example: State, Plan, Do, Conclude
In a random sample of 400 students from a college of 6,000, 248 said they use a revision app. Construct and interpret a 95% confidence interval for the proportion of all students at the college who use a revision app.
In words: somewhere between about 57% and 67% of the college’s students use a revision app. Notice that each condition was checked with numbers, not just named; that is what earns the Plan mark.
Choosing a sample size
Before collecting data, you can choose \( n \) so the margin of error is no bigger than a target \( ME \). Solve
Here \( p^* \) is a guess for the proportion from a previous study. If you have no guess, use \( p^* = 0.5 \): it gives the largest possible value of \( p^*(1-p^*) = 0.25 \), so the sample is guaranteed to be big enough. Always round up to the next whole number.
A pollster wants a 95% confidence interval with a margin of error of at most 3 percentage points. How many people should she survey?
She needs at least 1,068 people. Rounding down to 1,067 would give a margin of error slightly above 3 points.
One-sample z-test for a proportion
Now suppose someone makes a claim: “25% of students at our school walk to school.” You doubt it and think the true proportion is higher. A significance test checks whether your data give convincing evidence against the claim.
- The null hypothesis \( H_0: p = p_0 \) is the claim being tested (here \( p_0 = 0.25 \)).
- The alternative hypothesis \( H_a \) is what you suspect: \( p > p_0 \), \( p < p_0 \) (one-sided) or \( p \ne p_0 \) (two-sided). Decide it before looking at the data.
The test statistic measures how many standard deviations \( \hat{p} \) is from \( p_0 \), assuming \( H_0 \) is true:
The p-value is the probability, assuming \( H_0 \) is true, of getting a sample proportion at least as extreme as the one observed (in the direction of \( H_a \)). For a two-sided test, double the one-tail area.
Compare the p-value with the significance level \( \alpha \) (usually 0.05). If p-value < \( \alpha \), reject \( H_0 \): you have convincing evidence for \( H_a \). If p-value ≥ \( \alpha \), fail to reject \( H_0 \): you do not have convincing evidence for \( H_a \). Never say you “accept \( H_0 \)” or “prove” anything.
A headteacher claims that 25% of the school’s 2,500 students walk to school. In a random sample of 200 students, 62 walk. Do these data give convincing evidence at \( \alpha = 0.05 \) that more than 25% of students walk?
What the p-value means: if really only 25% of students walked, there would be about a 2.5% chance of getting a sample proportion of 0.31 or higher just by chance. That is unlikely enough to doubt the claim.
Confidence intervals and two-sided tests agree: a two-sided test at \( \alpha = 0.05 \) rejects \( H_0: p = p_0 \) roughly when \( p_0 \) lies outside the 95% confidence interval (the match is not exact for proportions, because the interval uses \( \hat{p} \) and the test uses \( p_0 \) in the standard deviation).
Practise: 6 questions
Try each one on paper first, then check the worked answer.
EasyQ1. A random sample of 80 phones from a large shipment finds 8 faulty ones. Is the Large Counts condition met for a confidence interval? Show worked answer
EasyQ2. A company claims that 90% of its customers are satisfied. A consumer group suspects the true figure is lower. Write the hypotheses. Show worked answer
MediumQ3. In a random sample of 250 adults from a large city, 90 say they cycle to work at least once a week. Construct a 90% confidence interval for the true proportion. Show worked answer
MediumQ4. How large a sample is needed for a 99% confidence interval with a margin of error of at most 0.04, with no prior estimate of \( p \)? Show worked answer
MediumQ5. A 95% confidence interval for a proportion is (0.48, 0.56). (a) Find \( \hat{p} \) and the margin of error. (b) A student says, “There is a 95% chance that \( p \) is between 0.48 and 0.56.” Explain the error. Show worked answer
ExamQ6. A college says 60% of its students have a part-time job. In a random sample of 150 of its 4,000 students, 81 have a part-time job. Is there convincing evidence at \( \alpha = 0.05 \) that the true proportion is different from 60%? [6 marks] Show worked answer
Check yourself
1. For a significance test about \( p \), which values do you use to check Large Counts?
2. Keeping everything else the same, what happens to a confidence interval when you change from 95% to 99% confidence?
3. A test gives a p-value of 0.18 with \( \alpha = 0.05 \). The correct conclusion is:
Your score: 0 out of 3
The short version
- Check Random, 10% (\( n \le 0.1N \)) and Large Counts before any inference: use \( \hat{p} \) for intervals and \( p_0 \) for tests.
- Interval: \( \hat{p} \pm z^*\sqrt{\hat{p}(1-\hat{p})/n} \), with \( z^* \) = 1.645, 1.960 or 2.576 for 90%, 95% or 99%.
- “95% confident” describes the method: about 95% of such intervals capture \( p \).
- Sample size: \( n \ge (z^*/ME)^2 p^*(1-p^*) \), using \( p^* = 0.5 \) if unsure, and always round up.
- Test: \( z = (\hat{p}-p_0)/\sqrt{p_0(1-p_0)/n} \); compare the p-value with \( \alpha \) and conclude in context with State, Plan, Do, Conclude.
Further reading on EconTutorials
Older in-depth articles on this topic from our blog:
