Statistics

Confidence Intervals for Proportions

Last updated: March 2026 · Advanced
Before you start

You should be comfortable with:

Real-world applications
πŸ’Š
Nursing

Medication dosages, IV drip rates, vital monitoring

πŸ’°
Retail & Finance

Discounts, tax, tips, profit margins

A confidence interval gives a range of plausible values for a population parameter, along with a measure of how certain we are that the true value falls within that range. Instead of reporting a single number and hoping for the best, a confidence interval tells you both your best estimate and how much uncertainty surrounds it. In this lesson, you will learn how to construct confidence intervals specifically for population proportions β€” the fraction of a population that has some characteristic.

From Point Estimates to Intervals

When you conduct a survey or study, you calculate a sample proportion p^\hat{p} β€” the fraction of your sample with the characteristic of interest. For example, if 312 out of 400 surveyed customers say they are satisfied, then p^=312/400=0.78\hat{p} = 312/400 = 0.78.

This single number is called a point estimate. It is your best guess for the true population proportion pp. But how close is p^\hat{p} to the actual value of pp? A point estimate alone cannot answer this question. It gives no indication of whether the true value might be 0.75 or 0.82 or something else entirely.

A confidence interval solves this problem by adding a margin of error around the point estimate:

p^Β±E\hat{p} \pm E

The result is an interval β€” a lower bound and an upper bound β€” that we are reasonably confident contains the true population proportion. The width of this interval depends on three things: the sample size, the variability in the data, and the level of confidence you choose.

The Confidence Interval Formula for Proportions

The standard confidence interval for a population proportion is:

p^Β±zβˆ—p^(1βˆ’p^)n\hat{p} \pm z^* \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

Each piece of this formula plays a specific role:

  • p^\hat{p} is the sample proportion (your point estimate)
  • nn is the sample size (how many individuals you observed)
  • p^(1βˆ’p^)n\sqrt{\frac{\hat{p}(1-\hat{p})}{n}} is the standard error (SE), which measures the typical sampling variability of p^\hat{p}
  • zβˆ—z^* is the critical value from the standard normal distribution, determined by your chosen confidence level
  • The product zβˆ—Γ—SEz^* \times SE is the margin of error (ME)

Common Critical Values

Confidence Levelzβˆ—z^*
90%1.645
95%1.960
99%2.576

Higher confidence requires a larger critical value, which produces a wider interval. A 99% confidence interval is wider than a 95% interval for the same data β€” greater certainty demands a larger range.

Conditions for a Valid Confidence Interval

Before constructing a confidence interval for a proportion, you must verify three conditions. If these are not met, the formula above may give unreliable results.

  1. Random sample β€” the data must come from a random sampling process (simple random sample, stratified random sample, etc.)
  2. Independence β€” individual observations must be independent of each other. A practical check: the sample size nn should be less than 10% of the total population (the β€œ10% condition”), or sampling should be done with replacement.
  3. Success/failure condition β€” the sample must contain enough successes and failures for the normal approximation to be valid:
    • np^β‰₯10n\hat{p} \geq 10 (at least 10 successes)
    • n(1βˆ’p^)β‰₯10n(1 - \hat{p}) \geq 10 (at least 10 failures)

If the success/failure condition is not met (for example, you have a very small sample or the proportion is very close to 0 or 1), you should use an alternative method such as the Wilson interval or an exact binomial interval.

Worked Examples

Example 1: Customer Satisfaction

A company surveys 400 randomly selected customers and finds that 312 are satisfied with their service. Construct a 95% confidence interval for the true proportion of satisfied customers.

Step 1: Calculate the sample proportion.

p^=312400=0.78\hat{p} = \frac{312}{400} = 0.78

Step 2: Check the conditions.

  • Random sample: stated in the problem βœ“
  • Independence: 400 is almost certainly less than 10% of all customers βœ“
  • Success/failure: 400Γ—0.78=312β‰₯10400 \times 0.78 = 312 \geq 10 βœ“ and 400Γ—0.22=88β‰₯10400 \times 0.22 = 88 \geq 10 βœ“

