= Solution
For the <Metropolis–Hastings algorithm>, start at a state $\theta$ with positive target density, propose $\theta'$ from $q(\theta'\mid\theta)$, and generate an independent uniform draw. Accept the proposal with probability
$$
\boxed{\alpha(\theta,\theta')=\min\left\{1,
\frac{\pi(\theta')q(\theta\mid\theta')}{\pi(\theta)q(\theta'\mid\theta)}\right\}.}
$$
On rejection retain $\theta$, including repeated states in the chain; removing repeats would generally change its stationary law. The accepted-flow density satisfies
$$
\pi(\theta)q(\theta'\mid\theta)\alpha(\theta,\theta')
=\min\{\pi(\theta)q(\theta'\mid\theta),\pi(\theta')q(\theta\mid\theta')\},
$$
which is symmetric in its two states. This proves <detailed balance> and hence invariance of the target distribution, including the holding probabilities on the diagonal. Unknown common normalization constants cancel in the ratio. Invariance alone does not establish convergence from arbitrary initial states. Choosing proposals that yield a <positive Harris recurrent Markov chain> with <aperiodicity> supplies the usual convergence guarantee, and the resulting sample is dependent. Use burn-in and account for autocorrelation when assessing Monte Carlo precision.
Back to article page