Statistics & Probability · Grades 11, 12

Confidence Intervals for a Proportion and a Mean

Quick answer

A confidence interval gives a range of plausible values for a population proportion or mean: estimate ± critical value × standard error. For a proportion, that is p̂ ± z*√(p̂(1 − p̂)/n); for a mean with a large sample, x̄ ± z*·s/√n. The critical value z* is 1.645 for 90%, 1.96 for 95% and 2.576 for 99% confidence. Confidence describes the method: 95% of intervals built this way capture the true value. Solving the margin of error for n gives the sample size needed in advance.

What you'll learn

  • Construct a confidence interval for a proportion
  • Construct a large-sample confidence interval for a mean
  • Interpret a confidence level correctly
  • Find the sample size needed for a given margin of error

Estimate plus or minus a margin

A poll of 800800 randomly chosen adults finds 520520 in favor of a plan. The sample proportion is p^=520800=0.65\hat{p} = \tfrac{520}{800} = 0.65. The true proportion pp is unknown, and 0.650.65 is unlikely to hit it exactly. A confidence interval reports a range instead:

estimate±z∗×standard error\text{estimate} \pm z^{*} \times \text{standard error}

The part after ±\pm is the margin of error. For a proportion, the sampling distribution of p^\hat{p} has standard error p(1−p)/n\sqrt{p(1 - p)/n}; since pp is unknown, we use p^\hat{p} in its place:

p^±z∗p^(1−p^)n\hat{p} \pm z^{*}\sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}
Confidence level90%90\%95%95\%99%99\%
z∗z^{*}1.6451.6451.961.962.5762.576

For the poll: the standard error is 0.65×0.35800≈0.0169\sqrt{\tfrac{0.65 \times 0.35}{800}} \approx 0.0169. At 95%95\%, the margin is 1.96×0.0169≈0.0331.96 \times 0.0169 \approx 0.033, and the interval is about 0.6170.617 to 0.6830.683.

Why “95% confident” describes the method

The central limit theorem says p^\hat{p} lands within 1.961.96 standard errors of the true pp in 95%95\% of samples. Whenever it does, the interval p^±1.96 SE\hat{p} \pm 1.96\,\text{SE} reaches back far enough to contain pp. So 95%95\% of the intervals this method produces contain the true value, and 5%5\% miss it.

Any one interval either contains pp or it does not; pp is a fixed number, not a random one. The 95%95\% is a property of the procedure, earned before the sample was drawn. That is why we say ”95%95\% confident” rather than “a 95%95\% probability that pp lies between 0.6170.617 and 0.6830.683”.

Worked examples

Common mistakes

Practice problems

  1. In a random sample of 400400 students, 180180 walk to school. Give a 95%95\% confidence interval for the proportion who walk.

    Answer

    About 0.4010.401 to 0.4990.499

    Full solution

    p^=0.45\hat{p} = 0.45, the standard error is 0.45×0.55400≈0.0249\sqrt{\tfrac{0.45 \times 0.55}{400}} \approx 0.0249, and the margin is 1.96×0.0249≈0.0491.96 \times 0.0249 \approx 0.049.

  2. A sample of 100100 has xˉ=72\bar{x} = 72 and s=10s = 10. Find the 95%95\% margin of error for the mean.

    Answer

    1.961.96

    Full solution

    The standard error is 10100=1\tfrac{10}{\sqrt{100}} = 1, and 1.96×1=1.961.96 \times 1 = 1.96.

  3. How large a sample gives a 95%95\% margin of error of 0.050.05 for a proportion, with no prior estimate?

    Answer

    385385

    Full solution

    n=(1.960.05)2×0.25=384.16n = \left(\tfrac{1.96}{0.05}\right)^2 \times 0.25 = 384.16, rounded up to 385385.

  4. How large for a margin of 0.020.02?

    Answer

    2,4012{,}401

    Full solution

    (1.960.02)2×0.25=982×0.25=2,401\left(\tfrac{1.96}{0.02}\right)^2 \times 0.25 = 98^2 \times 0.25 = 2{,}401.

  5. If a poll quadruples its sample size, what happens to the margin of error?

    Answer

    It is cut in half.

    Full solution

    The margin is proportional to 1n\tfrac{1}{\sqrt{n}}, and 4=2\sqrt{4} = 2.

  6. An interval runs from 0.310.31 to 0.390.39. Find p^\hat{p} and the margin of error.

    Answer

    p^=0.35\hat{p} = 0.35; margin 0.040.04

    Full solution

    The midpoint is 0.350.35 and half the width is 0.040.04.

  7. Which is wider for the same data, a 90%90\% or a 99%99\% interval? Why?

    Answer

    The 99%99\% interval.

    Full solution

    Capturing the true value more often needs a larger critical value, 2.5762.576 instead of 1.6451.645, so the margin is larger.

  8. A student says, “There is a 95%95\% probability that the true proportion is between 0.6170.617 and 0.6830.683.” How should it be stated?

    Answer

    “We are 95%95\% confident that the true proportion is between 0.6170.617 and 0.6830.683”: the method captures the true value in 95%95\% of samples.

    Full solution

    The true proportion is fixed, so this particular interval either contains it or not. The 95%95\% describes how often intervals built this way succeed.

Frequently asked questions

What is a confidence interval?

A range of plausible values for a population parameter, built as estimate ± margin of error, where the margin of error is a critical value times the standard error.

What does 95% confidence mean?

That the method captures the true value 95% of the time over repeated samples. It is not a 95% probability that this particular interval contains the value; the value is fixed and the interval either contains it or not.

What are the critical values for 90%, 95% and 99%?

1.645, 1.96 and 2.576. They mark off the middle 90%, 95% and 99% of the standard normal curve.

How does sample size affect the interval?

The margin of error shrinks like 1/√n. Four times the sample size gives half the margin of error.

How do you find the sample size for a target margin of error?

Solve E = z*√(p(1 − p)/n) for n: n = (z*/E)² · p(1 − p). Use p = 0.5 when no estimate is available, since it gives the largest n.

What to learn next

Standards alignment

This lesson covers the following Common Core State Standards for Mathematics.

  • CCSS.MATH.CONTENT.HSS.IC.B.4Making Inferences and Justifying ConclusionsUse data from a sample survey to estimate a population mean or proportion; develop a margin of error through the use of simulation models for random sampling.