Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Metropolis-Hastings Algorithm

Machine Learning Algorithm

The Metropolis-Hastings algorithm is a Markov chain Monte Carlo method for obtaining a sequence of random samples from a probability distribution from which direct sampling is difficult. New samples are added to the sequence in two steps: a new sample is proposed based on the previous one, then it is either accepted into the sequence or rejected depending on the value of the probability distribution at that point. The resulting sequence can be used to approximate the distribution, such as to generate a histogram, or to compute an integral such as an expected value. Metropolis-Hastings and other Markov chain Monte Carlo algorithms are generally used for sampling from multi-dimensional distributions, especially when the number of dimensions is high.

Connections

Invented By

Nicholas Metropolis led the 1953 paper introducing the Monte Carlo method later generalized by W. K. Hastings into the Metropolis-Hastings algorithm.

Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.