Consider three random variables $X,Y,Z$. Suppose $X\perp Z$ and $Y\perp Z$, where $\perp $ denotes independence.

Is it true that ($X\perp Y$) implies ($X\perp Y$ conditional on $Z$)? I know that in general independence does not imply conditional independence, but I was wondering whether the fact that $X$ and $Y$ are independent of $Z$ simplifies things.

  • 3
    $\begingroup$ No. Say you are tossing two fair coins. $X$ is the event "the first coin comes up $H$". $Y$ is the event "the second coin comes up $H$". $Z$ is the event "the two coins come up the same" $\endgroup$ – lulu Apr 27 '17 at 15:03
  • $\begingroup$ Is in your example $X$ independent of $Z$? $\endgroup$ – STF Apr 27 '17 at 15:06
  • 2
    $\begingroup$ Of course. Knowing that the two coins match doesn't tell me what the first coin came up. $\endgroup$ – lulu Apr 27 '17 at 15:07
  • $\begingroup$ OK, what additional condition I would need to go from independence to conditional independence? $\endgroup$ – STF Apr 27 '17 at 15:08
  • $\begingroup$ Well, you could just assume conditional independence. Not sure there's some natural intermediate assumption.... $\endgroup$ – lulu Apr 27 '17 at 15:09

It is well known that there exist events $A,B,C$ such that any two of them are independent but $P(A\cap B\cap C) \neq P(A)P(B)P(C)$. Take $X=I_A.Y=I_B,Z=I_C$ to get a counterexample.


$X\perp Y | Z$ implies that $p(X \cap Y|Z) = p(X|Z)p(Y|Z)$.

And further we can obtain:

$$\begin{align} \begin{array}{rc} X\perp Y | Z \implies& p(X \cap Y|Z) = p(X|Z)p(Y|Z) \\ \implies& \frac{p(X \cap Y|Z)}{p(Y|Z)}=p(X|Z) \\ \implies& p(X|Y,Z) = p(X|Z) \end{array} \end{align}$$

And if $X \perp Z$, $Y\perp Z$ and $X\perp Y$ we can get:

$$\begin{align} p(X|Y,Z) &= \frac{p(X, Y, Z)}{p(X,Z)} \\ & = \frac{p(X)p(Y|X)p(Z|Y, X)}{p(X)p(Z|X)} \\ & = \frac{p(Y)p(Z|X,Y)}{p(Z)} \end{align}$$

So the first case $X \perp Z$, $Y\perp Z$ and $X\perp Y$ cannot imply the second $X\perp Y | Z$.

I hope the above reduction and reasoning hold.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.