# Is the joint distribution $P_{XY}(x,y)$ determined from the conditionals $P_{X|Y}(x|y)$ and $P_{Y|X}(y|x)$?

For simplicity assume that $$X,Y$$ are discrete, finite, random variables, with joint distribution $$P_{XY}(x,y) = \mathbb{P}(X=x\wedge Y=y)$$.

Now suppose that we do not know $$P_{XY}(x,y)$$, but are given the values of the conditionals $$P_{X|Y}(x|y)=P_{XY}(x,y)/P_Y(y)$$ and $$P_{Y|X}(y|x)=P_{XY}(x,y)/P_X(x)$$, and we assume that these conditionals satisfy the required consistency relations (though I'm not sure what these consistency requirements are, but there must be some when one balances the degrees of freedom).

Is the knowledge of the conditionals $$P_{X|Y}(x|y)$$ and $$P_{Y|X}(y|x)$$ sufficient to recover the full joint distribution $$P_{XY}(x,y)$$?

Please note that this is different from Is the joint distribution $P_{XY}(x,y)$ determined from the marginal $P_X(x)$ and the conditional $P_{X|Y}(x|y)$?, because there I know a conditional and a marginal, whereas here I know both conditionals.

## 1 Answer

This characterisation of the joint by the conditionals is the Hammersley-Clifford theorem. Unpublished by the authors but later established under the positivity condition by Julian Besag in 1974. The positivity condition is essentially the constraint that the support of the joint is equal to the product of the supports of the conditionals. In that case, for an arbitrary $$x$$, \begin{align*}P_Y(y)&=\dfrac{P_X(x)P_{Y|X}(y|x)}{P_{X|Y}(x|y)}\\ &\stackrel{\text{as a function}\\\quad \text{of y}}{\propto}\dfrac{P_{Y|X}(y|x)}{P_{X|Y}(x|y)}\\ &=\dfrac{P_{Y|X}(y|x)}{P_{X|Y}(x|y)}\Big/ \sum_\zeta \dfrac{P_{Y|X}(\zeta|x)}{P_{X|Y}(x|\zeta)}\end{align*} This representation would later lead to the construction and justification of the Gibbs sampler in the 1980ś .

Note that a necessary and sufficient condition for the two conditionals to be compatible (with the same joint) is that they factorise as $$\dfrac{P_{Y|X}(y|x)}{P_{X|Y}(x|y)} = h(x) k(y)$$

• "This representation would later lead to the construction and justification of the Gibbs sampler in the 1980ś." .... Can you point out a reference or two? Thanks – becko Dec 25 '19 at 18:53