# Confidence interval for a proportion

For a sample proportion p-hat from n trials, the standard error is the square root of p-hat(1 - p-hat) / n. A 95 percent interval is p-hat plus or minus 1.96 x SE. It needs enough successes and failures, at least 10 of each.

Statistics (university) · Part 05: Sampling and estimation · Card 8 of 8 · Last updated 2026-10-19

## Analogy

A poll result comes with a plus-or-minus figure: that is this margin.

## Example

**Poll of 400**

p-hat = 0.56, n = 400
SE = square root of (0.56 x 0.44 / 400)
= 0.0248
Margin = 1.96 x 0.0248 = 0.0486
Interval: 0.511 to 0.609

## In practice

Used in election polls, defect rates and survey results.

## Practice

### Flashcards

- **Standard error of a sample proportion?** Square root of p-hat(1 - p-hat) / n.

### Interview questions

**A poll of 400 voters finds 56% support a law. Calculate and interpret a 95% confidence interval.**

- SE = 0.0248
- Margin = 1.96 x 0.0248 = 0.0486
- Interval 51.1% to 60.9%
- Repeated polls would capture the true share about 95% of the time

## Questions people ask

### What is the margin of error in a poll?

It is the plus-or-minus part of a confidence interval, half its width. A poll of 56 percent with a 4.9 point margin of error means the true share is plausibly between 51.1 and 60.9 percent. Larger samples give smaller margins.

### How do I find the sample size needed for a given margin of error?

For a proportion, use n = z squared x p(1-p) / E squared, with p = 0.5 if unknown, as it gives the largest n. For a margin of 0.03 at 95 percent, n = 3.8416 x 0.25 / 0.0009 = 1067.1, so round up to 1,068.

## Related concepts

- [Confidence interval for a mean](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-5/statistics-university-part-5-concept-6)
- [Point estimate and bias](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-5/statistics-university-part-5-concept-5)
- [t distribution](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-5/statistics-university-part-5-concept-7)

Web page: https://studyvisually.com/learn/science/statistics-university/statistics-university-part-5/statistics-university-part-5-concept-8
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-5-concept-8
