Metropolis Algorithm

Creator
Creator
Seonglae Cho
Created
Created
2022 Apr 3 15:50
Editor
Edited
Edited
2025 Apr 29 1:52

Metropolis–Hastings algorithm (MH algorithm)

A flagship MCMC algorithm that uses proposal distribution with Monte Carlo sampling and filters based on Acceptance Criteria.
MH makes local changes to a current state. We use the proposal qq and the transition TT to define an ”acceptance ratio” AA:
A  =  min ⁣(1,  T(xx)q(xx)T(xx)q(xx)).A \;=\; \min\!\left(1,\;\frac{T(x' \mid x)\,q(x \mid x')}{T(x \mid x')\,q(x' \mid x)}\right).

Symmetric MH

Note that in the (popular) choice of Gaussian perturbations,
q(xx)  =  N(xx,σ2)q(x' \mid x) \;=\; \mathcal{N}\bigl(x' \mid x, \sigma^2\bigr)
then the proposal is ”symmetric” q(xx)=q(xx)q(x'|x) = q(x|x')
A  =  min ⁣(1,  T(xx)T(xx)).A \;=\; \min\!\left(1,\;\frac{T(x' \mid x)}{T(x \mid x')}\right).
  1. sample a value from proposal xq(x)x' \sim q(\cdot|x)
  1. if T(xx)>T(xx)T(x'|x)>T(x|x'), then move to xx' with certainity 11
  1. otherwise, move to xx' with probability AA
 
 
 
 
 

Recommendations