01 / 21

CI for a
Proportion

Learn how to construct a confidence interval for a population proportion using the z-interval method: the foundation of statistical inference in biostatistics.

Biostatistics

What Is a Proportion?

A proportion is the fraction of a population or sample that has a particular characteristic. We write the population proportion as \( p \) and the sample proportion as \( \hat{p} \).

\( p \)
Population proportion: the true, usually unknown value we want to estimate.
\( \hat{p} \)
Sample proportion: \( \hat{p} = \frac{x}{n} \), where \( x \) is successes and \( n \) is sample size.

Why Use a Confidence Interval?

A single sample proportion \( \hat{p} \) is a point estimate: one number. But every sample is different, so \( \hat{p} \) varies from sample to sample. A confidence interval gives a range of plausible values for the true \( p \), reflecting that uncertainty.

0.10 0.15 0.20 0.25 0.30 point estimate lower upper confidence interval

The Sampling Distribution of \( \hat{p} \)

When the sample size is large enough, the sampling distribution of \( \hat{p} \) is approximately normal. This fact is the engine behind the z-interval.

p
\( \text{mean} = p \)
-1 SE +1 SE Density

The z-Interval Formula

The confidence interval for a population proportion is:

\( \hat{p} \)
Sample proportion (center of the interval)
\( z^{*} \)
Critical value from the standard normal distribution
SE
\( \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \), the standard error

Common \( z^{*} \) Values

The critical value \( z^{*} \) depends on the confidence level you choose. Higher confidence requires a wider interval.

Confidence Level \( z^{*} \) \( \alpha \)
90% 1.645 0.10
95% 1.960 0.05
99% 2.576 0.01

Checking the Conditions

Before computing a z-interval for a proportion, three conditions must be satisfied:

1
Random sample: Data must come from a random sampling process or randomized experiment.
2
Independence: Individual observations are independent. If sampling without replacement, \( n \leq 10\% \) of the population (the 10% condition).
3
Large counts: Both \( n\hat{p} \geq 10 \) and \( n(1 - \hat{p}) \geq 10 \) so the normal approximation is valid.

Proportion CI vs. Mean CI

Students sometimes confuse the confidence interval for a proportion with the interval for a mean. They differ in structure:

Feature CI for Proportion CI for Mean
Parameter \( p \) \( \mu \)
Point estimate \( \hat{p} \) \( \bar{x} \)
Standard error \( \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \) \( \frac{s}{\sqrt{n}} \)
Distribution \( z \) (normal) \( t \) (for small \( n \))
Data type Categorical (yes/no) Quantitative

How to Compute the Interval

1
Identify \( x \) (number of successes) and \( n \) (sample size).
2
Compute \( \hat{p} = \frac{x}{n} \).
3
Verify conditions: random, independent, and large counts (\( n\hat{p} \geq 10 \), \( n(1-\hat{p}) \geq 10 \)).
4
Find \( z^{*} \) for the desired confidence level (e.g., \( z^{*} = 1.96 \) for 95%).
5
Calculate: \( \hat{p} \pm z^{*}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \).
6
Interpret: "We are [C]% confident that the true proportion is between [lower] and [upper]."

Example 1: Vaccine Response

In a clinical trial, 72 out of 300 participants developed an immune response. Construct a 95% confidence interval for the true proportion \( p \).

1
\( x = 72 \), \( n = 300 \), so \( \hat{p} = \frac{72}{300} = 0.24 \).
2
Check: \( n\hat{p} = 72 \geq 10 \) ✓ and \( n(1-\hat{p}) = 228 \geq 10 \) ✓
3
\( \text{SE} = \sqrt{\frac{0.24 \times 0.76}{300}} = \sqrt{\frac{0.1824}{300}} \approx 0.02466 \)
4
Margin of error: \( 1.96 \times 0.02466 \approx 0.0483 \)

Visualizing the Interval

0.15 0.20 0.25 0.30 0.35 0.192 0.288 0.24 ME = 0.048 ME = 0.048

Example 2: Hand Hygiene

A hospital infection-control team observes that 186 out of 500 healthcare workers properly wash their hands. Build a 99% confidence interval for \( p \).

1
\( \hat{p} = \frac{186}{500} = 0.372 \)
2
Large counts: \( 186 \geq 10 \) ✓ and \( 314 \geq 10 \) ✓
3
\( \text{SE} = \sqrt{\frac{0.372 \times 0.628}{500}} \approx 0.02161 \)
4
For 99% CI: \( z^{*} = 2.576 \), so ME \( = 2.576 \times 0.02161 \approx 0.0557 \)

Example 3: Small Sample Warning

A pilot study finds 3 out of 25 patients experience a side effect. Can we build a 95% z-interval?

1
\( \hat{p} = \frac{3}{25} = 0.12 \)
2
Large counts check: \( n\hat{p} = 25 \times 0.12 = 3 \) ✕ Not \( \geq 10 \)
3
The normal approximation is not valid: the z-interval should not be used here.

What Affects Interval Width?

The margin of error \( E = z^{*}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \) is controlled by three factors:

\( z^{*} \) (Confidence Level)
Higher confidence means larger \( z^{*} \), which widens the interval.
\( n \) (Sample Size)
Larger \( n \) shrinks SE and narrows the interval.
\( \hat{p} \) (Proportion)
\( \hat{p}(1-\hat{p}) \) is maximized at \( \hat{p} = 0.5 \): the widest possible interval.

Common Mistakes

✕ Using \( t \) instead of \( z \)
The z-interval for a proportion uses the normal distribution, not the t-distribution. The t-distribution is for means with unknown \( \sigma \).
✕ Skipping condition checks
Always verify random, independent, and large counts before computing. Without these, the interval may be invalid.
✕ Wrong interpretation
A 95% CI does not mean "there is a 95% probability that \( p \) is in the interval." The true \( p \) is fixed: the interval either contains it or not.

Summary Checklist

Step Action Check
1 Compute \( \hat{p} = x/n \) ✓
2 Random sample? ✓
3 Independence (10% rule)? ✓
4 \( n\hat{p} \geq 10 \) and \( n(1-\hat{p}) \geq 10 \)? ✓
5 Choose confidence level, find \( z^{*} \) Table
6 Compute \( \hat{p} \pm z^{*}\cdot\text{SE} \) Formula
7 Interpret in context ✓

Question 1 of 5

In a random sample of 400 adults, 120 say they exercise daily. What is \( \hat{p} \)?

Question 2 of 5

Which \( z^{*} \) value is used for a 95% confidence interval?

Question 3 of 5

A sample has \( n = 50 \) and \( \hat{p} = 0.08 \). Is the large counts condition met for a z-interval?

Question 4 of 5

If \( \hat{p} = 0.60 \), \( n = 200 \), and \( z^{*} = 1.96 \), what is the margin of error?

Question 5 of 5

To halve the margin of error while keeping the same confidence level and proportion, you should: