# From a Bayesian probability perspective, why doesn't a 95% confidence interval contain the true parameter with 95% probability?

From the Wikipedia page on confidence intervals:

...if confidence intervals are constructed across many separate data analyses of repeated (and possibly different) experiments, the proportion of such intervals that contain the true value of the parameter will match the confidence level...

And from the same page:

A confidence interval does not predict that the true value of the parameter has a particular probability of being in the confidence interval given the data actually obtained.

If I understood it right, this last statement is made with the frequentist interpretation of probability in mind. However, from a Bayesian probability perspective, why doesn't a 95% confidence interval contain the true parameter with 95% probability? And if it doesn't, what is wrong with the following reasoning?

If I have a process that I know produces a correct answer 95% of the time then the probability of the next answer being correct is 0.95 (given that I don't have any extra information regarding the process). Similarly if someone shows me a confidence interval that is created by a process that will contain the true parameter 95% of the time, should I not be right in saying that it contains the true parameter with 0.95 probability, given what I know?

This question is similar to, but not the same as, Why does a 95% CI not imply a 95% chance of containing the mean? The answers to that question have been focusing on why a 95% CI does not imply a 95% chance of containing the mean from a frequentist perspective. My question is the same, but from a Bayesian probability perspective.

• One way to think of this is 95% CI is a "long run average". Now there are many way to split up your "short run" cases so that fairly arbitrary coverage is obtained - but when averaged out give 95% overall. Another, more abstract way is generate $x_i\sim Bernoulli (p_i)$ for $i=1, 2,\dots$ such that $\sum_{i=1}^{\infty} p_i=0.95$. There is an infinite number of ways you can do this. Here $x_i$ indicates whether or not the CI created with the ith data set contained the parameter, and $p_i$ is the coverage probability for this case. Commented Mar 11, 2014 at 14:45

Update: With the benefit of a few years' hindsight, I've penned a more concise treatment of essentially the same material in response to a similar question.

## How to Construct a Confidence Region

Let us begin with a general method for constructing confidence regions. It can be applied to a single parameter, to yield a confidence interval or set of intervals; and it can be applied to two or more parameters, to yield higher dimensional confidence regions.

We assert that the observed statistics $$D$$ originate from a distribution with parameters $$\theta$$, namely the sampling distribution $$s(d|\theta)$$ over possible statistics $$d$$, and seek a confidence region for $$\theta$$ in the set of possible values $$\Theta$$. Define a Highest Density Region (HDR): the $$h$$-HDR of a PDF is the smallest subset of its domain that supports probability $$h$$. Denote the $$h$$-HDR of $$s(d|\psi)$$ as $$H_\psi$$, for any $$\psi \in \Theta$$. Then, the $$h$$ confidence region for $$\theta$$, given data $$D$$, is the set $$C_D = \{ \phi : D \in H_\phi \}$$. A typical value of $$h$$ would be 0.95.

## A Frequentist Interpretation

From the preceding definition of a confidence region follows $$d \in H_\psi \longleftrightarrow \psi \in C_d$$ with $$C_d = \{ \phi : d \in H_\phi \}$$. Now imagine a large set of (imaginary) observations $$\{D_i\}$$, taken under similar circumstances to $$D$$. i.e. They are samples from $$s(d|\theta)$$. Since $$H_\theta$$ supports probability mass $$h$$ of the PDF $$s(d|\theta)$$, $$P(D_i \in H_\theta) = h$$ for all $$i$$. Therefore, the fraction of $$\{D_i\}$$ for which $$D_i \in H_\theta$$ is $$h$$. And so, using the equivalence above, the fraction of $$\{D_i\}$$ for which $$\theta \in C_{D_i}$$ is also $$h$$.

This, then, is what the frequentist claim for the $$h$$ confidence region for $$\theta$$ amounts to:

Take a large number of imaginary observations $$\{D_i\}$$ from the sampling distribution $$s(d|\theta)$$ that gave rise to the observed statistics $$D$$. Then, $$\theta$$ lies within a fraction $$h$$ of the analogous but imaginary confidence regions $$\{C_{D_i}\}$$.

The confidence region $$C_D$$ therefore does not make any claim about the probability that $$\theta$$ lies somewhere! The reason is simply that there is nothing in the fomulation that allows us to speak of a probability distribution over $$\theta$$. The interpretation is just elaborate superstructure, which does not improve the base. The base is only $$s(d | \theta)$$ and $$D$$, where $$\theta$$ does not appear as a distributed quantity, and there is no information we can use to address that. There are basically two ways to get a distribution over $$\theta$$:

1. Assign a distribution directly from the information at hand: $$p(\theta | I)$$.
2. Relate $$\theta$$ to another distributed quantity: $$p(\theta | I) = \int p(\theta x | I) dx = \int p(\theta | x I) p(x | I) dx$$.

In both cases, $$\theta$$ must appear on the left somewhere. Frequentists cannot use either method, because they both require a heretical prior.

## A Bayesian View

The most a Bayesian can make of the $$h$$ confidence region $$C_D$$, given without qualification, is simply the direct interpretation: that it is the set of $$\phi$$ for which $$D$$ falls in the $$h$$-HDR $$H_\phi$$ of the sampling distribution $$s(d|\phi)$$. It does not necessarily tell us much about $$\theta$$, and here's why.

The probability that $$\theta \in C_D$$, given $$D$$ and the background information $$I$$, is: \begin{align*} P(\theta \in C_D | DI) &= \int_{C_D} p(\theta | DI) d\theta \\ &= \int_{C_D} \frac{p(D | \theta I) p(\theta | I)}{p(D | I)} d\theta \end{align*} Notice that, unlike the frequentist interpretation, we have immediately demanded a distribution over $$\theta$$. The background information $$I$$ tells us, as before, that the sampling distribution is $$s(d | \theta)$$: \begin{align*} P(\theta \in C_D | DI) &= \int_{C_D} \frac{s(D | \theta) p(\theta | I)}{p(D | I)} d \theta \\ &= \frac{\int_{C_D} s(D | \theta) p(\theta | I) d\theta}{p(D | I)} \\ \text{i.e.} \quad\quad P(\theta \in C_D | DI) &= \frac{\int_{C_D} s(D | \theta) p(\theta | I) d\theta}{\int s(D | \theta) p(\theta | I) d\theta} \end{align*} Now this expression does not in general evaluate to $$h$$, which is to say, the $$h$$ confidence region $$C_D$$ does not always contain $$\theta$$ with probability $$h$$. In fact it can be starkly different from $$h$$. There are, however, many common situations in which it does evaluate to $$h$$, which is why confidence regions are often consistent with our probabilistic intuitions.

For example, suppose that the prior joint PDF of $$d$$ and $$\theta$$ is symmetric in that $$p_{d,\theta}(d,\theta | I) = p_{d,\theta}(\theta,d | I)$$. (Clearly this involves an assumption that the PDF ranges over the same domain in $$d$$ and $$\theta$$.) Then, if the prior is $$p(\theta | I) = f(\theta)$$, we have $$s(D | \theta) p(\theta | I) = s(D | \theta) f(\theta) = s(\theta | D) f(D)$$. Hence \begin{align*} P(\theta \in C_D | DI) &= \frac{\int_{C_D} s(\theta | D) d\theta}{\int s(\theta | D) d\theta} \\ \text{i.e.} \quad\quad P(\theta \in C_D | DI) &= \int_{C_D} s(\theta | D) d\theta \end{align*} From the definition of an HDR we know that for any $$\psi \in \Theta$$ \begin{align*} \int_{H_\psi} s(d | \psi) dd &= h \\ \text{and therefore that} \quad\quad \int_{H_D} s(d | D) dd &= h \\ \text{or equivalently} \quad\quad \int_{H_D} s(\theta | D) d\theta &= h \end{align*} Therefore, given that $$s(d | \theta) f(\theta) = s(\theta | d) f(d)$$, $$C_D = H_D$$ implies $$P(\theta \in C_D | DI) = h$$. The antecedent satisfies $$C_D = H_D \longleftrightarrow \forall \psi \; [ \psi \in C_D \leftrightarrow \psi \in H_D ]$$ Applying the equivalence near the top: $$C_D = H_D \longleftrightarrow \forall \psi \; [ D \in H_\psi \leftrightarrow \psi \in H_D ]$$ Thus, the confidence region $$C_D$$ contains $$\theta$$ with probability $$h$$ if for all possible values $$\psi$$ of $$\theta$$, the $$h$$-HDR of $$s(d | \psi)$$ contains $$D$$ if and only if the $$h$$-HDR of $$s(d | D)$$ contains $$\psi$$.

Now the symmetric relation $$D \in H_\psi \leftrightarrow \psi \in H_D$$ is satisfied for all $$\psi$$ when $$s(\psi + \delta | \psi) = s(D - \delta | D)$$ for all $$\delta$$ that span the support of $$s(d | D)$$ and $$s(d | \psi)$$. We can therefore form the following argument:

1. $$s(d | \theta) f(\theta) = s(\theta | d) f(d)$$ (premise)
2. $$\forall \psi \; \forall \delta \; [ s(\psi + \delta | \psi) = s(D - \delta | D) ]$$ (premise)
3. $$\forall \psi \; \forall \delta \; [ s(\psi + \delta | \psi) = s(D - \delta | D) ] \longrightarrow \forall \psi \; [ D \in H_\psi \leftrightarrow \psi \in H_D ]$$
4. $$\therefore \quad \forall \psi \; [ D \in H_\psi \leftrightarrow \psi \in H_D ]$$
5. $$\forall \psi \; [ D \in H_\psi \leftrightarrow \psi \in H_D ] \longrightarrow C_D = H_D$$
6. $$\therefore \quad C_D = H_D$$
7. $$[s(d | \theta) f(\theta) = s(\theta | d) f(d) \wedge C_D = H_D] \longrightarrow P(\theta \in C_D | DI) = h$$
8. $$\therefore \quad P(\theta \in C_D | DI) = h$$

Let's apply the argument to a confidence interval on the mean of a 1-D normal distribution $$(\mu, \sigma)$$, given a sample mean $$\bar{x}$$ from $$n$$ measurements. We have $$\theta = \mu$$ and $$d = \bar{x}$$, so that the sampling distribution is $$s(d | \theta) = \frac{\sqrt{n}}{\sigma \sqrt{2 \pi}} e^{-\frac{n}{2 \sigma^2} { \left( d - \theta \right) }^2 }$$ Suppose also that we know nothing about $$\theta$$ before taking the data (except that it's a location parameter) and therefore assign a uniform prior: $$f(\theta) = k$$. Clearly we now have $$s(d | \theta) f(\theta) = s(\theta | d) f(d)$$, so the first premise is satisfied. Let $$s(d | \theta) = g\left( (d - \theta)^2 \right)$$. (i.e. It can be written in that form.) Then $$\begin{gather*} s(\psi + \delta | \psi) = g \left( (\psi + \delta - \psi)^2 \right) = g(\delta^2) \\ \text{and} \quad\quad s(D - \delta | D) = g \left( (D - \delta - D)^2 \right) = g(\delta^2) \\ \text{so that} \quad\quad \forall \psi \; \forall \delta \; [s(\psi + \delta | \psi) = s(D - \delta | D)] \end{gather*}$$ whereupon the second premise is satisfied. Both premises being true, the eight-point argument leads us to conclude that the probability that $$\theta$$ lies in the confidence interval $$C_D$$ is $$h$$!