Step 3: Calculate the standard error.

SE=0.78Γ—0.22400=0.1716400=0.000429=0.02071SE = \sqrt{\frac{0.78 \times 0.22}{400}} = \sqrt{\frac{0.1716}{400}} = \sqrt{0.000429} = 0.02071

Step 4: Calculate the margin of error using zβˆ—=1.960z^* = 1.960 for 95% confidence.

ME=1.960Γ—0.02071=0.04059ME = 1.960 \times 0.02071 = 0.04059

Step 5: Construct the interval.

0.78Β±0.041=(0.739,Β 0.821)0.78 \pm 0.041 = (0.739,\ 0.821)

Answer: We are 95% confident that between 73.9% and 82.1% of all customers are satisfied with the company’s service.

Example 2: Defective Products

A quality control inspector examines a random sample of 500 items from a production run and finds 15 defective. Construct a 99% confidence interval for the defect rate.

Step 1: Calculate the sample proportion.

p^=15500=0.03\hat{p} = \frac{15}{500} = 0.03

Step 2: Check the conditions.

  • Random sample: stated βœ“
  • Independence: 500 items is less than 10% of a typical production run βœ“
  • Success/failure: 500Γ—0.03=15β‰₯10500 \times 0.03 = 15 \geq 10 βœ“ and 500Γ—0.97=485β‰₯10500 \times 0.97 = 485 \geq 10 βœ“

Step 3: Calculate the standard error.

SE=0.03Γ—0.97500=0.0291500=0.0000582=0.00763SE = \sqrt{\frac{0.03 \times 0.97}{500}} = \sqrt{\frac{0.0291}{500}} = \sqrt{0.0000582} = 0.00763

Step 4: Calculate the margin of error using zβˆ—=2.576z^* = 2.576 for 99% confidence.

ME=2.576Γ—0.00763=0.01965ME = 2.576 \times 0.00763 = 0.01965

Step 5: Construct the interval.

0.03Β±0.020=(0.010,Β 0.050)0.03 \pm 0.020 = (0.010,\ 0.050)

Answer: We are 99% confident that the true defect rate is between 1.0% and 5.0%.

Interpreting Confidence Intervals

The interpretation of a confidence interval is one of the most commonly misunderstood concepts in statistics. Here is what a 95% confidence interval means β€” and what it does not.

Correct interpretation: β€œIf we repeated this study many times, each time drawing a new random sample and constructing a 95% confidence interval, about 95% of those intervals would contain the true population proportion.”

The 95% refers to the method, not to any single interval. The procedure captures the true value 95% of the time across many repetitions.

Incorrect interpretations to avoid:

  • β€œThere is a 95% probability that pp is in this interval.” This is wrong because pp is a fixed (but unknown) number β€” it is either in the interval or it is not. Probability does not apply to a fixed quantity.
  • β€œ95% of the data falls in this interval.” The confidence interval is about the population proportion, not about individual data points.
  • β€œIf we repeated the survey, 95% of sample proportions would fall in this interval.” The interval was built around one particular p^\hat{p}; other samples would produce different intervals.

A useful way to think about it: before you collect data, there is a 95% chance your procedure will produce an interval that captures pp. After you collect data and compute the interval, the true value is either inside or not β€” but you are confident in the process that generated it.

Margin of Error and Sample Size

The margin of error (ME) is the half-width of the confidence interval: ME=zβˆ—p^(1βˆ’p^)nME = z^* \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}. Researchers and pollsters often want to control the margin of error β€” for example, ensuring that a survey result is accurate to within 3 percentage points.

You can determine the required sample size by solving the margin of error formula for nn:

n=p^(1βˆ’p^)(zβˆ—E)2n = \hat{p}(1-\hat{p})\left(\frac{z^*}{E}\right)^2

If you do not have a prior estimate of p^\hat{p}, use p^=0.5\hat{p} = 0.5. This is the most conservative choice because p^(1βˆ’p^)\hat{p}(1 - \hat{p}) is maximized at 0.5, which gives the largest required sample size. Using 0.5 guarantees the margin of error will be at most EE regardless of the true proportion.

