Algorithm Search⌘K

Definitionintro

Credible interval

Also called Bayesian confidence interval, equal-tailed credible interval.

An interval that holds the parameter with a stated posterior probability. Unlike a confidence interval, the probability is about the parameter given the data.

A 1−α1 - \alpha credible interval is an interval of parameter values that has posterior probability 1−α1 - \alpha given the observed data. It comes from a prior and a model through Bayes' theorem, and its statement is about the parameter θ\theta after the data xx are fixed: P(θ∈[a,b]∣x)=1−αP(\theta \in [a, b] \mid x) = 1 - \alpha. The usual choice cuts α/2\alpha/2 of posterior probability from each tail, so its ends are two posterior quantiles. A credible interval is not a confidence interval: its coverage over repeated samples at a fixed θ\theta is a separate property, which can be far from 1−α1 - \alpha.

Definition

Let θ∈Θ⊆R\theta \in \Theta \subseteq \mathbb{R} have a proper prior π\pi, and let the data xx have density f(x∣θ)f(x \mid \theta). The posterior π(dθ∣x)\pi(d\theta \mid x) is the conditional law of θ\theta given xx, as in Bayesian inference.

  • A set C(x)⊆ΘC(x) \subseteq \Theta is a 1−α1 - \alpha credible set if π(C(x)∣x)≥1−α\pi(C(x) \mid x) \ge 1 - \alpha. For a continuous posterior the usual choice has probability exactly 1−α1 - \alpha.
  • A credible interval is a credible set that is an interval [a(x),b(x)][a(x), b(x)].
  • The equal-tailed credible interval is [qα/2(x),q1−α/2(x)][q_{\alpha/2}(x), q_{1 - \alpha/2}(x)], where qp(x)q_p(x) is the pp-quantile of the posterior. Each tail outside it has posterior probability α/2\alpha/2.
  • A one-sided credible bound is q1−α(x)q_{1-\alpha}(x) (upper) or qα(x)q_\alpha(x) (lower).
  • The highest posterior density region is the credible set of smallest length; for a skewed posterior it differs from the equal-tailed interval.

The same definitions apply to a function g(θ)g(\theta), with the posterior law of g(θ)g(\theta) in place of that of θ\theta. An improper prior is allowed when the posterior it gives is proper (see improper prior).

The Bayesian statement

Given xx, the interval is fixed and θ\theta is random under the posterior. "θ\theta is in [0.1093,0.6097][0.1093, 0.6097] with probability 0.95" is a correct sentence about a credible interval, under the stated prior and model. Another prior gives another interval, and the statement is only as good as the prior and the model.

Invariance under monotone maps. Let ϕ=g(θ)\phi = g(\theta) with gg strictly increasing. Then P(g(θ)≤g(q)∣x)=P(θ≤q∣x)P(g(\theta) \le g(q) \mid x) = P(\theta \le q \mid x), so the posterior quantiles of ϕ\phi are gg of the posterior quantiles of θ\theta, and the equal-tailed interval for ϕ\phi is [g(qα/2(x)),g(q1−α/2(x))][g(q_{\alpha/2}(x)), g(q_{1-\alpha/2}(x))]. For a decreasing gg the two ends change places. The highest posterior density region does not have this property.

Frequentist coverage of a credible interval

