Statistics Quest

Credible intervals

An interval containing a stated posterior probability of the parameter; unlike a confidence interval it can be read directly as a probability statement about the parameter, given the model and prior.

[ Q ⁣(1−L2),  Q ⁣(1+L2)],P(θ∈[l,u]∣data)=L\left[\,Q\!\left(\tfrac{1-L}{2}\right), \; Q\!\left(\tfrac{1+L}{2}\right)\right], \qquad P(\theta \in [l, u] \given \text{data}) = L
Equal-tailed credible interval (engine default)
QQ
quantile function of the posterior distribution
LL
credible level, e.g. 0.95
HPD: shortest [l,u] with F(u)−F(l)=L, where f(l)=f(u)\text{HPD: shortest } [l, u] \text{ with } F(u) - F(l) = L, \text{ where } f(l) = f(u)
Highest posterior density interval (unimodal posterior)
f,Ff, F
posterior density and cdf

When to use

  • Summarising a posterior distribution (e.g. after a beta–binomial update).
  • Equal-tailed: equal posterior probability (1−L)/2(1-L)/2 beyond each end; invariant to transformations. HPD: the shortest interval; every point inside is more plausible than any point outside; useful for skewed posteriors.

Assumptions

  • The likelihood and prior are reasonable; the interval inherits both.

How to interpret

  • "Given the model, the prior and the data, there is a 95% probability that θ lies between l and u."
  • Contrast: a 95% confidence interval is produced by a procedure that captures the fixed true value in 95% of repeated samples; a single computed confidence interval either contains it or not, and the 95% describes the method.
  • With weak priors and large samples the two intervals are often numerically close, but their meanings differ.

Common mistakes

  • Reporting a credible interval without stating the prior.
  • Calling a confidence interval a credible interval (or vice versa) because the numbers match.
  • Asking for an HPD interval from a U-shaped or flat posterior, where it is not a single interval (the engine refuses these).

Example

Posterior Beta(13, 29) (12 successes in 40 trials, uniform prior): 95% equal-tailed interval 0.181 to 0.455; 95% HPD interval 0.175 to 0.449 (slightly shorter and shifted towards the mode, because the posterior is right-skewed).