MIT15_097S12_lec15

When you rst open openbugs you will be greeted with a

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 flip 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 : 1 r r if θ∗ ∈ [θt−1 8 2 , θt−1 ⊕ 2 ] Jt (θt−1 , θ∗ ; r) = r 0 otherwise 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 ,1 p(y |θt−1 )p(θt−1 )J (θt−1 , θ∗ ; r) p(y |θ∗ )p(θ∗ ) = min ,1 p(y |θt−1 )p(θt−1 ) (θ∗ )mH +α−1 (1 − θ∗ )m−mH +β −1 = min ,1 , (θt−1...
View Full Document

Ask a homework question - tutors are online