The coverage of the rule x↦C(x)x \mapsto C(x) at a fixed θ\theta is Pθ(θ∈C(X))P_\theta(\theta \in C(X)), the probability over repeated samples, as for a confidence interval. Two facts connect it with the posterior probability.

  1. Averaged over the prior, the coverage is 1−α1 - \alpha. If π\pi is proper and π(C(x)∣x)=1−α\pi(C(x) \mid x) = 1 - \alpha for every xx, then ∫Pθ(θ∈C(X)) π(dθ)=1−α\int P_\theta(\theta \in C(X))\, \pi(d\theta) = 1 - \alpha. Proof: the joint law of (θ,X)(\theta, X) is π(dθ)f(x∣θ) dx\pi(d\theta) f(x \mid \theta)\, dx, and it is also m(dx) π(dθ∣x)m(dx)\, \pi(d\theta \mid x), where mm is the marginal law of XX. By Fubini's theorem, ∬1{θ∈C(x)} π(dθ)f(x∣θ) dx=∫π(C(x)∣x) m(dx)=1−α\iint 1\{\theta \in C(x)\}\, \pi(d\theta) f(x \mid \theta)\, dx = \int \pi(C(x) \mid x)\, m(dx) = 1 - \alpha.
  2. At a fixed θ\theta the coverage can take any value. A prior that puts little mass near θ\theta gives low coverage there, and high coverage elsewhere, so that the average stays at 1−α1 - \alpha.

Coverage at a fixed θ\theta tends to 1−α1 - \alpha in regular parametric models under the conditions of the Bernstein-von Mises theorem. That theorem is the only general bridge between the two statements. Below, all coverage numbers are measured: they are exact sums of binomial probabilities at each θ\theta, and they are not a theorem.

Examples and non-examples

A binomial proportion. Let X∣p∼X \mid p \sim Binomial(10,p)(10, p) and observe x=3x = 3. Under the uniform prior Beta(1,1)(1, 1) the posterior is Beta(4,8)(4, 8), with mean 1/31/3. Its equal-tailed 95% credible interval is [0.1093,0.6097][0.1093, 0.6097], of length 0.5005. Under the Jeffreys prior Beta(1/2,1/2)(1/2, 1/2) the posterior is Beta(3.5,7.5)(3.5, 7.5) and the interval is [0.0927,0.6058][0.0927, 0.6058]. For comparison, the Clopper-Pearson 95% confidence interval for the same data is [0.0667,0.6525][0.0667, 0.6525]; it has a different meaning.

Invariance. Map the Beta(4,8)(4, 8) interval to the odds p/(1−p)p/(1 - p): the 95% interval for the odds is [0.1227,1.5624][0.1227, 1.5624], and for the log-odds it is [−2.0983,0.4462][-2.0983, 0.4462]. These are the ends of [0.1093,0.6097][0.1093, 0.6097] put through the map, and each still cuts 2.5% from each tail.

A normal mean with known variance. Let X1,…,X5∣μX_1, \ldots, X_5 \mid \mu be iid N(μ,0.52)N(\mu, 0.5^2) with data 9.8, 10.4, 10.1, 9.6, 10.6, so xˉ=10.1\bar x = 10.1. With the prior μ∼N(9,0.42)\mu \sim N(9, 0.4^2) the posterior is normal with precision 1/0.42+5/0.52=26.251/0.4^2 + 5/0.5^2 = 26.25, mean 9.8381 and standard deviation 0.1952 (conjugate prior). The 95% credible interval is 9.8381±1.959964×0.1952=[9.4555,10.2206]9.8381 \pm 1.959964 \times 0.1952 = [9.4555, 10.2206]. It is pulled toward the prior mean 9. With the flat prior on μ\mu the posterior is N(10.1,0.52/5)N(10.1, 0.5^2/5) and the interval is [9.6617,10.5383][9.6617, 10.5383], the same numbers as the z confidence interval, with the meaning of a posterior probability.

Coverage at a fixed pp (measured). For n=10n = 10 and the uniform prior, the 95% equal-tailed interval has exact coverage 0.9298 at p=0.1p = 0.1, 0.9244 at p=0.3p = 0.3 and 0.9785 at p=0.5p = 0.5. For pp in [0.05,0.95][0.05, 0.95] the infimum is 0.8817, approached as pp rises to 0.0602, the lower end of the interval for x=2x = 2; below 0.05 the coverage falls further, to 0.7938 just below p=0.0228p = 0.0228. For p<0.0023p < 0.0023 the coverage is 0, because the interval for x=0x = 0 is [0.0023,0.2849][0.0023, 0.2849] and every other interval starts higher. The mean coverage over the grid p=0.001,0.002,…,0.999p = 0.001, 0.002, \ldots, 0.999 is 0.9506, close to the exact prior average 0.95 of fact 1.

