Distinguishing joint probability distributions Assume that we have a probability distribution $P(X,Y)$ for the joint probability of random variables $X$ and $Y$. Let $P(Y, Z)$ be analogous distribution for $Z$ and $Y$. Based on these we can define a joint probability distribution of $P(X,Y,Z)$.

Let, $P'(X,Y)$ and $P'(Y,Z)$ be analogously probability distributions where it is known that $P'(X,Y)$ is computationally indistinguishable from $P(X,Y)$ and $P(Y, Z)$ is computationally indistinguishable from $P'(Y,Z)$. Based on these we define a joint probability distribution $P'(X,Y,Z)$.

Do the indistinguishability conditions on the initial distributions imply that $P(X,Y,Z)$ is computationally indistinguishable from $P'(X,Y,Z)$?
Obviously not; one can easily define probability distributions $P$ and $P'$ such that $P(X,Y)=P'(X,Y)$ and $P(Y,Z)=P'(Y,Z)$, but $P(X,Y,Z) \ne P'(X,Y,Z)$

For one such example, take $P$ be the probability distinguish where $X$, $Y$ and $Z$ are uniformly and independently distributed boolean variables; and $P'$ be the probability distribution that $X$ and $Y$ are uniformly and independently distributed boolean variables, and $X=Z$ with probability 1.

Now, $P(X,Y)=P'(X,Y)$ (because, in both probability distributions, each possible combination of boolean variables will occur with probability 0.25), and similarly $P(Y,Z)=P'(Y,Z)$.

However, $P(X,Y,Z) \ne P'(X,Y,Z)$ in an computationally easy manner, because with a single sample of the probability distribution, we can check if $X = Z$ (can guess $P$ if it is false, and $P'$ if it is true); that gives us a distinguisher that succeeds with high probability.