# Ising model with zero external field - marginalization

The pmf of Ising model is considered as $p(\boldsymbol{x})=\frac{1}{Z(\theta)} exp\left\{ \underset{\left(s,t\right)\in E}{\sum\theta_{st}}x_{s}x_{t}\right\},\quad \boldsymbol{x}\in \{-1,1\}^n$, where $E$ is the set that contains the edges of the graph and $Z(\theta)=\underset{x}\sum{ exp\left\{ \underset{\left(s,t\right)\in E}{\sum\theta_{st}}x_{s}x_{t}\right\}}$. I have read that the joint of two random variables $x_i, x_j$ is $p\left(x_i,x_j\right)=\left[1+x_{i}x_{j}E\left[X_{i}X_{j}\right]\right]/4$. in https://arxiv.org/pdf/1604.06749.pdf on page 8. How can we show that?

I know that we can express $E\left[X_{i}X_{j}\right]$ in terms of $\theta$: $E\left[X_{i}X_{j}\right]=\frac{\partial \ln Z(\theta)}{\partial\theta_{i,j}}$ but i can not use it to find the joint pmf.

I have posted the same question on cross-validate.

Note that the indicator $$1_{X_i = x} = \frac{1+x X_i}{2}$$ so that $$\mathbb P(X_i = x_i,\; X_j = x_j) = \mathbb E \left[ \frac{(1+x_i X_i)(1+x_j X_j)}{4} \right]$$ Expand it out, and note that by symmetry $\mathbb E[X_i] = \mathbb E[X_j] = 0$.
This follows from the four equations $$p(+,+)+p(+,-)=1/2,\;\; p(+,+)+p(-,+)=1/2,$$ (the marginal distribution of $X$ is $p(+)=p(-)=1/2$) $$p(+,+)+p(+,-)+p(-,+)+p(-,-)=1,$$ (normalization) and finally the definition of the correlator $E(X_iX_j)$: $$p(+,+)+p(-,-)-p(+,-)-p(-,+)=E(X_iX_j).$$