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](https://stats.stackexchange.com/questions/312753/ising-model-with-zero-external-field-marginalization).



Ising model with zero external field - marginalization
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$.


