- #1

pamparana

- 128

- 0

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"

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

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"

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: