← Back to projects

MCMC Visualizer

Live Demo

Compare two MCMC sampling algorithms on a mixture-of-Gaussians target distribution. The blue heatmap shows the probability density — a good sampler should spend more time in brighter regions.

0.50

Random Walk Metropolis

acceptance: %  ·  n=0

Adaptive Covariance MCMC

acceptance: %  ·  n=0

Random Walk Metropolis

Proposes a new sample by adding Gaussian noise of fixed size. Simple and general, but sensitive to the step size — too small and it moves slowly, too large and most proposals get rejected.

Adaptive Covariance MCMC

Learns the shape of the target distribution from past samples, adapting its proposal covariance. This lets it explore anisotropic distributions far more efficiently — notice how it aligns with the correlation structure.