A strong prior (measured). With the prior Beta(20,20)(20, 20) and the same n=10n = 10, the interval for x=3x = 3 is [0.3253,0.5977][0.3253, 0.5977]; it does not contain the sample proportion 0.3. The exact coverage is 0 at p=0.1p = 0.1, 0.1493 at p=0.3p = 0.3 and 1 at p=0.5p = 0.5. Its average over the Beta(20,20)(20, 20) prior is still 0.95 (fact 1; a midpoint sum with 20000 points gives 0.94998). The posterior statement is correct for a person who holds that prior, and the coverage is poor for a true pp far from 0.5.

Non-example: a confidence statement. "95% of intervals made this way contain the true θ\theta, whatever it is" is the definition of a 95% confidence interval. A credible interval does not promise this, as the strong-prior example shows. A credible interval is not a confidence interval, even when the numbers agree.

Non-example: an interval for a new observation. An interval that holds a future Xn+1X_{n+1} with probability 1−α1 - \alpha comes from the posterior predictive distribution, not from the posterior of θ\theta. In the normal example the 95% posterior predictive interval is [8.7861,10.8901][8.7861, 10.8901], much wider than the credible interval for μ\mu. The frequentist version is a prediction interval.

Non-example: a posterior that is not proper. With Xi∣θi∼N(θi,1)X_i \mid \theta_i \sim N(\theta_i, 1) for i=1,…,ki = 1, \ldots, k, θi∣τ2∼N(0,τ2)\theta_i \mid \tau^2 \sim N(0, \tau^2) and the prior density 1/τ21/\tau^2 for τ2\tau^2, the posterior of τ2\tau^2 has infinite mass near 0. Quantiles of it do not exist, so no credible interval does, even though a sampler can still produce numbers (see improper prior).

  • Highest posterior density region. The shortest credible set; for Beta(4,8)(4, 8) it is [0.0934,0.5880][0.0934, 0.5880], shorter than the equal-tailed interval but not invariant under reparametrization.
  • Confidence interval. A rule whose coverage over repeated samples is at least 1−α1 - \alpha at every θ\theta; the probability is about the rule, not about θ\theta.
  • Jeffreys interval. The equal-tailed credible interval of the Beta(x+1/2,n−x+1/2)(x + 1/2, n - x + 1/2) posterior of a binomial proportion. Brown, Cai and DasGupta (2001) studied its frequentist coverage and recommend it with the Wilson score interval for small nn.
  • Bernstein-von Mises theorem. In regular models the posterior is close to a normal law at the MLE, so credible intervals have coverage tending to 1−α1 - \alpha.
  • Simulation-based calibration. A check of a posterior sampler that uses fact 1: with θ\theta drawn from the prior, credible intervals must cover at the stated rate.
  • Maximum a posteriori estimate. The posterior mode, which lies inside the highest posterior density region of every level.

References

  1. Andrew Gelman, John B. Carlin, Hal S. Stern, David B. Dunson, Aki Vehtari and Donald B. Rubin, Bayesian Data Analysis, 3rd edition, CRC Press, 2013, Chapter 2 (posterior intervals for the binomial and normal models, central intervals and highest posterior density regions)
  2. Christian P. Robert, The Bayesian Choice, 2nd edition, Springer, 2007, Chapter 5, Section 5.5.1 (credible intervals) and Section 5.5.2 (classical confidence intervals)
  3. Lawrence D. Brown, T. Tony Cai and Anirban DasGupta, Interval estimation for a binomial proportion, Statistical Science 16(2), 2001, pages 101 to 133 (the frequentist coverage of the equal-tailed Jeffreys credible interval)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/9NG63E/text.yaml