Question about Metropolis Hastings algorithm (1 Viewer)

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Hello everyone,

I am having a bit of trouble understanding the metropolis hastings algorithm which can be used to generate random samples from a distribution that can be difficult to sample directly from:

As I understand it we sample from a proposal distribution (say a normal distribution).

Now, to construct the Markov chain, I sample from this proposal distribution and accept or reject the sample based on the the equation shown http://upload.wikimedia.org/math/3/4/e/34e36a79ed058565327282b6cff8f214.png" [Broken]

Now, in this equation the first ratio p(x(t))/p(x'). Where is this coming from? It seems that these are the terms from the distribution that we want to directly sample from!!? or are they not?

I understand that somehow this will set the Markov chain in a way that the transition probabilities will reflect the desired distribution but I am not sure what this term is how can it be easily calculated.

I would be very grateful for any help you can give me.

Many thanks,

Luca
 
Last edited by a moderator:

The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top