STAT 200 · Statistics for Economics

Confidence Intervals for Means and Proportions

Build a range around an estimate, read what 95% confidence really means, and work out how large a sample you need.

Key takeaways

  • A confidence interval is an estimate plus and minus a margin of error, built from the data.
  • The margin of error is a critical value times the standard error.
  • A 95% confidence level describes how often the method captures the true value across many repeated samples.
  • Intervals get narrower with larger samples and wider when you demand more confidence.
  • The margin of error covers random sampling variation only, not bias from a poor survey.

Ana runs a small gym. She is thinking about opening at 5 a.m. instead of 6. She asks a random sample of 400 members whether they would use the early hour, and 240 say yes. That is 60%.

Her business partner, Luis, asks, "So exactly 60% of all our members?"

Of course not. Another 400 members would give a slightly different share. What Ana needs is a way to say "about 60%" with a number attached to the word "about." That is what a confidence interval does. It turns a lone guess into a range and tells you how the range was built.

One number is not enough

A single-number guess, such as 60%, is a point estimate. It is your best shot, but it hides how shaky the shot is. A confidence interval is a range of plausible values for the unknown parameter, calculated from the sample.

Most basic intervals share one shape:

The anatomy of a confidence interval
Estimate ± Critical value × SE Estimate = Point estimate The sample mean or sample proportion Critical value = Confidence dial About 1.96 for 95% with a normal shape SE = Standard error The typical wobble of the estimate Estimate ± Critical value × SE Estimate = Point estimate The sample mean or sample proportion Critical value = Confidence dial About 1.96 for 95% with a normal shape SE = Standard error The typical wobble of the estimate

The part after the ± sign is the margin of error. The logic rests on the central limit theorem. In large random samples, the estimate lands within about 1.96 standard errors of the truth roughly 95% of the time. If the estimate is usually that close to the truth, then the truth is usually that close to the estimate. We just stand at the estimate and reach out.

Where the 1.96 comes from

In a normal distribution, the middle 95% of values lies within 1.96 standard deviations of the center. A critical value is the number of standard errors you must reach to get a chosen level of confidence.

Confidence level Critical value (z)
90% 1.645
95% 1.96
99% 2.576

More confidence needs a longer reach. You can be 99% confident only by giving a vaguer answer. A forecast that tomorrow's temperature will be somewhere between very cold and very hot is almost sure to be right and entirely useless.

Worked example: Ana's early opening

For a proportion, write the sample share as p̂ (read "p hat"). The estimated standard error is:

SE = √( p̂ × (1 − p̂) ÷ n )
   = √( 0.60 × 0.40 ÷ 400 )
   = √0.0006
   ≈ 0.0245

For 95% confidence:

Margin of error = 1.96 × 0.0245 ≈ 0.048
Interval = 0.60 ± 0.048
         = 0.552 to 0.648

Ana can report: "We estimate that 60% of members would use the early hour, with a 95% confidence interval of about 55% to 65%."

If the early opening pays off only when more than half of members use it, the whole interval sits above 50%. That is encouraging. If she needed 65%, the data would give little support, since 65% is at the very edge. Remember, too, that saying yes in a survey is cheaper than getting out of bed.

This method for proportions works well when there are at least about 10 yes answers and 10 no answers. Ana has 240 and 160. With very small samples or shares near 0 or 1, use a better method from statistical software.

Intervals for a mean

Luis measures something too. He samples 64 visits and records how long members wait for a squat rack. The mean is 7.2 minutes and the sample standard deviation, s, is 2.4 minutes.

Because we do not know the population standard deviation, we use s in its place:

SE = s ÷ √n = 2.4 ÷ √64 = 2.4 ÷ 8 = 0.30
Margin = 1.96 × 0.30 ≈ 0.59
Interval ≈ 7.2 ± 0.59 = 6.6 to 7.8 minutes

There is a refinement. Estimating the spread adds a little extra uncertainty. So for means, statisticians use a slightly larger critical value from the t distribution, a bell shape with heavier tails than the normal. With 64 observations it is about 2.00 instead of 1.96, which barely changes the answer: 7.2 ± 0.60. With only 10 observations it is about 2.26, which matters. Small samples also require the data to be roughly bell-shaped. You will use this distribution more in t tests.

