Metropolis-Hastings Algorithm

The Metropolis-Hastings algorithm is a [Markov chain Monte Carlo](Markov chain Monte Carlo) (MCMC) method for obtaining a sequence of random samples from a probabbility distribution from which direct sampling is difficult. This siquence can be used to approximate the distribution (i.e. to generate a histogram) or to compute an integral (i.e. an expected value )