The simulation shows a Metropolis-Hastings sampler taking a random walk across a 2D probability landscape, visualizing which proposed moves get accepted or rejected and how the accumulating samples gradually trace out the true shape of the target distribution.
Choose a target distribution shape, drag the proposal step-size slider to make jumps larger or smaller, and press play to watch the chain wander, accept or reject moves, and build up a sample histogram that converges toward the target density.
Target distribution select, proposal step-size slider, play/pause, reset chain
The Metropolis algorithm was born out of 1950s nuclear weapons research at Los Alamos, and its 1970 generalization by W.K. Hastings extended it to asymmetric proposals; today it remains one of the most cited algorithms in all of statistics and computational science.
The simulation shows a Metropolis-Hastings sampler taking a random walk across a 2D probability landscape, visualizing which proposed moves get accepted or rejected and how the accumulating samples gradually trace out the true shape of the target distribution.
The simulation shows a Metropolis-Hastings sampler taking a random walk across a 2D probability landscape, visualizing which proposed moves get accepted or rejected and how the accumulating samples gradually trace out the true shape of the target distribution.
Choose a target distribution shape, drag the proposal step-size slider to make jumps larger or smaller, and press play to watch the chain wander, accept or reject moves, and build up a sample histogram that converges toward the target density.
The Metropolis algorithm was born out of 1950s nuclear weapons research at Los Alamos, and its 1970 generalization by W.K. Hastings extended it to asymmetric proposals; today it remains one of the most cited algorithms in all of statistics and computational science.