Answer
Is there a 95% probability that your confidence interval covers the true mean?
The short answer
Before you collect data, there is a 95% probability that the interval you are about to compute will cover the true mean. After you compute it, frequentist probability has nothing more to say about that particular interval: the 95% is a long-run property of the procedure. Reading it as a 95% chance for your interval is often a harmless approximation, but it can fail badly when the data themselves tell you whether this interval is a lucky or unlucky one.
What the 95% refers to
A 95% confidence interval comes from a recipe: take a sample, compute an estimate, and add and subtract a margin. The guarantee is about the recipe. If you repeated the whole study many times, about 95% of the intervals it produces would contain the true value. That long-run success rate is called the coverage of the method.
In the frequentist framework that confidence intervals come from, the true mean is a fixed number, not a random quantity. Probability statements attach to things that vary from sample to sample, and the interval's endpoints are what vary. So the precise statement is: before sampling, the probability that the interval will cover the mean is 0.95.
Why the step to 'my interval' is not automatic
Once you have the numbers, say 8.1 to 11.6, either the mean is in that range or it is not. A frequentist cannot assign that fixed-but-unknown fact a probability other than 0 or 1, because there is nothing left that varies. This can feel like pedantry, and a common comparison is a coin that has already been tossed and covered: surely it is still fair to say heads has a 50% chance?
That intuition is reasonable, and it is essentially a Bayesian way of thinking: probability as your degree of belief given what you know. The catch is that the coin analogy only works if you know nothing else that bears on the outcome. With a covered coin, you have no extra clue. With a confidence interval, you usually do: the data you just looked at, and whatever you knew about the subject before the study. The 95% figure ignores both.
An example where the shortcut fails
Take two observations from a symmetric continuous distribution and use the range between the smaller and the larger as an interval for the center. Each value falls above the center half the time, so the interval misses only when both land on the same side. That happens with probability 1/4 + 1/4, so the method has exactly 50% coverage: a valid 50% confidence interval.
Now suppose your two values happen to be very far apart relative to the spread of the distribution. An interval that wide almost surely straddles the center, so your real confidence in that particular interval should be far above 50%. If the two values nearly coincide, the interval is tiny and much less likely to contain the center. The procedure averages over both situations, and the data tell you which one you are in. Saying "this interval has a 50% chance" would ignore information in plain sight.
Prior knowledge causes the same problem. If an interval for a proportion came out as 0.97 to 1.08, you know part of it is impossible, whatever the stated confidence level.
See it in R
The script checks the coverage of ordinary t-intervals, then repeats the two-point example and splits the results by interval width. The figures quoted here come from one seeded run.
set.seed(123)
mu <- 10; sigma <- 2; n <- 20; reps <- 10000
# Coverage: build many 95% t-intervals for the mean and count how many contain mu
covers <- replicate(reps, {
x <- rnorm(n, mu, sigma)
ci <- t.test(x)$conf.int
ci[1] <= mu && mu <= ci[2]
})
round(mean(covers), 3)
# Where "95%" breaks down: the interval from two observations, (min, max),
# contains the median of a continuous distribution 50% of the time overall...
width_hit <- replicate(reps, {
x <- rnorm(2, mu, sigma)
c(width = abs(x[1] - x[2]), hit = min(x) <= mu && mu <= max(x))
})
width <- width_hit["width", ]; hit <- width_hit["hit", ]
round(mean(hit), 3)
# ...but wide intervals usually contain mu and narrow ones much less often
round(tapply(hit, width > 2 * sigma, mean), 3)
Output from one seeded run (same numbers on a second run):
[1] 0.949
[1] 0.499
FALSE TRUE
0.422 0.917
Of 10,000 t-intervals, 94.9% contained the true mean, as the method promises. The two-point intervals covered the center 49.9% of the time overall. But among intervals wider than two standard deviations, 91.7% contained it, while the narrower ones did so only 42.2% of the time. Same procedure, same nominal level, very different reliability depending on what the sample looked like.
So can you ever say 95% chance?
- For the standard t-interval for a mean, it is usually close. With no strong prior information, a Bayesian analysis using a flat prior gives a credible interval that matches the t-interval exactly, so the informal reading does little harm there.
- It is not guaranteed in general. Whenever the data carry clues about the interval's accuracy, or you know something beforehand, the probability you should assign to this specific interval can differ a lot from the confidence level.
- If you want a direct probability statement, use a Bayesian credible interval. It says, given the model, the prior and the data, where the parameter probably lies. That is the statement most people actually want to make.
- A safe way to report it: "We are 95% confident the mean lies between 8.1 and 11.6," where confidence refers to the reliability of the method. Avoid writing that the mean has a 95% probability of being in the interval unless you have done a Bayesian analysis.
The interval is still useful either way. Its width shows how precise your estimate is, and values outside it are the ones a test at the 5% level would reject. The key is to remember that the 95% is a promise about how often the method works, not a promise about this particular interval.
Related tools and guides
- Which statistical test should I use?
- Where does the 1/sqrt(n) margin of error come from?
- Confidence interval (Wikipedia)
- Credible interval (Wikipedia)
More answered questions
Working with your own data?
General answers only go so far. Send us your situation and we'll reply by email within two business days.
Ask your questionWritten by AskStats with AI assistance. This is general information, not advice for your specific data or study. When the results matter, check your approach with a qualified statistician.