A 52-page Casualty Actuarial Society (CAS) Proceedings tutorial introducing Markov chain Monte Carlo (MCMC) methods to an actuarial audience. Covers Markov chain theory and ergodic convergence, the formal Gibbs sampling algorithm, practical implementation (thinning, convergence diagnostics, BUGS (Bayesian Inference Using Gibbs Sampling) software), Bayesian analysis via Gibbs sampling, and four worked examples of increasing complexity. The centerpiece is a hierarchical credibility application to workers compensation insurance frequency counts, comparing three models (hierarchical normal (HNM), hierarchical first-level Poisson (HFLPM), variance-stabilized HNM (VSHNM)) on 133 occupation classes over 6 years.
Key Claims
Theory
Irreducible + aperiodic Markov chain with invariant distribution π(x) satisfies: (2.1) X(t)→π(x) in distribution as t→∞, and (2.2) k−1∑h(X(i))→Eπ[h(X)] a.s. — the ergodic theorem.
Equation (2.2) gives the Rao-Blackwell density estimator immediately: average f(y∣X(i)) over draws to estimate marginal of Y.
Besag failure mode (distinct from Casella-George): f(x1,x2)∝exp(−(x1+x2)2/2) on R2 gives two proper univariate Normal full conditionals but an improper joint distribution. Gibbs sampler applied to these conditionals either fails to converge or converges to a non-interpretable state. The lesson: proper full conditionals do not guarantee a proper joint.
Practical Considerations
Thinning by k reduces autocorrelation; Autocorrelation Function (ACF) on the thinned chain diagnoses independence.
Convergence monitoring: Gelman-Rubin — multiple chains from widely dispersed starting values; ratio of between-chain to within-chain variance approaches 1 at convergence; potential scale reduction factor R^ quantifies this. Raftery-Lewis — computes required total chain length and burn-in for a given posterior quantile at specified precision (e.g., 2.5th percentile to within ±0.005 with probability 0.95).
BUGS (Bayesian Inference Using Gibbs Sampling): automatically derives full conditionals from declarative model specification; 14 seconds vs. 380 seconds in S-Plus for 5,000 iterations on the same hardware; version 0.50 available free for UNIX/PC.
Bayesian Analysis
Predictive distribution (eq. 5.2): f(Y2∣Y1)=∫f(Y2∣Y1,θ)f(θ∣Y1)dθ. MCMC estimate: average f(Y2∣Y1,θ(i)) over posterior draws. Posterior and predictive inference are both available from the same Gibbs run at no additional cost.
Example 3 — Data Augmentation for Grouped Data
25 Pareto(θ,5000) losses observed as class frequencies only (12/8/3/2 in four intervals).
Augment with latent exact loss values xi as auxiliary variables. Full conditionals: Gamma(⋅+α,β+∑log(λ+xi)) for θ; truncated Pareto on the appropriate interval for each latent xi.
1,000 independent replications × 10 iterations → approximately independent posterior sample. Posterior mean θ^=4.51 vs. true θ=4.5. Side computation: P(at least one of the two open-interval losses>10,000)=12.4%±1%.
Example 4 — Hierarchical Credibility for Workers Compensation
133 occupation classes × 7 years; Klugman (1992) Data Set 2; 767 observations used for fitting; year-7 frequencies forecast.
"It is not an understatement to say that several hundred papers relating to the Gibbs sampling methodology have appeared in the statistical literature since 1990. Yet, the Gibbs sampler has made only a handful of appearances within the actuarial literature to date."
"In its most extreme version, the Gibbs sampler reduces the analysis of a complicated multivariate stochastic model to the consideration of that model's associated univariate full conditional distributions."
My Take
The best entry point for an actuary encountering MCMC for the first time. The worked examples are carefully chosen — each isolates one new idea (mixture marginals, thinning, data augmentation, hierarchical prediction) and the progression is natural. The comparison of BUGS vs. S-Plus timings (14s vs. 380s) is a practical reminder that implementation language matters enormously for intensive MCMC. The Besag failure-mode example fills a gap in Casella-George: proper conditionals do not guarantee proper joint, which is the more common trap for practitioners.