Bayesian MCMC: Where Chains Spend Their Time

Watch multiple chains explore the posterior landscape from a prior starting region

Posterior Landscape (Arthur's Seat)
Show terrain

Posterior Density (Emerging from Exploration)

The Profound Point

With the terrain hidden, you see how MCMC discovers the posterior without knowing the landscape. The chains only know local information (can I go higher from here?) yet collectively map out the full distribution. This is how Bayesian inference works on problems we can't visualise.

Prior Distribution

Click on the terrain to position the prior ellipse

Prior Shape

0.06

MCMC Settings

0.015
10

Convergence Diagnostics

Iteration
0
R-hat
--
Acceptance
--

What is R-hat?

R-hat (Gelman-Rubin statistic) compares variance within chains to variance between chains. When chains converge to the same distribution:

  • R-hat < 1.1 — Chains have converged
  • 1.1 ≤ R-hat < 1.2 — Nearly converged
  • R-hat ≥ 1.2 — Chains haven't converged yet

Traceplots (Log-posterior)

Watch for burn-in (initial climb) then stable mixing around high-probability regions

The Bayesian Perspective

In Bayesian inference, we don't just find the best parameter values — we explore the full posterior distribution. The posterior tells us which parameter values are plausible given our data.

We use log(elevation) as the log-posterior density: higher = more plausible parameters. This creates more realistic traceplot behaviour — watch for the initial "burn-in" climb as chains find high-probability regions, then stable mixing once they've converged.