This preview shows page 1. Sign up to view the full content.
Unformatted text preview: n practice. Unfortunately, there
is no way to be entirely certain that we are truly drawing from the posterior
and we must be very cautious.
Coin Flip Example Part 8. Let us return to our coin ﬂip example. We
will draw from the posterior using the Metropolis-Hastings algorithm. Our
model has a scalar parameter θ ∈ [0, 1] which is the probability of heads.
The proposal distribution J (θt−1 , θ∗ ) will be uniform on an interval of size r
around θt−1 :
if θ∗ ∈ [θt−1 8 2 , θt−1 ⊕ 2 ]
Jt (θt−1 , θ∗ ; r) = r
where ⊕ and 8 represent modular addition and subtraction on [0, 1], e.g.,
0.7 ⊕ 0.5 = 0.2. Notice that this proposal distribution is symmetric:
J (θt−1 , θ∗ ; r) = J (θ∗ , θt−1 ; r).
We accept the proposed θ∗ with probability
α(θ t−1 p(y |θ∗ )p(θ∗ )J (θ∗ , θt−1 ; r)
, θ ) = min
p(y |θt−1 )p(θt−1 )J (θt−1 , θ∗ ; r)
p(y |θ∗ )p(θ∗ )
p(y |θt−1 )p(θt−1 )
(θ∗ )mH +α−1 (1 − θ∗ )m−mH +β −1
View Full Document
- Spring '12