Homepage > MCMC

## Metropolis Algorithm

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

for a move from to satisfying and . The Metropolis-Hastings algorithm can be implemented as follows:
1. Choose an initial state at time .
2. Suppose that at time . Then pick according to .
3. 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

Then is irreducible, aperiodic and reversible transition probability with the stationary distribution .

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 .