The question is in the title; Does $X - E(X|Z) \perp \!\!\! \perp Y - E(Y|Z)$ imply $X \perp \!\!\! \perp Y | Z$?
I cant really think of a counter-example but I can't think of a proof either, any ideas?
The question is in the title; Does $X - E(X|Z) \perp \!\!\! \perp Y - E(Y|Z)$ imply $X \perp \!\!\! \perp Y | Z$?
I cant really think of a counter-example but I can't think of a proof either, any ideas?
Counter-example. Let $X,Y$ be two independent Bernoulli random variables with $\mathbb{P}\left(X=i\right)=\mathbb{P}\left(Y=i\right)=\frac{1}{2}$ for $i\in\left\{-1,+1\right\}$. Define $Z\overset{\Delta}= XY$. Note that $\mathbb{P}\left(Z=i\right)=\frac{1}{2}$ for $i\in\left\{-1,+1\right\}$.
First, note that $X$ is independent of $Z$. Also, $Y$ is independent of $Z$. Indeed, $\mathbb{P}\left(X=+1,Z=+1\right)=\mathbb{P}\left(X=+1,Y=+1\right)=\frac{1}{4}=\mathbb{P}\left(X=+1\right)\mathbb{P}\left(Z=+1\right)$. The same can be verified for $Y$. Therefore, for the proposed $X,Y$ and $Z$, we have $X-E(X\left|Z\right.)=X-E(X)$ which is independent of $Y-E\left(Y\left|Z\right.\right)=Y-E(Y)$, but
$E(XY\left|Z\right.)=XY \neq E\left(X\left|Z\right.\right)E\left(Y\left|Z\right.\right)=E(X)E(Y)=0$
almost surely.