We therefore have an amusing irony:

1. The frequentist who assigns the $$h$$ confidence interval cannot say that $$P(\theta \in C_D) = h$$, no matter how innocently uniform $$\theta$$ looks before incorporating the data.
2. The Bayesian who would not assign an $$h$$ confidence interval in that way knows anyhow that $$P(\theta \in C_D | DI) = h$$.

## Final Remarks

We have identified conditions (i.e. the two premises) under which the $$h$$ confidence region does indeed yield probability $$h$$ that $$\theta \in C_D$$. A frequentist will baulk at the first premise, because it involves a prior on $$\theta$$, and this sort of deal-breaker is inescapable on the route to a probability. But for a Bayesian, it is acceptable---nay, essential. These conditions are sufficient but not necessary, so there are many other circumstances under which the Bayesian $$P(\theta \in C_D | DI)$$ equals $$h$$. Equally though, there are many circumstances in which $$P(\theta \in C_D | DI) \ne h$$, especially when the prior information is significant.

We have applied a Bayesian analysis just as a consistent Bayesian would, given the information at hand, including statistics $$D$$. But a Bayesian, if he possibly can, will apply his methods to the raw measurements instead---to the $$\{x_i\}$$, rather than $$\bar{x}$$. Oftentimes, collapsing the raw data into summary statistics $$D$$ destroys information in the data; and then the summary statistics are incapable of speaking as eloquently as the original data about the parameters $$\theta$$.

