Given two random probability distributions how can we check if they are consistent with an underlying joint probability distribution?
Specifically, take two random variables $X$ and $Y$. If they are the marginals of some underlying distribution then they should satisfy the following equations, $$ Pr(X = x_i) = \sum_j Pr(X= x_i, Y = y_j) = \sum_j Pr(X = x_i | Y = y_j)~ Pr(Y = y_j)$$
$$ Pr(Y = y_j) = \sum_i Pr(X= x_i, Y = y_j) = \sum_i Pr(Y = y_j | X = x_i) ~Pr(X = x_i)$$
Under what conditions will the above equations be satisfied?
Any two distributions can be the marginals of a joint distribution. Simply choose the joint distribution such that the marginals are independent.