Skip to content
Four Roads to a Posterior, home

Guided tour · start here

The whole project in three walkthroughs

Three short screen recordings of the main journeys, about 3 minutes in all: the four methods side by side, the convergence and model checks added in 2026, and what the 2023 bugs did to the posterior. Each step is listed next to its video as a transcript; press a step to jump to it. Below them, screenshots of every key feature.

Walkthrough 1 of 3 · 54 s

Four roads to one posterior

From the trial data to the explorer: the model every method fits, the four methods run in your browser, their posterior densities compared, and a rerun with a new seed.

No sound. The caption banner is part of the recording. Download the MP4 or the captions (WebVTT).

Steps and transcript

Settings
Corrected data, the 2023 settings (seed 90125, MH 100,000 iterations, HMC 10,000 with L = 20), then seed 2026.
Try it yourself
Overview Explorer

Walkthrough 2 of 3 · 1 min 12 s

Diagnostics: can the posterior be trusted?

Four chains per sampler with R-hat, bulk and tail ESS and MCSE, trace and rank plots, the animated HMC leapfrog trajectory, and the posterior predictive check.

No sound. The caption banner is part of the recording. Download the MP4 or the captions (WebVTT).

Steps and transcript

Settings
Chains use seeds 90125 to 90128 (computed at build time). The HMC playground replays R's chain at seed 90125, L = 20, ε = 1/20.
Try it yourself
Diagnostics HMC playground Predictive checks

Walkthrough 3 of 3 · 1 min 5 s

As submitted (2023) vs corrected

Flip the explorer to the code exactly as submitted in 2023, see how the mis-encoded data and likelihood change the posterior, switch back, and read the decision record that explains the fix.

No sound. The caption banner is part of the recording. Download the MP4 or the captions (WebVTT).

Steps and transcript

Settings
Seed 90125 and the 2023 settings in both versions.
Try it yourself
Explorer Methods DR-001

Key features

Screenshots

Desktop shots at 1440 × 900 in light mode (the landing page in dark mode too) and three phone shots. Select one to enlarge it, then use the arrow keys to move through them.

  • Landing page. The study, the four methods and the result, with the four posteriors in the hero.
  • Landing page, dark mode. The same page in dark mode.
  • Explorer. Four estimates of the dose slope: densities, 95% intervals and ESS (seed 90125).
  • Joint posterior and dose response. Sampler draws and Gaussian ellipses on the exact contours; P(improvement) by dose.
  • As submitted (2023). The original code, bugs and all: seven coefficients and four disagreeing posteriors.
  • HMC, one trajectory at a time. A leapfrog trajectory of the original HMC.fn and its energy, replaying R's chain.
  • EP, site by site. Cavity, tilted distribution and moment matching for one site of EP.logit.
  • Errata. The 2023 bugs, original against corrected code, and their effect on the numbers.
  • Convergence, four chains. R-hat, bulk and tail ESS and MCSE per coefficient, seeds 90125 to 90128.
  • Posterior predictive check. Replicated trials against the observed counts, with p-values and their MCSE.
  • Would the checks have caught 2023?. R-hat flags the Metropolis bug; only the predictive check catches HMC and EP.
  • Bring your own key. Optional AI settings: Anthropic by default, the key stays in this browser.
  • Methods. Provenance, evaluation design, limitations, decision records and AI use.
  • Decision record DR-001. The 2023 data-encoding bugs: the decision in one line, then what happened.

On a phone (390 px wide)

  • Mobile: landing. The landing page at 390 px.
  • Mobile: explorer. The four posteriors of the dose slope on a phone.
  • Mobile: HMC. The HMC playground on a phone, after a few hundred iterations.

How these were made

Every frame comes from a script, not a screen-capture session. A Playwright tour (web/e2e/showcase.spec.ts) drives the site in Google Chrome at 1280 × 800, adds the caption banner and the cursor highlight, and records the video. It also checks what it shows: the four methods are R-identical at seed 90125, a rerun at seed 2026 changes only the samplers, every chain uses seeds 90125 to 90128, the HMC playground replays R’s chain, and the as-submitted posterior has seven coefficients. A broken feature fails the tour rather than producing a misleading video.

Run it with pnpm showcase in web/ (set BASE_URL to point it at a local build). No API key is entered anywhere; the optional AI settings dialog is only opened for its screenshot.