= Solution
Use the <ergodic theorem for a positive Harris recurrent Markov chain>: for an <invariant distribution> $\pi$ and an integrable function $h$, the time average converges almost surely to $\int h\,d\pi$ under the usual ergodicity conditions. This is the relevant theorem for correlated <Metropolis–Hastings algorithm> output, rather than the <strong law of large numbers>. Here $h(x)=x_1$ is integrable. Indeed, putting
$$
V(x)=x_1^2x_2^2+x_1^2+x_2^2-8x_1-8x_2,
$$
we have $V(x)\geq(x_1-4)^2+(x_2-4)^2-32$, which bounds the unnormalized density by a constant times an integrable Gaussian density and also gives finite first moments.
For a proposal scale $s>0$, initialize $X_0$ anywhere in $\mathbb R^2$. At each step draw <independent random variables> $Z_1,Z_2$ with the <standard normal distribution> and an independent uniform $U$, propose $Y=X_t+s(Z_1,Z_2)$, and accept when
$$
\boxed{\log U\leq\min\{0,-\tfrac12(V(Y)-V(X_t))\}.}
$$
Otherwise set $X_{t+1}=X_t$. The normal proposal is symmetric, so its density cancels; the target <normalizing constant> $c$ also cancels. Include every state in the average, including repeated states after rejection. The <ergodic theorem for a positive Harris recurrent Markov chain> then gives
$$
\boxed{N^{-1}\sum_{t=1}^NX_{t,1}\longrightarrow E_\pi X_1\quad\text{almost surely}.}
$$
A fixed discarded initial segment does not change this limit.
Small proposal <variance> gives high acceptance but tiny moves and strong serial dependence. Large <variance> gives more ambitious moves, but many proposals enter very low-density regions and are rejected, creating long runs at one state. An intermediate scale should be assessed by exploration and <effective sample size of a Markov chain>, not acceptance rate alone.
This density has two modes, at $(2+\sqrt3,2-\sqrt3)$ and their interchange. To see this, stationary points satisfy $x_1(1+x_2^2)=x_2(1+x_1^2)=4$, implying either $x_1=x_2$ or $x_1x_2=1$. The unequal solutions have $x_1+x_2=4$ and are local minima of $V$; the equal solution is a saddle. Mode switching is therefore a material part of proposal-scale selection: a chain confined to one mode can have high acceptance and a misleading finite-run estimate.
\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2016/iii/paper-208-quartic-modes.png]
{title=Two modes of the quartic target density, with the diagonal saddle between them, explaining slow mode switching in random-walk Metropolis-Hastings}
Back to article page