Loading [MathJax]/extensions/Safe.js
Metropolis-Hastings algorithm (1953) It is a very general Markov chain Monte Carlo algorithm. It is based on an acceptance-rejection scheme : a new element is proposed and accepted with a well-chosen probability. If the proposal is rejected, the next element in the chain is the same. We can therefore write the transition probability as \begin{equation*} p(x \to y) = T(x \to y) A(x \to y) \end{equation*} $T(x \to y)$ is the probability to propose $y$ after being in $x$. It can be chosen freely! It should only ensure ergodicity , namely that any element can be reached $A(x \to y)$ is the probability that the proposed $y$ is accepted. In the Metropolis-Hastings algorithm it is \begin{equation*} A(x \to y) = \min \left( 1, \frac{T(y \to x) \, \pi(y)}{T(x \to y) \, \pi(x)} \right) \end{equation*} % matplotlib inline % config InlineBackend.figure_format = 'retina' import matplotlib.pyplot as plt import numpy as np plt . style . use ( 'style.mpl' )