• Would it be correct to say that a Bayesian is committed to take all the available information into account, while interpretation given in the question ignored D in some sense? Commented Oct 9, 2018 at 6:23
• Is it a good mental picture to illustrate the situation: imagine a grayscale image, where intensity of pixel x,y is the joint ppb of real param being y and observed stat being x. In each row y, we mark pixels which have 95% mass of the row. For each observed stat x, we define CI(x) to be the set of rows which have marked pixels in column x. Now, if we choose x,y randomly then CI(x) will contain y iff x,y was marked, and mass of marked pixels is 95% for each y. So, frequentists say that keeping y fixed, chance is 95%, OP says, that not fixing y also gives 95%, and bayesians fix y and don't know Commented Oct 9, 2018 at 6:35
• @qbolec It is correct to say that in the Bayesian method one cannot arbitrarily ignore some information while taking account of the rest. Frequentists say that for all $y$ the expectation of $y \in \mathrm{CI}(x)$ (as a Boolean integer) under the sampling distribution $\mathrm{prob}(x\, |\, y, I)$ is 0.95. The frequentist 0.95 is not a probability but an expectation. Commented Feb 10, 2019 at 11:45
• what a very detailed and wonderful answer! Commented Dec 25, 2022 at 6:54

from a Bayesian probability perspective, why doesn't a 95% confidence interval contain the true parameter with 95% probability?

