## Metropolis Algorithm

Let be a pdf of interest on a state space , and let be a transition probability on . Define the acceptance probability by

*The Metropolis-Hastings algorithm*can be implemented as follows:

- Choose an initial state at time .
- Suppose that at time . Then pick according to .
- Move to with the probability , or stay with the probability .

Transition probability. One should choose to be irreducible on , and call it a proposal chain. In terms of transition probability, the above algorithm is given by

Reversibility. The detailed balance clearly holds for either or . Let . Suppose that . Then and , and therefore, we obtain

.

By symmetry it also holds
for the case that
.

© TTU Mathematics