Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know a webpage or a document where I can find a practical example of implementation of the Metropolis-Hastings algorithm, with some thoughts about burn-in time and how to construct the transition matrix?

share|cite|improve this question
I think it'd be useful to give some more details and background on what you're looking for, since the subject is huge. What is your background/experience, what are you hoping to do, and have you already read some literature on the topic? – Gerben Jun 14 '11 at 11:50
up vote 1 down vote accepted

Implemented in Matlab. Only really covers the implementation. Do note Gerben's comment below: The burn-in time purported to be a "rule of thumb" by the author is by no means so.

In Python.

share|cite|improve this answer
I'm not sure if you're the author of said webpage, but there are some things that I don't really agree with. As for the 'burn-in time': I'm currently working on a very canonical model which, however, has a burn-in time of ~ 8 billion iterations - just to state that no real rule of thumb exists for things like burn-in time in Monte Carlo. – Gerben Jun 14 '11 at 8:33
@Gerben Oh, no, not the author by a long shot. Just something I found while reading about it. I certainly don't condone the use of any rules of thumb, in Monte Carlo or otherwise. Edited to reflect your comment. – Jack Henahan Jun 14 '11 at 8:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.