Instant PDF download, name-and-email checkout. Complete bundle: every Economics and Statistics book
Statistics guide, Unit 3, step 12 of 22Previous stepNext step

Step 12: Inference for One Proportion

SyllabusAP Stats 3.3–3.7
In 30 seconds
  • 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.
Video lesson coming soonA short animated lesson for this step will appear here.

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?”
Key termParameter and statistic: the population proportion \( p \) is a parameter (a fixed but usually unknown number); the sample proportion \( \hat{p} \) is a statistic (calculated from the sample, and it varies from sample to sample).

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.

  1. Random. The data come from a random sample from the population (or a randomised experiment). Without this, you cannot generalise at all.
  2. 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.
  3. 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 \).
Common mistakeUsing \( \hat{p} \) to check Large Counts in a test, or \( p_0 \) in an interval. In a test, you assume \( H_0 \) is true, so everything (conditions and standard deviation) uses \( p_0 \). In an interval there is no \( p_0 \), so you use \( \hat{p} \).

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} \).

\[ \hat{p} \pm z^* \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \]

The critical value \( z^* \) depends on the confidence level:

Confidence level90%95%99%
\( z^* \)1.6451.9602.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.

Common mistakeSaying “there is a 95% probability that \( p \) is between 0.572 and 0.668” or “95% of students are between 0.572 and 0.668”. Both are wrong. \( p \) is fixed; it is the interval that varies from sample to sample.

Worked example: State, Plan, Do, Conclude

Worked example

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.

StateWe want to estimate \( p \) = the true proportion of all 6,000 students at this college who use a revision app, with 95% confidence.
PlanOne-sample z-interval for \( p \). Random: random sample of students. 10%: \( 400 \le 0.1(6000) = 600 \). (met) Large Counts: \( n\hat{p} = 248 \ge 10 \) and \( n(1-\hat{p}) = 152 \ge 10 \). (met)
Do\( \hat{p} = \dfrac{248}{400} = 0.62 \). Standard error \( = \sqrt{\dfrac{0.62 \times 0.38}{400}} = \sqrt{0.000589} \approx 0.02427 \). Margin of error \( = 1.960 \times 0.02427 \approx 0.0476 \). Interval: \( 0.62 \pm 0.0476 = (0.572,\ 0.668) \).
ConcludeWe 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.

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

\[ z^*\sqrt{\frac{p^*(1-p^*)}{n}} \le ME \quad\Longrightarrow\quad n \ge \left(\frac{z^*}{ME}\right)^2 p^*(1-p^*) \]

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.

Worked example

A pollster wants a 95% confidence interval with a margin of error of at most 3 percentage points. How many people should she survey?

Step 1No previous estimate, so use \( p^* = 0.5 \); \( z^* = 1.960 \); \( ME = 0.03 \).
Step 2\( n \ge \left(\dfrac{1.960}{0.03}\right)^2 (0.5)(0.5) = (65.33)^2 \times 0.25 \approx 1067.1 \)
Step 3Round up: \( n = 1068 \).

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:

\[ z = \frac{\hat{p} – p_0}{\sqrt{\dfrac{p_0(1-p_0)}{n}}} \]

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.

Key termp-value: the probability of getting evidence for \( H_a \) as strong as or stronger than the observed result, assuming \( H_0 \) is true. Small p-values are evidence against \( H_0 \).

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.

Worked example

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?

State\( H_0: p = 0.25 \), \( H_a: p > 0.25 \), where \( p \) is the true proportion of all students at the school who walk to school. Use \( \alpha = 0.05 \).
PlanOne-sample z-test for \( p \). Random: random sample. (met) 10%: \( 200 \le 0.1(2500) = 250 \). (met) Large Counts: \( np_0 = 200(0.25) = 50 \ge 10 \) and \( n(1-p_0) = 200(0.75) = 150 \ge 10 \). (met)
Do\( \hat{p} = \dfrac{62}{200} = 0.31 \). Standard deviation \( = \sqrt{\dfrac{0.25 \times 0.75}{200}} = \sqrt{0.0009375} \approx 0.03062 \). \( z = \dfrac{0.31 – 0.25}{0.03062} \approx 1.96 \). p-value \( = P(Z \ge 1.96) \approx 0.025 \).
ConcludeBecause the p-value of 0.025 is less than \( \alpha = 0.05 \), we reject \( H_0 \). We have convincing evidence that more than 25% of all students at this school walk to school.

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).

Exam tipOn AP Statistics FRQs, inference questions are marked on four parts. State: hypotheses in symbols and define \( p \) in context (“the true proportion of all…”). Plan: name the procedure (“one-sample z-test for p”) and check all three conditions with numbers. Do: show the formula with values substituted, the test statistic and the p-value. Conclude: link the p-value to \( \alpha \) and write the decision in context, e.g. “Because the p-value of 0.025 is less than α = 0.05, we reject H0. We have convincing evidence that more than 25% of all students at this school walk to school.” For intervals, the conclusion is “We are 95% confident that the interval from … to … captures the true proportion of …”. Missing context loses marks.

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
\( \hat{p} = 8/80 = 0.1 \). \( n\hat{p} = 8 \), which is less than 10. \( n(1-\hat{p}) = 72 \ge 10 \). The condition is not met because there are fewer than 10 successes, so the sampling distribution of \( \hat{p} \) may not be approximately Normal and a z-interval is not appropriate.
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
\( H_0: p = 0.90 \) \( H_a: p < 0.90 \) where \( p \) is the true proportion of all the company’s customers who are satisfied.
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
\( \hat{p} = 90/250 = 0.36 \). Conditions: random sample (met); 250 is less than 10% of a large city’s adults (met); \( n\hat{p} = 90 \) and \( n(1-\hat{p}) = 160 \), both ≥ 10 (met). SE \( = \sqrt{0.36 \times 0.64 / 250} = \sqrt{0.0009216} \approx 0.03036 \). ME \( = 1.645 \times 0.03036 \approx 0.0499 \). Interval: \( 0.36 \pm 0.0499 = (0.310,\ 0.410) \). We are 90% confident that the interval from 0.310 to 0.410 captures the true proportion of all adults in the city who cycle to work at least once a week.
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
Use \( p^* = 0.5 \), \( z^* = 2.576 \). \( n \ge (2.576 / 0.04)^2 \times 0.25 = (64.4)^2 \times 0.25 = 4147.36 \times 0.25 = 1036.84 \). Round up: \( n = 1037 \).
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
(a) \( \hat{p} \) is the midpoint: (0.48 + 0.56) ÷ 2 = 0.52. Margin of error is half the width: (0.56 − 0.48) ÷ 2 = 0.04. (b) The true proportion \( p \) is a fixed number, so it is either in this interval or not; there is no probability about it. The 95% refers to the method: about 95% of intervals built this way from repeated random samples would capture \( p \).
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
State: \( H_0: p = 0.60 \), \( H_a: p \ne 0.60 \), where \( p \) is the true proportion of all students at the college with a part-time job; \( \alpha = 0.05 \). [1] Plan: one-sample z-test for p [1]. Random sample (met); 150 ≤ 0.1(4000) = 400 (met); \( np_0 = 90 \ge 10 \), \( n(1-p_0) = 60 \ge 10 \) (met). [1] Do: \( \hat{p} = 81/150 = 0.54 \). SD \( = \sqrt{0.6 \times 0.4 / 150} = \sqrt{0.0016} = 0.04 \). \( z = (0.54 – 0.60)/0.04 = -1.5 \). [1] p-value \( = 2 \times P(Z \le -1.5) = 2 \times 0.0668 = 0.1336 \). [1] Conclude: Because the p-value of 0.134 is greater than α = 0.05, we fail to reject H0. We do not have convincing evidence that the true proportion of students at this college with a part-time job is different from 60%. [1]

Check yourself

1. For a significance test about \( p \), which values do you use to check Large Counts?

In a test you assume H0 is true, so you use \( p_0 \).

2. Keeping everything else the same, what happens to a confidence interval when you change from 95% to 99% confidence?

\( z^* \) rises from 1.960 to 2.576, so the margin of error increases.

3. A test gives a p-value of 0.18 with \( \alpha = 0.05 \). The correct conclusion is:

0.18 is greater than 0.05, so we fail to reject H0, but this never proves H0.

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.
Want more questions like these, with worked answers?
The practice book has hundreds more, graded from easy to exam level.
Next: step 13 of 22Hypothesis Testing: The Foundations