01 / 23

Posterior Summaries
& Credible Intervals

Learn how to summarize posterior distributions with point estimates and interval estimates, and understand why credible intervals give direct probability statements about parameters.

Bayesian Statistics

What Is a Posterior Distribution?

In Bayesian statistics, after observing data \( \mathbf{x} \), we update our prior beliefs about a parameter \( \theta \) to obtain the posterior distribution via Bayes' theorem:

$$ p(\theta \mid \mathbf{x}) = \frac{p(\mathbf{x} \mid \theta)\, p(\theta)}{p(\mathbf{x})} $$

Why Do We Need Summaries?

Communication
Reporting a single number or interval is far more interpretable than an entire density function.
Decision Making
Point estimates feed into loss functions and optimal decisions under uncertainty.
Uncertainty
Interval summaries quantify how spread out our beliefs are: narrow = confident, wide = uncertain.

Posterior Point Estimates

Posterior Mean
\( \hat{\theta} = E[\theta \mid \mathbf{x}] = \int \theta\, p(\theta \mid \mathbf{x})\, d\theta \). Minimizes squared-error loss.
Posterior Median
The value \( m \) such that \( P(\theta \leq m \mid \mathbf{x}) = 0.5 \). Minimizes absolute-error loss.
Posterior Mode (MAP)
\( \hat{\theta}_{\text{MAP}} = \arg\max_\theta\, p(\theta \mid \mathbf{x}) \). Minimizes 0-1 loss.

Visualizing Skewed Posteriors

θ density Mode Median Mean 0 θ

What Is a Credible Interval?

A \( 100(1-\alpha)\% \) credible interval (or credible region) is any set \( C \subseteq \Theta \) such that:

$$ P(\theta \in C \mid \mathbf{x}) = \int_C p(\theta \mid \mathbf{x})\, d\theta = 1 - \alpha $$

Types of Credible Intervals

Equal-Tailed Interval (ETI)
Places \( \alpha/2 \) probability in each tail. Defined by the \( \alpha/2 \) and \( 1 - \alpha/2 \) quantiles of the posterior.
Highest Posterior Density (HPD)
The shortest interval with the required coverage. Every point inside has higher density than every point outside.

ETI vs HPD on a Skewed Posterior

θ ETI low ETI high HPD low HPD high ETI width HPD width (shorter!)

Credible vs Confidence Intervals

Credible Interval Confidence Interval
Framework Bayesian Frequentist
Interpretation 95% probability \( \theta \in C \) 95% of such intervals cover \( \theta \)
\( \theta \) treated as Random variable Fixed constant
Depends on Prior + Data Data only
Width Shrinks with informative prior Only shrinks with more data

Formal HPD Definition

The Highest Posterior Density (HPD) region of level \( 1 - \alpha \) is:

$$ C_{HPD} = \{\theta : p(\theta \mid \mathbf{x}) \geq k_\alpha \} $$

where \( k_\alpha \) is the largest constant such that:

$$ P(\theta \in C_{HPD} \mid \mathbf{x}) \geq 1 - \alpha $$

How to Compute Posterior Summaries

1
Obtain the posterior \( p(\theta \mid \mathbf{x}) \) analytically (conjugate models) or via MCMC samples \( \{\theta^{(1)}, \ldots, \theta^{(S)}\} \).
2
Point estimate: Compute the sample mean, median, or mode of the posterior (or MCMC draws).
3
ETI: Sort MCMC samples. The \( \alpha/2 \) and \( 1-\alpha/2 \) quantiles give the equal-tailed interval.
4
HPD: Sort samples, then slide a window of size \( \lfloor(1-\alpha)S\rfloor \) across the sorted list. The window with the smallest range is the HPD.
5
Report: State the point estimate, interval, and credibility level: e.g., "Posterior mean = 3.2; 95% HPD: [1.8, 4.9]."

Example 1: Beta-Binomial

A coin is flipped \( n = 20 \) times; we observe \( y = 14 \) heads. With a \( \text{Beta}(2, 2) \) prior, the posterior is:

