Lecture 8: Markov Chain Monte Carlo Methods
(˜˜˜)
(êêꉉ‰ÅÅÅ„„„AAAkkkÛÛÛ•••{{{)
Ü•²
Monday 26
th
October, 2009
Contents
1 Markov Chain Monte Carlo Methods 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Integration problems in Bayesian inference . . . . . . 2
1.1.2 Markov Chain Monte Carlo Integration . . . . . . . 4
1.1.3 Markov Chain . . . . . . . . . . . . . . . . . . . . . 8
1.2 The Metropolis-Hastings Algorithm . . . . . . . . . . . . . . 13
1.2.1 Metropolis-Hastings Sampler . . . . . . . . . . . . . 14
1.2.2 The Metropolis Sampler . . . . . . . . . . . . . . . . 22
1.2.3 Random Walk Metropolis . . . . . . . . . . . . . . . 23
1.2.4 The Independence Sampler . . . . . . . . . . . . . . 33
1.3 Single-component Metropolis Hastings Algorithms . . . . . 37
1.4 Application: Logistic regression . . . . . . . . . . . . . . . . 39
Previous Next First Last Back Forward 1
Chapter 1
Markov Chain Monte Carlo Methods
1.1 Introduction
MCMC(Markov Chain Monte Carlo) •{˜„nصeŒ±ëw Metropo-
lis et al. (1953)±9 Hastings (1970), ±9Ù¦ˆ«0MCMC;Í.
!·‚0ù«•{ÄgŽÚA^.
5¿3c¡0Monte Carlo•{OÈ©
Z
A
g(t)dt,
´rdÈ©L«¤˜‡é,‡VÇ—Ýf (t)eÏ". lÈ©O¯K=z
¤l8IVÇ—Ýf(t)¥) ‘Å.
Previous Next First Last Back Forward 1
3MCMC•{¥, Äkïᘇê‰Åó, ¦f(t)•Ù²-©Ù. KŒ
±$1dê‰Åó¿©•žm†– Âñ²-©Ù, @ol8I©Ùf(t)¥
)‘Å, Ò´lˆ²-Gê‰Åó¥)Ù´». ·
‚ò0A«ïáùê‰Åó•{: MetropolisŽ{, Metropolis-
HastingsŽ{, ±9GibbsÄ• {. ˜‡ÐóATäk¯„·Ü(rapid
mixing)5Ÿ—l?¿ ˜Ñu鯈²-©Ù.
1.1.1 Integration problems in Bayesian inference
Bayesianíä¥Nõ¯KÑ´MCMC•{A^. lBayesian*:5w,
.¥*ÿCþÚëêÑ´‘ÅCþ. Ïd, x = (x
1
, ··· , x
n
)Úë
êθéÜ©ÙŒ±L«•
f
x,θ
(x, θ) = f
x|θ
(x
1
, ··· , x
n
)π(θ).
Previous Next First Last Back Forward 2
lŠâBayes½n, Œ±ÏLx = (x
1
, ··· , x
n
)&Eéθ©Ù?1•
#:
f
θ|x
(θ|x) ==
f
x|θ
(x)π(θ)
R
f
x|θ
(x)π(θ)dθ
.
K3©Ùe, g(θ)Ï"•
Eg(θ|x) =
Z
g(θ)f
θ|x
(θ|x)dθ =
R
g(θ)f
x|θ
(x)π(θ)dθ
R
f
x|θ
(x)π(θ)dθ
.
dÈ©•Š•x¼ ê. Ïd Œ ±ég(θ)? 1 í ä. 'Xg(θ) = θž,
KEg(θ|x) = E[θ|x] Œ±Š•θO.
éda¯K·‚•Ä˜„/ª:
Eg(Y ) =
R
g(t)π(t)dt
R
π(t)dt
.
ùpπ(·)•˜‡—ݽöq,. eπ•˜—Ý, KdÏ"=•~„Ï"½Â:
Eg(Y ) =
R
g(t)f
Y
(t)dt. eπ•˜q,, KI‡˜‡Kz~ê⌱¤•—
Ý. 3“d©Û¥, π(·)•˜—Ý. π(·) Kz~ꙕž, dÈ©
Previous Next First Last Back Forward 3