Independence/conditional independence of two i.i.d. RVs

516 Views Asked by At

If $X$ and $Y$ are two i.i.d. Bernoulli random variables (p=0.5) and $Z := X \oplus Y$ (xor operator)

Is $Z$ independent of $X$, and are $X$ and $Y$ conditionally independent given $Z$?


I think that $Z$ is dependent on $X$, and $X$ and $Y$ are conditionally dependent given $Z$, but I'm not sure how to check this.

2

There are 2 best solutions below

4
On BEST ANSWER

To determine whether $Z$ is independent of $X$ we need to compute $P(Z|X)$ and $P(Z)$ and see if they're equal. $Z=0$ if $X=Y$ and $Z=1$ if $X\ne Y,$ so we see that $Z$ is also (unconditionally) Bernoulli with $p=1/2.$

However, say $X=0.$ Then conditional on $X=0$, $Z = 1$ if and only if $Y=1,$ so it is conditionally Bernoulli with $p=1/2.$ Similarly if $X=1,$ it is conditionally Bernoulli with $p=1/2.$ So the conditional distribution is the same as the unconditional distribution and $Z$ is independent of $X.$ (And of $Y$ by symmetry. But it's not jointly independent of $X$ and $Y$)

If we know $Z$ then knowing $X$ implies we know $Y,$ so $X$ and $Y$ are conditionally dependent given $Z.$

0
On

Assuming that $X$, $Y$ and $Z$ have $\{0, 1\}$ as their support (you can extend to a more general case reasonably easily):

$\begin{eqnarray}P(Z = 0) & = & P(X = 0, Y = 1) + P(X = 1, Y = 0) \\ & = & P(X = 0)P(Y = 1) + P(X = 1)P(Y = 0) \\ & = & 2 \times P(X = 0)\left(1 - P(X = 0)\right) \\ & = & 2p_0(1-p_0)\end{eqnarray}$

Where $p_0 = P(X = 0) = P(Y = 0) = 1 - P(X = 1) = 1 - P(Y = 1)$, since they are iid.

$\begin{eqnarray}P(Z = 0 | X = 0) & = & P(Z = 0 | X = 0, Y = 0)P(Y = 0) + P(Z = 0 | X = 0, Y = 1)P(Y = 1) \\ & = & 0 \times P(Y = 0) + 1 \times P(Y = 1) \\ & = & P(Y = 1) \\ & = & P(X = 1) \\ & = & 1 - P(X = 0) \\ & = & 1 - p_0 \end{eqnarray}$

So the two are only equal if $2p_0(1 - p_0) = 1 - p_0$, which happens if $p_0 = \frac{1}{2}$ or $p_0 = 1$. In the latter case, $Z$ is always 0, so it is independent of $X$ and $Y$. In the former (which you've now edited to say is the case in question), you flip two coins. Then, if the second coin is tails, you turn the first coin over. Finally, you record the side the first coin is on. It doesn't matter which side the first coin initially lands on, it has an equal chance of being flipped over or not, so the final result is independent of the first coin's initial flip.