Confidence intervals and sample size

margin of errorstandard errorhow many people do I need to survey95% confidence

Standard error, margin of error and the sample size a target precision demands — for both means and proportions.

Standard Error of the Mean

SE=σnSE = \frac{\sigma}{\sqrt{n}}

How much a sample mean typically wanders from the true mean, shrinking with the square root of the sample size.

Standard Error of a Proportion

SE=p(1p)nSE = \sqrt{\frac{p (1 - p)}{n}}

How much a sample percentage typically wanders from the true population proportion, given the proportion and the sample size.

Margin of Error for a Mean

E=zσnE = z \frac{\sigma}{\sqrt{n}}

Half-width of a confidence interval for a mean, built from the critical z-value, the standard deviation and the sample size.

Margin of Error for a Proportion

E=zp(1p)nE = z \sqrt{\frac{p (1 - p)}{n}}

The plus-or-minus quoted with a poll result, built from the critical z-value, the sample proportion and the number of respondents.

Confidence Interval Lower Limit

L=xˉzσnL = \bar{x} - z \frac{\sigma}{\sqrt{n}}

The lower bound of a confidence interval for a mean, pulling the critical z-value and standard error back from the sample mean.

Confidence Interval Upper Limit

U=xˉ+zσnU = \bar{x} + z \frac{\sigma}{\sqrt{n}}

The upper bound of a confidence interval for a mean, adding the critical z-value times the standard error to the sample mean.

Sample Size for a Mean

n=(zσE)2n = \left( \frac{z \sigma}{E} \right)^{2}

How many observations a study needs to estimate a mean within a target margin of error at a chosen confidence level.

Sample Size for a Proportion

n=z2p(1p)E2n = \frac{z^{2} \, p (1 - p)}{E^{2}}

How many respondents a survey needs to estimate a percentage within a target margin of error at a chosen confidence level.

How they fit together

These run in a chain. Standard error says how much a sample statistic wanders from the truth; multiplying it by a critical value gives the margin of error; adding and subtracting that from the estimate gives the interval. Run it backwards — fix the margin you can tolerate and solve for n — and you get the sample size a survey needs before anyone knocks on a door.

The governing fact is the square root. Precision improves with √n, so quartering your margin of error costs sixteen times the sample. That is why national polls sit near 1,000 respondents: it buys roughly ±3 points, and getting to ±1.5 would cost four times as much for a gain most readers would not notice. Note too that a 95% interval does not mean a 95% chance the true value is inside this interval — it means 95% of intervals built this way would contain it.