Example 3: Planning a Survey

A market research firm wants to estimate the proportion of adults who prefer online shopping, with a margin of error of no more than 3 percentage points at 95% confidence. No prior estimate is available. How large a sample is needed?

Step 1: Use the conservative estimate p^=0.5\hat{p} = 0.5.

Step 2: Identify the values: zβˆ—=1.96z^* = 1.96, E=0.03E = 0.03.

Step 3: Calculate.

n=0.5Γ—0.5Γ—(1.960.03)2β‰ˆ0.25Γ—4268.44=1067.11n = 0.5 \times 0.5 \times \left(\frac{1.96}{0.03}\right)^2 \approx 0.25 \times 4268.44 = 1067.11

Step 4: Round up (always round up when calculating sample size β€” rounding down gives a margin of error slightly larger than desired).

n=1,068n = 1{,}068

Answer: The firm needs a sample of at least 1,068 adults.

Notice how demanding a small margin of error can be. Cutting the margin of error in half (from 6% to 3%) would require roughly four times the sample size, because nn is proportional to 1/E21/E^2.

Real-World Application: Nursing β€” Estimating Infection Rates

Hospital-acquired infections (HAIs) are a critical quality metric in healthcare. A hospital’s infection control team randomly reviews 600 patient charts from the past year and identifies 24 cases of central line-associated bloodstream infections (CLABSIs).

Construct a 95% confidence interval for the hospital’s CLABSI rate.

p^=24600=0.04\hat{p} = \frac{24}{600} = 0.04

Check conditions: random sample βœ“, 600Γ—0.04=24β‰₯10600 \times 0.04 = 24 \geq 10 βœ“, 600Γ—0.96=576β‰₯10600 \times 0.96 = 576 \geq 10 βœ“.

SE=0.04Γ—0.96600=0.0384600=0.000064=0.0080SE = \sqrt{\frac{0.04 \times 0.96}{600}} = \sqrt{\frac{0.0384}{600}} = \sqrt{0.000064} = 0.0080

ME=1.960Γ—0.0080=0.01568ME = 1.960 \times 0.0080 = 0.01568

CI:0.04Β±0.016=(0.024,Β 0.056)CI: 0.04 \pm 0.016 = (0.024,\ 0.056)

Interpretation: The hospital is 95% confident that its true CLABSI rate is between 2.4% and 5.6%. If the national benchmark is 3.0%, this interval includes 3.0%, so the hospital cannot conclude that its rate is significantly different from the benchmark. If the hospital wants a more precise estimate to resolve this question, it would need to review more charts (a larger sample size narrows the interval).

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: In a random sample of 250 voters, 140 say they support a ballot measure. Construct a 95% confidence interval for the true proportion of supporters.

p^=140250=0.56\hat{p} = \frac{140}{250} = 0.56

SE=0.56Γ—0.44250=0.2464250=0.000986=0.0314SE = \sqrt{\frac{0.56 \times 0.44}{250}} = \sqrt{\frac{0.2464}{250}} = \sqrt{0.000986} = 0.0314

ME=1.960Γ—0.0314=0.0615ME = 1.960 \times 0.0314 = 0.0615

CI:0.56Β±0.062=(0.498,Β 0.622)CI: 0.56 \pm 0.062 = (0.498,\ 0.622)

Answer: We are 95% confident that between 49.8% and 62.2% of all voters support the measure. Note that this interval includes 50%, so the race is too close to call based on this sample.

Problem 2: A manufacturer tests 800 light bulbs and finds 32 defective. Construct a 90% confidence interval for the defect rate.

p^=32800=0.04\hat{p} = \frac{32}{800} = 0.04

Check: 800Γ—0.04=32β‰₯10800 \times 0.04 = 32 \geq 10 βœ“, 800Γ—0.96=768β‰₯10800 \times 0.96 = 768 \geq 10 βœ“.

SE=0.04Γ—0.96800=0.0384800=0.000048=0.00693SE = \sqrt{\frac{0.04 \times 0.96}{800}} = \sqrt{\frac{0.0384}{800}} = \sqrt{0.000048} = 0.00693

