Friday, December 2, 2011

Metropolis Hastings - sampling from a difficult distribution

In mathematics and physics, the Metropolis–Hastings algorithm is a Markov chain Monte Carlo method for obtaining a sequence of random samples from a probability distribution for which direct sampling is difficult. This sequence can be used to approximate the distribution (i.e., to generate a histogram), or to compute an integral (such as an expected value).

http://en.wikipedia.org/wiki/Metropolis%E2%80%93Hastings_algorithm
http://users.isr.ist.utl.pt/~rmcantin/teaching/demo.py

No comments: