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.
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.$