Notice what this interval is about: the average wait. It does not say that 95% of members wait between 6.6 and 7.8 minutes. Individual waits spread much more widely, with a standard deviation of 2.4 minutes.

What "95% confident" really means

Imagine Ana repeating her survey 100 times with fresh random samples. Each survey gives a different interval. About 95 of those intervals would contain the true share, and about 5 would miss it. The confidence level is the long-run success rate of the method.

Five samples, five intervals (illustration)
Sample number 54 58 62 4 3 2 1 Sample 1 Sample 2 Sample 3 Sample 4 True share Share who would use 5 a.m. (%) Sample number 54 58 62 4 3 2 1 Sample 1 Sample 2 Sample 3 Sample 4 True share Share who would use 5 a.m. (%)

Made-up samples with a true share of 58%. The fourth interval misses it.

Once a particular interval is computed, the true value is either inside or outside. We just do not know which. The standard (frequentist) reading is therefore not "there is a 95% chance the truth is in 55% to 65%." Say instead: "This interval came from a method that captures the truth 95% of the time." It is a mouthful, and it is correct.

Narrower intervals cost data

Three things control the width.

  • A larger sample shrinks the standard error, and so the interval.
  • A higher confidence level raises the critical value and widens it.
  • More variable data widen it.

Because of the square root, four times the sample gives half the width. With 1,600 members and the same 60%, Ana's margin falls from about 4.8 points to about 2.4.

You can plan ahead. To get a margin of 3 points at 95% confidence, use the most cautious guess, p = 0.5, which gives the largest spread:

n = (1.96 × 0.5 ÷ 0.03)²
  = (32.67)²
  ≈ 1,067.1, so round up to 1,068
Sample size needed at 95% confidence, p = 0.5
Margin of 10 points 97 Margin of 5 points 385 Margin of 3 points 1,068 Margin of 1 point 9,604 Margin of 10 points 97 Margin of 5 points 385 Margin of 3 points 1,068 Margin of 1 point 9,604

Computed from the formula. Tighter margins get expensive quickly. Hypothetical example: the numbers are made up to show the method, not a quote or an average.

That is why many national polls use around a thousand or so respondents. Going much tighter costs a great deal.

Same data, three confidence levels

Ana can dial the confidence up or down. Her standard error stays at 0.0245. Only the critical value changes.

Confidence Critical value Margin Interval for the share
90% 1.645 0.040 56.0% to 64.0%
95% 1.96 0.048 55.2% to 64.8%
99% 2.576 0.063 53.7% to 66.3%

Which level is right? There is no universal answer. It depends on what a wrong call costs. If opening at 5 a.m. means hiring one extra staff member for a trial month, a 90% interval may be enough. If it means signing a long lease for a second location, Ana will want more caution.

Most published work uses 95% as a convention. It is a habit, not a law of nature. A good report states the level it used, so readers can translate.

The interval is also a handy way to check claims. A competitor says, "Three out of four members of every gym would use early hours." That means 75%. Ana's whole 99% interval tops out at 66.3%, so her data are hard to square with that claim, at least for her own members. Intervals let you test a claim without any extra machinery. This idea grows into hypothesis testing.

Intervals do not forecast individuals

A last point is easy to miss. Luis's interval says the average wait is probably between 6.6 and 7.8 minutes. Suppose he promises a member, "You will never wait more than 7.8 minutes." That promise will be broken often, since the standard deviation of individual waits is 2.4 minutes. If waits were roughly normal, about 1 visit in 6 would exceed 9.6 minutes, which is the mean plus one standard deviation.

A confidence interval is about where the center of the population sits. A range for one future visit, called a prediction interval, is much wider. A weather service that says the average July high is 84 degrees has said something true and quite different from "tomorrow's high will be 84."

A short checklist for building an interval

Whenever you need an interval, walk through the same steps. First, say whether you are estimating a mean or a proportion. Second, confirm the sample is random and large enough for the bell-shaped approximation. Third, compute the estimate and its standard error. Fourth, pick a confidence level and look up its critical value. Fifth, multiply to get the margin and add and subtract it. Finally, write the answer in a sentence with units, such as "7.2 minutes, give or take 0.6."

