Metropolis–Hastings algorithm

Metropolis-Hastings algorithm samples from difficult distributions

Metropolis–Hastings algorithm

Metropolis-Hastings algorithm samples from difficult distributions

The Metropolis-Hastings algorithm is a Markov chain Monte Carlo (MCMC) method used for obtaining random samples from complex probability distributions. It works by proposing new samples based on previous ones and then deciding whether to accept or reject them based on the probability distribution's value at that point.

The algorithm generates a sequence of samples that can be used to approximate the target distribution or compute integrals like expected values. This makes it particularly useful for high-dimensional distributions where direct sampling is challenging.

While Metropolis-Hastings is powerful for multi-dimensional distributions, single-dimensional distributions often benefit from simpler methods like adaptive rejection sampling, which avoids autocorrelation issues inherent in MCMC methods.

Example

Suppose we want to sample from a target distribution with a high-dimensional space. We start with an initial sample and propose a new sample. If the proposed sample has a higher probability under the target distribution, it is accepted; otherwise, it is rejected. This process continues, building a sequence of samples that approximates the target distribution.

Understanding the Metropolis-Hastings algorithm is crucial for researchers dealing with complex, high-dimensional probability distributions where direct sampling is impractical.

Related concepts

One email a day: 5 concepts + the 5 stories that matter →

Swipe through 100 ML concepts daily

Open TickerNews