Skip to content
simstat.com Statistics by simulation

How to Interpret Confidence Intervals: What the 95% Means

Knowing how to interpret confidence intervals comes down to one idea: the 95% describes the method, not your particular interval. If you repeated the study many times and built a 95% interval each time, about 95% of those intervals would contain the true value. Your one interval either contains it or it does not, so read it as a range of plausible values for the parameter, produced by a method that is right 95% of the time.

Last updated · by the simstat.com editorial team · How we write

What the 95% refers to

A confidence interval is a range computed from a sample to estimate an unknown population value, such as a mean. Because the sample is random, the interval is random too: draw another sample and you get a different interval. The confidence level is the share of those intervals, over many repeated samples, that would contain the true value.

The NIST/SEMATECH e-Handbook (2012) puts it plainly: “The interval computed from a given sample either contains the true mean or it does not.” The level is “associated with the method of calculating the interval”, and “in the long run about 95 % of these intervals would contain the true mean”. Greenland et al. (2016) trace this view to Jerzy Neyman: as he stressed repeatedly, they write, this coverage (the share of intervals that contain the true value) “is a property of a long sequence of confidence intervals computed from valid models, rather than a property of any single confidence interval.”

Correct and incorrect readings

The formula

For a mean with unknown population standard deviation, the t interval is (NIST/SEMATECH, 2012)

xˉ±t1−α/2,  n−1 sn,\bar{x} \pm t_{1-\alpha/2,\;n-1}\,\frac{s}{\sqrt{n}},

where x̄ is the sample mean, s the sample standard deviation, n the sample size, 1 − α the confidence level, and t1−α/2,  n−1t_{1-\alpha/2,\;n-1} the critical value: the 1 − α/2 quantile of the t distribution with n − 1 degrees of freedom. When σ is known, a z value replaces t; our table of z-scores for confidence intervals lists them. The fraction s/√n is the standard error (SE) of the mean, and the critical value times the SE is the margin of error.

A worked example

Suppose the 12 values 5.1, 4.9, 6.2, 5.8, 6.0, 5.5, 5.3, 6.4, 4.7, 5.9, 5.6, 6.1 are the lengths, in centimetres, of 12 leaves picked at random from one tree. These are the confidence interval calculator’s default data.

Worked example: a 95% t interval for a mean

The sample mean is x̄ = 5.625 cm and the standard deviation is s = 0.538, so the standard error is 0.538 / √12 = 0.1553. With 11 degrees of freedom the critical value is t = 2.201, the margin of error is 2.201 × 0.1553 = 0.342, and the 95% interval runs from 5.283 to 5.967 cm.

Read it like this: the mean length of all the tree’s leaves is plausibly between 5.283 and 5.967 cm, and the method that produced this range captures the true mean in 95% of samples.

The same data at three confidence levels:

LevelCritical tMarginIntervalWidth
90%1.7960.2795.346 to 5.9040.558
95%2.2010.3425.283 to 5.9670.684
99%3.1060.4825.143 to 6.1070.964

These numbers are computed at build time with the calculator’s own code, so the tool reproduces them: choose “Mean, σ unknown (t)”, keep the default raw data, and switch the level between 90%, 95% and 99%.

Watching coverage happen

You never see the true mean in real data, so you cannot check whether your interval caught it. In a simulation you can. We drew 10,000 samples of n = 10 from a normal population with true mean μ = 0 and standard deviation 1, and built a 95% t interval from each (critical value 2.262 with 9 degrees of freedom). The first 20:

SampleMean95% intervalContains 0?
10.25−0.45 to 0.95yes
20.51−0.27 to 1.28yes
3−0.19−0.77 to 0.40yes
40.20−0.54 to 0.94yes
5−0.15−0.94 to 0.64yes
6−0.22−0.92 to 0.49yes
70.37−0.32 to 1.05yes
80.20−0.43 to 0.83yes
90.22−0.64 to 1.09yes
10−0.20−0.77 to 0.37yes
11−0.14−0.99 to 0.71yes
12−0.01−0.82 to 0.79yes
13−0.03−0.66 to 0.61yes
140.42−0.63 to 1.47yes
151.040.34 to 1.74no
160.16−0.64 to 0.95yes
170.38−0.51 to 1.26yes
18−0.03−0.79 to 0.73yes
19−0.07−0.80 to 0.66yes
200.51−0.24 to 1.26yes

Sample 15 missed: its mean happened to land far from 0. Nothing in that interval warns you; it looks just like the others. The intervals also differ in width, from 1.15 to 2.10, because each uses its own sample’s s. Cumming, Fidler and Vaux (2007) show the same picture with 20 intervals of n = 10, and note that “Successive CIs vary considerably, not only in position relative to μ, but also in length.”

How many intervals contain the true mean as the count grows? If each one does so with probability 0.95, the number of hits follows a binomial distribution (the count of successes in independent trials with the same success probability), and the last column gives the middle 95% of that binomial distribution:

IntervalsContain μShareExpectedMiddle-95% range
201995.0%1917 to 20
1009797.0%9590 to 99
1,00094094.0%950936 to 963
10,0009,49595.0%9,5009,457 to 9,542

With 20 or 100 intervals the share can easily sit a few points from 95%; only in the long run does it settle. Of the 505 misses among all 10,000, 256 intervals lay wholly below 0 and 249 wholly above, as expected from a symmetric method.

To see these samples yourself, open our sampling distribution simulator and choose the normal population, sample size 10, 10,000 samples and seed 1937. It draws exactly these samples and plots the histogram of their means.

Confidence level vs confidence interval

The confidence level is a setting you choose before looking at the data: 90%, 95% or 99%, “with 95 % being the most commonly used” (NIST/SEMATECH, 2012). The confidence interval is the pair of numbers the data then produce. The level is a property of the procedure; the interval is the result for your sample.

