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

…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.

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 $$DD$$ originate from a distribution with parameters $$θ\theta$$, namely the sampling distribution $$s(d|θ)s(d|\theta)$$ over possible statistics $$dd$$, and seek a confidence region for $$θ\theta$$ in the set of possible values $$Θ\Theta$$. Define a Highest Density Region (HDR): the $$hh$$-HDR of a PDF is the smallest subset of its domain that supports probability $$hh$$. Denote the $$hh$$-HDR of $$s(d|ψ)s(d|\psi)$$ as $$HψH_\psi$$, for any $$ψ∈Θ\psi \in \Theta$$. Then, the $$hh$$ confidence region for $$θ\theta$$, given data $$DD$$, is the set $$CD={ϕ:D∈Hϕ}C_D = \{ \phi : D \in H_\phi \}$$. A typical value of $$hh$$ would be 0.95.

## A Frequentist Interpretation

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

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

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

The confidence region $$CDC_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|θ)s(d | \theta)$$ and $$DD$$, 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(θ|I)p(\theta | I)$$.
2. Relate $$θ\theta$$ to another distributed quantity: $$p(θ|I)=∫p(θx|I)dx=∫p(θ|xI)p(x|I)dxp(\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 $$hh$$ confidence region $$CDC_D$$, given without qualification, is simply the direct interpretation: that it is the set of $$ϕ\phi$$ for which $$DD$$ falls in the $$hh$$-HDR $$HϕH_\phi$$ of the sampling distribution $$s(d|ϕ)s(d|\phi)$$. It does not necessarily tell us much about $$θ\theta$$, and here’s why.

The probability that $$θ∈CD\theta \in C_D$$, given $$DD$$ and the background information $$II$$, is:
P(θ∈CD|DI)=∫CDp(θ|DI)dθ=∫CDp(D|θI)p(θ|I)p(D|I)dθ\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 $$II$$ tells us, as before, that the sampling distribution is $$s(d|θ)s(d | \theta)$$:
P(θ∈CD|DI)=∫CDs(D|θ)p(θ|I)p(D|I)dθ=∫CDs(D|θ)p(θ|I)dθp(D|I)i.e.P(θ∈CD|DI)=∫CDs(D|θ)p(θ|I)dθ∫s(D|θ)p(θ|I)dθ\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 $$hh$$, which is to say, the $$hh$$ confidence region $$CDC_D$$ does not always contain $$θ\theta$$ with probability $$hh$$. In fact it can be starkly different from $$hh$$. There are, however, many common situations in which it does evaluate to $$hh$$, which is why confidence regions are often consistent with our probabilistic intuitions.

For example, suppose that the prior joint PDF of $$dd$$ and $$θ\theta$$ is symmetric in that $$pd,θ(d,θ|I)=pd,θ(θ,d|I)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 $$dd$$ and $$θ\theta$$.) Then, if the prior is $$p(θ|I)=f(θ)p(\theta | I) = f(\theta)$$, we have $$s(D|θ)p(θ|I)=s(D|θ)f(θ)=s(θ|D)f(D)s(D | \theta) p(\theta | I) = s(D | \theta) f(\theta) = s(\theta | D) f(D)$$. Hence
P(θ∈CD|DI)=∫CDs(θ|D)dθ∫s(θ|D)dθi.e.P(θ∈CD|DI)=∫CDs(θ|D)dθ\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$$
∫Hψs(d|ψ)dd=hand therefore that∫HDs(d|D)dd=hor equivalently∫HDs(θ|D)dθ=h\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|θ)f(θ)=s(θ|d)f(d)s(d | \theta) f(\theta) = s(\theta | d) f(d)$$, $$CD=HDC_D = H_D$$ implies $$P(θ∈CD|DI)=hP(\theta \in C_D | DI) = h$$. The antecedent satisfies
$$CD=HD⟷∀ψ[ψ∈CD↔ψ∈HD] C_D = H_D \longleftrightarrow \forall \psi \; [ \psi \in C_D \leftrightarrow \psi \in H_D ]$$
Applying the equivalence near the top:
$$CD=HD⟷∀ψ[D∈Hψ↔ψ∈HD] C_D = H_D \longleftrightarrow \forall \psi \; [ D \in H_\psi \leftrightarrow \psi \in H_D ]$$
Thus, the confidence region $$CDC_D$$ contains $$θ\theta$$ with probability $$hh$$ if for all possible values $$ψ\psi$$ of $$θ\theta$$, the $$hh$$-HDR of $$s(d|ψ)s(d | \psi)$$ contains $$DD$$ if and only if the $$hh$$-HDR of $$s(d|D)s(d | D)$$ contains $$ψ\psi$$.

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

1. $$s(d|θ)f(θ)=s(θ|d)f(d)s(d | \theta) f(\theta) = s(\theta | d) f(d)$$ (premise)
2. $$∀ψ∀δ[s(ψ+δ|ψ)=s(D−δ|D)]\forall \psi \; \forall \delta \; [ s(\psi + \delta | \psi) = s(D - \delta | D) ]$$ (premise)
3. $$∀ψ∀δ[s(ψ+δ|ψ)=s(D−δ|D)]⟶∀ψ[D∈Hψ↔ψ∈HD]\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\forall \psi \; [ D \in H_\psi \leftrightarrow \psi \in H_D ] \longrightarrow C_D = H_D$$
6. $$\therefore \quad C_D = H_D\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[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\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)(\mu, \sigma)$$, given a sample mean $$\bar{x}\bar{x}$$ from $$nn$$ measurements. We have $$\theta = \mu\theta = \mu$$ and $$d = \bar{x}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 } 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\theta$$ before taking the data (except that it’s a location parameter) and therefore assign a uniform prior: $$f(\theta) = kf(\theta) = k$$. Clearly we now have $$s(d | \theta) f(\theta) = s(\theta | d) f(d)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)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*}\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\theta$$ lies in the confidence interval $$C_DC_D$$ is $$hh$$!

We therefore have an amusing irony:

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

## Final Remarks

We have identified conditions (i.e. the two premises) under which the $$hh$$ confidence region does indeed yield probability $$hh$$ that $$\theta \in C_D\theta \in C_D$$. A frequentist will baulk at the first premise, because it involves a prior on $$\theta\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)P(\theta \in C_D | DI)$$ equals $$hh$$. Equally though, there are many circumstances in which $$P(\theta \in C_D | DI) \ne hP(\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 $$DD$$. But a Bayesian, if he possibly can, will apply his methods to the raw measurements instead—to the $$\{x_i\}\{x_i\}$$, rather than $$\bar{x}\bar{x}$$. Oftentimes, collapsing the raw data into summary statistics $$DD$$ destroys information in the data; and then the summary statistics are incapable of speaking as eloquently as the original data about the parameters $$\theta\theta$$.