$$ \theta \mid y \sim \text{Beta}(2 + 14,\; 2 + 6) = \text{Beta}(16, 8) $$
Posterior Mean
\( \frac{16}{16+8} = \frac{16}{24} \approx 0.667 \)
Posterior Mode
\( \frac{16-1}{16+8-2} = \frac{15}{22} \approx 0.682 \)

Beta(16,8) Posterior Density

θ 0 0.2 0.4 0.6 0.8 1.0 0.443 0.844 mean = 0.667 95% ETI

Example 2: Normal-Normal Conjugacy

Suppose \( X_1, \ldots, X_n \mid \mu \sim N(\mu, \sigma^2) \) with known \( \sigma^2 = 4 \), and prior \( \mu \sim N(\mu_0, \tau_0^2) \) with \( \mu_0 = 0 \), \( \tau_0^2 = 9 \). After observing \( n = 10 \) data points with \( \bar{x} = 3.1 \):

$$ \mu \mid \mathbf{x} \sim N\!\left(\frac{\frac{\mu_0}{\tau_0^2} + \frac{n\bar{x}}{\sigma^2}}{\frac{1}{\tau_0^2} + \frac{n}{\sigma^2}},\; \frac{1}{\frac{1}{\tau_0^2} + \frac{n}{\sigma^2}}\right) $$
Posterior Mean
\( \mu_n = \frac{0/9 + 10 \cdot 3.1/4}{1/9 + 10/4} = \frac{7.75}{2.611} \approx 2.968 \)
Posterior Variance
\( \tau_n^2 = \frac{1}{1/9 + 10/4} = \frac{1}{2.611} \approx 0.383 \)

Normal Posterior: 95% Credible Interval

Since the normal distribution is symmetric, the ETI and HPD are identical:

$$ \mu_n \pm z_{0.975} \cdot \tau_n = 2.968 \pm 1.96 \times \sqrt{0.383} \approx 2.968 \pm 1.96 \times 0.619 $$
$$ \text{95% Credible Interval} = [1.755,\; 4.181] $$
1.755 4.181 2.968 95% μ

Loss Functions and Optimal Estimates

The choice of point estimate is linked to the loss function we wish to minimize under the posterior:

Loss Function Formula Optimal Estimate
Squared Error \( L(\theta, \hat\theta) = (\theta - \hat\theta)^2 \) Posterior Mean
Absolute Error \( L(\theta, \hat\theta) = |\theta - \hat\theta| \) Posterior Median
0-1 Loss \( L(\theta, \hat\theta) = \mathbf{1}(\theta \neq \hat\theta) \) Posterior Mode (MAP)

Common Mistakes

✕ Frequentist Interpretation
Saying "95% of samples would produce intervals containing \( \theta \)" about a credible interval. That is a confidence interval interpretation.
✕ Ignoring the Prior
Treating the posterior mean as if it were purely data-driven. The prior contributes, especially with small \( n \).
✕ ETI for Multimodal Posteriors
Using an equal-tailed interval when the posterior is multimodal. The HPD may be a disjoint union of intervals, which the ETI misses.

Summary Cheat Sheet

Summary Definition Best When
Posterior Mean \( E[\theta \mid \mathbf{x}] \) Squared-error loss; symmetric posterior
Posterior Median 50th percentile Absolute-error loss; skewed posterior
MAP / Mode \( \arg\max\, p(\theta \mid \mathbf{x}) \) 0-1 loss; quick estimate
ETI Quantile-based interval Symmetric, unimodal posteriors
HPD Shortest interval at given level Skewed or multimodal posteriors

Question 1 of 5

A 95% Bayesian credible interval for \( \theta \) means:

Question 2 of 5

Which point estimate minimizes the expected squared-error loss under the posterior?

Question 3 of 5

For a right-skewed, unimodal posterior, which interval type will generally be shorter?

Question 4 of 5

If the posterior is \( \theta \mid \mathbf{x} \sim \text{Beta}(10, 10) \), which statement is true?

Question 5 of 5

You have 5000 MCMC samples from a posterior. To compute the 90% HPD interval, you should: