Loading…

Mcmc Sampler Prevew

Math Probability • Non Parametric and Computational Probability

View all topics

Preview Markov Chain Monte Carlo with a 1D Metropolis sampler. Choose a target density (preset or custom), set chain length and burn-in, then visualize the trace + histogram and read acceptance diagnostics.

Metropolis works with unnormalized targets as long as \(f(x)\ge 0\).
If the start is far from high-density regions, burn-in matters more.
For performance: \(N \le 20000\) (plot will downsample if needed).
Discard the first \(B\) samples when estimating mean/variance.
Random-walk proposal: \(y = x + s\,Z\), \(Z \sim \mathcal{N}(0,1)\).
Play animates the trace build (burn-in marker included).
Ready

Chain trace + histogram (animated)

Animation ready
Scrub 0% Step: 0

The in-plot badge shows acceptance rate and post–burn-in estimates.

Choose a target and click “Run sampler”.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.