Two answers to this, the first being less helpful than the second

1. There are no confidence intervals in Bayesian statistics, so the question doesn't pertain.

2. In Bayesian statistics, there are however credible intervals, which play a similar role to confidence intervals. If you view priors and posteriors in Bayesian statistics as quantifying the reasonable belief that a parameter takes on certain values, then the answer to your question is yes, a 95% credible interval represents an interval within which a parameter is believed to lie with 95% probability.

If I have a process that I know produces a correct answer 95% of the time then the probability of the next answer being correct is 0.95 (given that I don't have any extra information regarding the process).

yes, the process guesses a right answer with 95% probability

Similarly if someone shows me a confidence interval that is created by a process that will contain the true parameter 95% of the time, should I not be right in saying that it contains the true parameter with 0.95 probability, given what I know?

Just the same as your process, the confidence interval guesses the correct answer with 95% probability. We're back in the world of classical statistics here: before you gather the data you can say there's a 95% probability of randomly gathered data determining the bounds of the confidence interval such that the mean is within the bounds.

With your process, after you've gotten your answer, you can't say based on whatever your guess was, that the true answer is the same as your guess with 95% probability. The guess is either right or wrong.

And just the same as your process, in the confidence interval case, after you've gotten the data and have an actual lower and upper bound, the mean is either within those bounds or it isn't, i.e. the chance of the mean being within those particular bounds is either 1 or 0. (Having skimmed the question you refer to it seems this is covered in much more detail there.)

How to interpret a confidence interval given to you if you subscribe to a Bayesian view of probability.

There are a couple of ways of looking at this

1. Technically, the confidence interval hasn't been produced using a prior and Bayes theorem, so if you had a prior belief about the parameter concerned, there would be no way you could interpret the confidence interval in the Bayesian framework.

2. Another widely used and respected interpretation of confidence intervals is that they provide a "plausible range" of values for the parameter (see, e.g., here). This de-emphasises the "repeated experiments" interpretation.

Moreover, under certain circumstances, notably when the prior is uninformative (doesn't tell you anything, e.g. flat), confidence intervals can produce exactly the same interval as a credible interval. In these circumstances, as a Bayesianist you could argue that had you taken the Bayesian route you would have gotten exactly the same results and you could interpret the confidence interval in the same way as a credible interval.

• but for sure confidence intervals exist even if I subscribe to a bayesian view of probability, they just wont dissapear, right? :)The situation I was asking about was how to interpret a confidence interval given to you if you subscribe to a Bayesian view of probability. Commented Mar 7, 2014 at 8:50
• The problem is that confidence intervals aren't produced using a Bayesian methodology. You don't start with a prior. I'll edit the post to add something which might help. Commented Mar 7, 2014 at 12:30

I'll give you an extreme example where they are different.

Suppose I create my 95% confidence interval for a parameter $\theta$ as follows. Start by sampling the data. Then generate a random number between $0$ and $1$. Call this number $u$. If $u$ is less than $0.95$ then return the interval $(-\infty,\infty)$. Otherwise return the "null" interval.

Now over continued repititions, 95% of the CIs will be "all numbers" and hence contain the true value. The other 5% contain no values, hence have zero coverage. Overall, this is a useless, but technically correct 95% CI.

The Bayesian credible interval will be either 100% or 0%. Not 95%.

• So is it correct to say that before seeing a confidence interval there is a 95% probability that it will contain the true parameter, but for any given confidence interval the probability that it covers the true parameter depends on the data (and our prior)? To be honest, what I'm really struggling with is how useless confidence intervals sounds (credible intervals I like on the other hand) and the fact that I never the less will have to teach them to our students next week... :/ Commented Mar 11, 2014 at 16:49
• This question has some more examples, plus a very good paper comparing the two approaches Commented Mar 12, 2014 at 6:40

"from a Bayesian probability perspective, why doesn't a 95% confidence interval contain the true parameter with 95% probability? "

In Bayesian Statistics the parameter is not a unknown value, it is a Distribution. There is no interval containing the "true value", for a Bayesian point of view it does not even make sense. The parameter it's a random variable, you can perfectly know the probability of that value to be between x_inf an x_max if you know the distribuition. It's just a diferent mindset about the parameters, usually Bayesians used the median or average value of the distribuition of the parameter as a "estimate". There is not a confidence interval in Bayesian Statistics, something similar is called credibility interval.

Now from a frequencist point of view, the parameter is a "Fixed Value", not a random variable, can you really obtain probability interval (a 95% one) ? Remember that it's a fixed value not a random variable with a known distribution. Thats why you past the text :"A confidence interval does not predict that the true value of the parameter has a particular probability of being in the confidence interval given the data actually obtained."

The idea of repeating the experience over and over... is not Bayesian reasoning it's a Frequencist one. Imagine a real live experiment that you can only do once in your life time, can you/should you built that confidence interval (from the classical point of view )?.

But... in real life the results could get pretty close ( Bayesian vs Frequencist), maybe thats why It could be confusing.