MPE StudioMath of Planet Earth
Statistical Toolkit · 09

Markov Chain Monte Carlo: The Metropolis Algorithm

Sampling a target through accept-reject moves

MCMC constructs a dependent sequence whose long-run distribution is the target. The Metropolis rule accepts every move to higher density and some moves to lower density.

watchone idea
→
manipulateone example
→
leave withone intuition

The essential idea: relative target density is enough; the unknown normalization constant cancels in the acceptance ratio.

Watch the concept

One Concept · One Example

Markov Chain Monte Carlo: The Metropolis Algorithm video thumbnail▶

Markov Chain Monte Carlo: The Metropolis Algorithm

Presented by Charlotte Moser

Watch on YouTube ↗

What to notice

The idea in 30 seconds

Propose, compare, accept or stay

Proposal

A symmetric Gaussian proposal suggests a candidate near the chain's current position.

x′∼N(xk,s2)

Acceptance rule

The target-density ratio determines whether the candidate becomes the next state.

α=min(1,f(x′)f(xk))
Explore

How should a Metropolis chain move?

Change the proposal step size. Small steps accept often but move slowly; large steps explore farther but are rejected more often.

-44

The rug below the axis shows the first chain states; repeated positions reveal rejected proposals.

KEY TAKEAWAY

Metropolis sampling uses an accept-reject Markov chain to explore a target distribution using only relative probabilities.