Overview
Metropolis-Hastings builds a Markov chain whose long-run states follow the desired target distribution.
Samples from a target distribution by accepting or rejecting proposed moves.
Compact metadata for implementation and discovery.
Metropolis-Hastings builds a Markov chain whose long-run states follow the desired target distribution.
Quick facts
Runtime and memory behavior at a glance.
Best
O(t)
Average
O(t)
Worst
O(t)
Space
O(1)
p = min(1, target(x_new) * proposal(x_old | x_new) / (target(x_old) * proposal(x_new | x_old)))Decides whether to move to a proposed Markov-chain state.
Show a random walk accepting moves more often in high-probability regions.
Metropolis-Hastings operates in O(t) time and O(1) space within the Markov Chain Monte Carlo family. Key governing relation: p = min(1, target(x_new) * proposal(x_old | x_new) / (target(x_old) * proposal(x_new | x_old))). Often compared with Rejection Sampling and Importance Sampling.
What each reference supports for this entry.
Original reference for Metropolis-Hastings transition kernels, acceptance probabilities, and Markov chain sampling.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Randomness & Sampling · Core
Both are Markov chain Monte Carlo sampling methods.
Compare with thisRandomness & Sampling · Extended
Slice sampling samples from an auxiliary slice instead of using an explicit Metropolis proposal ratio.
Compare with thisRandomness & Sampling · Specialized
NUTS uses gradient-informed Hamiltonian trajectories instead of random-walk Metropolis proposals.
Compare with thisBoth are Markov chain Monte Carlo sampling methods.
Both accept or reject state transitions based on probability rules.