A higher level buys more coverage with a wider interval. On the leaf data the 99% interval is 73% wider than the 90% one, and 41% wider than the 95% one, because only the critical value changes. On the same 10,000 simulated samples, 90% intervals contained μ 90.1% of the time and 99% intervals 99.0%. To narrow an interval without lowering the level, you need a larger sample or less noisy measurements: the width shrinks in proportion to 1/√n and grows with s (NIST/SEMATECH, 2012).

How to tell a confidence interval from other error bars

A mean with a bar either side can show three different things:

They look identical on a chart, which Cumming and Finch (2005) call the first ambiguity of error bars. Cumming, Fidler and Vaux (2007) give the remedy as their Rule 1: “when showing error bars, always describe in the figure legends what they are.” If the legend is silent, you cannot be sure what the bars show. Two facts help you read them once you know the type (Cumming et al., 2007): SD bars do not change systematically with n, while SE and CI bars shrink as n grows; and for n of 10 or more, “the 95% CI is approximately M ± 2 × SE”. When the data points are plotted, SD bars hold about two-thirds of them and CI bars far fewer.

Overlap is not a test

Two 95% intervals can overlap even when the difference between the means is statistically significant, that is, when a test of no difference gives a P value (the probability of a difference at least this large if there were none) below 0.05. Greenland et al. (2016) give intervals (1.04, 4.96) and (4.16, 19.84) that overlap, yet the test of no difference gives P = 0.03. Cumming and Finch (2005) show two groups whose intervals overlap by a little more than half the average margin of error with p = .047. The reverse direction does hold: Greenland et al. note that, under the same assumptions, intervals which fail to overlap imply P < 0.05. For independent groups with n of 10 or more, Cumming et al. (2007) give a rule of thumb: “overlap of half of one arm indicates P ≈ 0.05, and just touching means P ≈ 0.01”, where an arm is the average of the two intervals’ margins of error. The rules do not apply to repeated measurements on the same group; to compare two means, compute the interval for their difference.

Prediction interval vs confidence interval

A confidence interval estimates the population mean. A prediction interval is a range for a single new observation, so it must also allow for how much individual values scatter. For one new value from a normal population it is (NIST, 2023)

xˉ±t1−α/2,  n−1  s 1+1n.\bar{x} \pm t_{1-\alpha/2,\;n-1}\; s\,\sqrt{1 + \frac{1}{n}}.

For the leaves, the 95% prediction interval for the next leaf is 4.393 to 6.857 cm (margin 1.232), 2.464 cm wide against 0.684 cm for the confidence interval: 3.6 times as wide. It contains all 12 observed lengths; the confidence interval contains 5. With more data the confidence interval keeps shrinking towards zero width, while the prediction interval levels off at about μ ± 1.96σ, the range holding the middle 95% of a normal population. NIST’s documentation notes that the formula assumes the data are approximately normal.

How to report a confidence interval

The mean leaf length was 5.63 cm (95% CI 5.28 to 5.97 cm; t interval, n = 12).

Give the confidence level, the method (t, z, Wilson, bootstrap), the sample size, and the units. When you plot error bars, say in the legend whether they are SD, SE or CI bars, and what n is.

Common mistakes

Saying the parameter has a 95% probability of being in the interval. That is a statement about a fixed number that is either inside or not. Say “95% confidence” and mean the method’s long-run hit rate.

Treating the interval as a range for the data. Only 5 of the 12 leaves fall inside the 95% confidence interval. If you want a range for individual values, use a prediction interval.

Expecting the next study’s estimate to fall inside your interval. Greenland et al. (2016) list this as misinterpretation 22: the 95% refers to how often intervals contain the true value, “not how frequently the one interval being presented will contain future estimates.”

Forgetting that 95% depends on the assumptions. The 95% holds only “if all the assumptions used to compute the intervals were correct” (Greenland et al., 2016). Repeating the simulation with a right-skewed exponential population (true mean 1, n = 10, same seed), the 95% t intervals contained μ only 90.5% of the time, and the misses were lopsided: 909 intervals fell below the mean and 45 above. For skewed data and small samples, the bootstrap confidence interval avoids the normality assumption; our guide to percentile and BCa bootstrap intervals explains the choice.

Judging significance from overlapping intervals. Overlap does not mean “no difference”; test or estimate the difference directly.

Where to go next

The statistics hub collects our calculators and guides. Use the confidence interval calculator for intervals on your own data, and the sampling distribution simulator to watch the sample-to-sample variation that every confidence interval is built to describe. Our article on the sampling distribution explains the theory behind that variation.

References

  1. NIST/SEMATECH (2012). e-Handbook of Statistical Methods, section 1.3.5.2: Confidence Limits for the Mean. National Institute of Standards and Technology (NIST Handbook 151, doi:10.18434/M32189).
  2. Greenland, S., Senn, S. J., Rothman, K. J., Carlin, J. B., Poole, C., Goodman, S. N. & Altman, D. G. (2016). Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations. European Journal of Epidemiology, 31(4), 337–350 (doi:10.1007/s10654-016-0149-3; open access at PubMed Central).
  3. Cumming, G., Fidler, F. & Vaux, D. L. (2007). Error bars in experimental biology. Journal of Cell Biology, 177(1), 7–11 (doi:10.1083/jcb.200611141; open access at PubMed Central).
  4. Cumming, G. & Finch, S. (2005). Inference by eye: Confidence intervals and how to read pictures of data. American Psychologist, 60(2), 170–180.
  5. NIST (2023). Dataplot Reference Manual: PREDICTION LIMITS. National Institute of Standards and Technology (page last updated 11 December 2023).

Try it

Related reading