Understanding
the
Metropolis-
Hastings
Algorithm
Jiguang Li
Introductions
MH Algorithm
Derivations
Summary
Summary
Motivation: We have trouble sampling Θ from the
posterior P(Θ|X )
Step 1: We can find a transition kernel P(x, A) of a
Markov chain whose stationary distribution is P(Θ|X )
Step 2: We consider the transitional kernel
P(x, A) =
R
A
p(x, y )dy + r(x)δ
x
(A)
Step 3: We showed the kernel works if p(x, y) fulfills
detailed balance π(x)p(x, y ) = π(y )p(y , x)
Step 4: We showed the function p(x, y ) = α(x, y )q(y |x)
satisfies detained balance.
That is: if we sample from q(y|x) and accept with
probability α(x, y), then we’ll (eventually) be sampling
from the posterior distribution .