# Strange substitution in HMC

I try to read paper, MCMC using Hamiltonian dynamics). The author, Neal states(P28):

To begin, Cruetz nodes that the following relationship holds when any Metropolis-style algorithm is used to sample a density $$P(x) = (1/Z)\exp(-E(x))$$:

$$1 = \mathbb{E}(P(x^*)/P(x)) = \mathbb{E}(\exp(-(E(x^*)-E(x)))) = \mathbb{E}(\exp(-\Delta)) \quad (4.17)$$

I can't see why $$\mathbb{E}(P(x^*)/P(x))=1$$ so I follow the reference, Global Monte Carlo algorithms for many-fermion systems, and found this strange substitution(P3):

Some rather useful identities follow from considering expectation values over this distributions. Consider the paritition function

$$Z = \int dA' dp' e^{-H'} = \int dAdp e^{-H}e^{H-H'}, \quad (16)$$

where $$H$$ and $$H'$$ denote $$H(p,A)$$ and $$H(p',A')$$, respectively.

I can't see why it is valid. $$A = A', p = p'$$ may works but it will imply $$\mathbb{E}(P(x^*)/P(x))=\mathbb{E}(1)=1$$? It sounds not the point Neal want to present.

• Are you using E both to denote expectation and the energy? Sep 11, 2019 at 7:43
• Yes, I have fixed the latex code.
– user137795
Sep 11, 2019 at 7:52
• If not exactly a duplicate, quite correlated with this question of a few weeks ago. Sep 12, 2019 at 4:48

If $$K$$ is a Markov kernel(with density $$k$$) with stationary distribution $$P$$ (with density $$p$$), then, if $$(X_t)_t$$ is a stationary Markov chain associated with $$K$$, \begin{align*}\mathbb E\left[\frac{p(X_{t+1})}{p(X_t)}\right] &=\int_{\mathfrak{X^2}} \frac{p(x_{t+1})}{p(x_t)} p(x_t)k(x_t,x_{t+1})\text{d}\lambda(x_t)\text{d}\lambda(x_{t+1}) \\ &= \int_{\mathfrak{X^2}} p(x_{t+1}) k(x_t,x_{t+1})\text{d}\lambda(x_t)\text{d}\lambda(x_{t+1})\\ \end{align*} Unless $$k$$ is symmetric and with a support at least equal to $$\mathfrak X$$, the support of $$p$$, there is no reason for the ratio to be of expectation one.