ME=1.645Γ—0.00693=0.01140ME = 1.645 \times 0.00693 = 0.01140

CI:0.04Β±0.011=(0.029,Β 0.051)CI: 0.04 \pm 0.011 = (0.029,\ 0.051)

Answer: We are 90% confident that the defect rate is between 2.9% and 5.1%.

Problem 3: A 95% confidence interval for a proportion is (0.42, 0.58). What are the point estimate and the margin of error?

The point estimate is the midpoint of the interval:

p^=0.42+0.582=0.50\hat{p} = \frac{0.42 + 0.58}{2} = 0.50

The margin of error is half the width:

ME=0.58βˆ’0.422=0.08ME = \frac{0.58 - 0.42}{2} = 0.08

Answer: The point estimate is p^=0.50\hat{p} = 0.50 and the margin of error is 0.08 (8 percentage points).

Problem 4: You want to estimate a proportion with a margin of error of no more than 2% at 99% confidence. You have a preliminary estimate of p^=0.30\hat{p} = 0.30. What sample size do you need?

n=p^(1βˆ’p^)(zβˆ—E)2=0.30Γ—0.70Γ—(2.5760.02)2n = \hat{p}(1-\hat{p})\left(\frac{z^*}{E}\right)^2 = 0.30 \times 0.70 \times \left(\frac{2.576}{0.02}\right)^2

=0.21Γ—(128.8)2=0.21Γ—16,589.44β‰ˆ3,483.8= 0.21 \times (128.8)^2 = 0.21 \times 16{,}589.44 \approx 3{,}483.8

Round up: n=3,484n = 3{,}484.

Answer: You need a sample of at least 3,484.

Problem 5: A nurse reviews 300 patient records and finds that 261 received their flu vaccination on time. Construct a 99% confidence interval for the on-time vaccination rate.

p^=261300=0.87\hat{p} = \frac{261}{300} = 0.87

Check: 300Γ—0.87=261β‰₯10300 \times 0.87 = 261 \geq 10 βœ“, 300Γ—0.13=39β‰₯10300 \times 0.13 = 39 \geq 10 βœ“.

SE=0.87Γ—0.13300=0.1131300=0.000377=0.01942SE = \sqrt{\frac{0.87 \times 0.13}{300}} = \sqrt{\frac{0.1131}{300}} = \sqrt{0.000377} = 0.01942

ME=2.576Γ—0.01942=0.05003ME = 2.576 \times 0.01942 = 0.05003

CI:0.87Β±0.050=(0.820,Β 0.920)CI: 0.87 \pm 0.050 = (0.820,\ 0.920)

Answer: We are 99% confident that between 82.0% and 92.0% of patients receive their flu vaccination on time.

Key Takeaways

  • A confidence interval for a proportion has the form p^Β±zβˆ—p^(1βˆ’p^)n\hat{p} \pm z^* \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}, where p^\hat{p} is the sample proportion, nn is the sample size, and zβˆ—z^* is the critical value for your confidence level
  • Before constructing the interval, verify three conditions: random sample, independence (10% condition), and success/failure (np^β‰₯10n\hat{p} \geq 10 and n(1βˆ’p^)β‰₯10n(1 - \hat{p}) \geq 10)
  • The margin of error shrinks as nn increases β€” but cutting the margin in half requires roughly four times the sample size
  • A 95% confidence interval means: if we repeated the procedure many times, about 95% of the resulting intervals would contain the true proportion β€” it does not mean there is a 95% probability that pp is in this particular interval
  • To determine the required sample size for a desired margin of error, use n=p^(1βˆ’p^)(zβˆ—/E)2n = \hat{p}(1-\hat{p})(z^*/E)^2 and round up. If no prior estimate exists, use p^=0.5\hat{p} = 0.5 for the most conservative result
  • In healthcare settings, confidence intervals help quantify the precision of infection rates, vaccination coverage, and other quality metrics β€” enabling evidence-based comparisons to national benchmarks

Return to Statistics for more topics in this section.

Last updated: March 29, 2026