Skipping the second step is the most common slip. The arithmetic will happily run on a bad sample and hand you a tidy interval around the wrong thing.

The common mistake: trusting the margin too much

A poll reports "plus or minus 3 points." Readers often assume every kind of error is inside that range. It is not. The margin covers only the luck of the random draw. It does not cover a bad sampling frame, people who refuse to answer, leading questions or changes of heart. Those problems, described in sampling bias, can easily be larger than the printed margin.

Two other traps are worth a look. First, the margin for a subgroup is bigger than for the whole sample. If only 100 of Ana's 400 members are students, the margin for students is about twice as large as the overall one. Second, overlapping intervals for two groups do not by themselves prove there is no difference. To compare groups, build an interval for the difference, or use a proper test.

Official data come with margins as well. A monthly change in a survey-based estimate can be smaller than its own uncertainty. Agencies such as the Bureau of Labor Statistics publish information on sampling error. Check it before calling a tiny wiggle a turning point.

Words to know

Point estimate a single number used as the best guess for an unknown value.

Confidence interval a range of plausible values for a parameter, computed from sample data.

Margin of error the amount added to and subtracted from the estimate to form the interval.

Critical value the number of standard errors needed to reach a chosen confidence level.

Confidence level the share of intervals that would capture the true value if the method were repeated many times.

t distribution a bell-shaped distribution with heavier tails than the normal, used when the spread is estimated from the sample.

Check yourself

  1. What two things are multiplied to get a margin of error?
  2. A sample of 100 has a mean of 50 and a standard deviation of 10. Using 1.96, what is the 95% interval?
  3. In a sample of 900, 50% say yes. What is the 95% margin of error?
  4. If you raise the confidence level from 95% to 99% with the same data, what happens to the interval, and why?
  5. Explain why a call-in poll is not made trustworthy by printing a small margin of error.
Show the answers
  1. The critical value for the chosen confidence level and the standard error of the estimate.
  2. SE = 10 ÷ √100 = 1, so the interval is 50 ± 1.96, or about 48.0 to 52.0.
  3. SE = √(0.5 × 0.5 ÷ 900) ≈ 0.0167, and 1.96 × 0.0167 ≈ 0.033, about 3.3 points.
  4. It gets wider, because the critical value rises from 1.96 to 2.576 so the method can capture the truth more often.
  5. The margin of error measures only random sampling variation, while a call-in poll is biased because respondents choose themselves.

A free self-study program written for 4Economics with AI writing tools and not reviewed line by line by a person. It is not an accredited degree and awards no credit. Check anything you rely on against a textbook or primary source. Report an error.

In this unit: Inference

  1. Populations, Samples and Sampling BiasLearn how a small sample can speak for a large group, which sampling methods work, and how bias quietly ruins big surveys.10 min
  2. Sampling Distributions and the Central Limit TheoremSee how sample averages vary from draw to draw, why they form a bell shape, and how the standard error measures their wobble.11 min
  3. Estimators: Bias and PrecisionJudge the recipes that turn samples into guesses by their bias, their spread and their total error, with worked examples.10 min
  4. Confidence Intervals for Means and ProportionsBuild a range around an estimate, read what 95% confidence really means, and work out how large a sample you need.10 min
  5. The Logic of Hypothesis TestingHypothesis testing asks whether a result is too surprising to blame on luck alone, and this lesson shows the steps.11 min
  6. t Tests for One and Two MeansWhen you must estimate the spread from a small sample, the t test compares one average to a target or two averages to each other.10 min
  7. p-Values, Significance and Common MistakesA p-value measures how surprising your data are if the null is true, and it is misread more often than almost any number in science.11 min
  8. Errors, Power and Sample SizeEvery test can be wrong in two ways, and power tells you how likely a study is to catch a real effect, which decides how much data to gather.10 min
  9. Chi-Square Tests for CategoriesChi-square tests compare counts in categories with what you would expect, to check a pattern or whether two traits are linked.10 min
  10. Analysis of Variance in Plain EnglishANOVA compares three or more group averages at once by asking whether groups differ more than the usual wobble inside each group.11 min

In the news