Skip to content

Metropolis Algorithm

In statistics and statistical physics, the Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution from which direct sampling is difficult.

Version
v2 · 2026-11-14 · History
Domain-specific #
10708
Domain group
Natural Sciences
Origin domain
Physics
Subdomains
Statistical Physics, Computational Physics, Markov Chain Monte Carlo → Physics

Core Idea

Metropolis Algorithm is treated here as the recurring Markov-chain Monte Carlo identity summarized by this source-grounded definition: In statistics and statistical physics, the Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution from which direct sampling is difficult. In statistics and statistical physics, the Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution from which direct sampling is difficult.

How would you explain it like I'm…

The Popular-Spot Wander

Imagine wandering around a park where some spots are more popular. Each time, you pick a nearby spot to try. If it's more popular, you go there; if it's less popular, you sometimes go and sometimes stay. After a long time, the list of places you've stood shows how popular each spot is.

Suggest, Then Accept or Stay

Sometimes scientists want to pick random examples from a complicated set of chances that's too hard to pick from directly. The Metropolis Algorithm does it step by step. From where you are, you suggest a new nearby spot. Then you decide whether to accept it, based on how likely that new spot is compared with where you are. If you don't accept it, you stay put. Over many steps, the list of spots you visited can be used to draw a picture of the chances or to calculate averages.

Propose-Then-Accept Sampling

The Metropolis Algorithm (generalized as Metropolis–Hastings) is a Markov chain Monte Carlo (MCMC) method for generating a sequence of random samples from a probability distribution that's hard to sample from directly. Each new sample comes in two steps: propose a candidate based on the current sample, then accept or reject it depending on the probability distribution's value at the candidate. A common proposal is a Gaussian centered at the current point, making the chain a Gaussian random walk. The sequence approximates the distribution — for example, as a histogram — or estimates an integral such as an expected value. It is mainly used for high-dimensional distributions; because each sample depends on the previous one, samples are autocorrelated, unlike methods that return independent samples.

 

The Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution that is difficult to sample directly. Each step has two stages: a candidate is drawn from a proposal distribution g(x | y) conditioned on the current sample y, and the candidate is then accepted or rejected according to the target density's value there; on rejection the current sample is repeated. A common choice of g is a Gaussian centered at y, which makes the chain a Gaussian random walk. The resulting sequence approximates the target distribution and can be used to estimate integrals such as expectations or to build histograms. MCMC methods are mainly used for multi-dimensional, especially high-dimensional, distributions; in one dimension, methods such as adaptive rejection sampling can return independent samples directly and avoid the autocorrelation inherent in MCMC.

Scope of Application

  • Description. The method used to propose new candidates is characterized by the probability distribution g(x\mid y) (sometimes written Q(x\mid y) ) of a new proposed sample x given the.

  • Description. For the purpose of illustration, the Metropolis algorithm, a special case of the Metropolis–Hastings algorithm where the proposal function is symmetric, is described below.

  • Description. On the other hand, most simple rejection sampling methods suffer from the "curse of dimensionality", where the probability of rejection increases exponentially as a function of the number of dimensions.

  • Description. As a result, MCMC methods are often the methods of choice for producing samples from hierarchical Bayesian models and other high-dimensional statistical models used nowadays in many disciplines.

  • Description. Various algorithms can be used to choose these individual samples, depending on the exact form of the multivariate distribution: some possibilities are the adaptive rejection sampling methods, the adaptive rejection Metropolis.

Clarity

A clear use of Metropolis Algorithm names the carrier, the operative relation, and the conditions under which the source treats the identity as present. The minimal definition is In statistics and statistical physics, the Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution from which direct sampling is difficult.

Manages Complexity

Metropolis Algorithm compresses multiple Markov-chain Monte Carlo details into a stable diagnostic relation. The source shows both the central mechanism—a Markov process is uniquely defined by its transition probabilities P(x' \mid x) , the probability of transitioning from any given state x to any other given state x' .—and the practical consequence—this contradicts an account by Edward Teller, who states in his memoirs that the five authors of.

Abstract Reasoning

  1. Type the carrier. Identify the Markov-chain Monte Carlo entities to which the claim applies.
  2. State the relation. Use the source-grounded identity: In statistics and statistical physics, the Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution from which direct sampling is difficult.
  3. Check operation and conditions.

Knowledge Transfer

Within the home domain. Knowledge about Metropolis Algorithm transfers literally when a new case preserves the same carrier type, relation, and recognition test. The method used to propose new candidates is characterized by the probability distribution g(x\mid y) (sometimes written Q(x\mid y) ) of a new proposed sample x given the previous sample y. For the purpose of illustration, the Metropolis algorithm, a special case of the Metropolis–Hastings algorithm where the proposal function is symmetric, is described below. Beyond the home domain.

Relationships to Other Abstractions

Local relationship map for Metropolis AlgorithmParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Metropolis AlgorithmDOMAINPrime abstraction: Monte Carlo Simulation — is a kind ofMonte CarloSimulationPRIME

Current abstraction Metropolis Algorithm Domain-specific

Parents (1) — outgoing typed relations

  • Metropolis Algorithm is a kind of Monte Carlo Simulation Prime

    Metropolis Algorithm is a strict kind of Monte Carlo Simulation: In statistics and statistical physics, the Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution from which direct sampling is difficult.

Hierarchy paths (3) — routes to 3 parentless roots

Neighborhood in Abstraction Space

Metropolis Algorithm sits in a moderately populated region (42nd percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Markov Chains & Probabilistic Computation (7 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14