# Are $XZ$ and $YZ$ independent if $X$, $Y$ and $Z$ are all independent?

Let $X$ and $Y$ be independent random variables. Let $Z$ be a random variable such that $Z$ and $X$ are independent, $Z$ and $Y$ are independent. Are random variables $XZ$ and $YZ$ independent?

Suppose that $X$ and $Y$ are independent random variables, both of which are equal to 1 with probability 1, and that $Z$ is independent of $X,Y$ and $Z=1$ with probability $\frac{1}{2}$, $Z=-1$ with probability $\frac{1}{2}$.

Then $\mathbb{P}(XZ=-1,YZ=1)=\mathbb{P}(Z=-1,Z=1)=0$, while $\mathbb{P}(XZ=-1)\mathbb{P}(YZ=1)=\frac{1}{4}$. So $XZ$ and $YZ$ are not independent.

Let $X$, $Y$, $Z$ be independent, with $X$ and $Y$ having nonzero mean.

Claim: $XZ$ and $YZ$ are independent if and only if $Z$ is constant.

Proof: If $XZ$ and $YZ$ are independent, then $$E(XZ)E(YZ)=E(XZYZ).\tag1$$ Since the LHS of (1) equals $E(X)E(Z)E(Y)E(Z)$, while the RHS of (1) equals $E(X)E(Y)E(Z^2)$, we must have $\left( E(Z)\right)^2=E(Z^2)$. The converse is immediate.

• ...If $E(X)\ne0\ne E(Y)$.
– Did
Apr 12, 2016 at 20:53
• @Did Right! Editing to add that condition. Apr 12, 2016 at 20:54

This example works also assuming $X$ and $Y$ non-constant.

Let $\Omega=\{1,2,...,16\}$ with uniform distribution.

$A_1=\{1,2,3,4\}$, $A_2=\{1,5,6,7\}$, $A_3=\{1,8,9,10\}$

then for any couple $A_i$, $A_j$ $$P(A_i\cap A_j)=P(\{1\})=\frac 1 {16}=\frac 4 {16} \times \frac 4 {16} =P(A_i)P(A_j)$$ so $Z=\chi_{A_1}$ (indicator function of $A_1$) is independent on both $X=\chi_{A_2}$ and $Y=\chi_{A_3}$, and also $X$ and $Y$ are independent.

On the other hand $ZX=\chi_{A_1}\chi_{A_2}=\chi_{A_1\cap A_2}=\chi_{\{1\}}$ and $ZY=\chi_{A_1}\chi_{A_3}=\chi_{A_1\cap A_3}=\chi_{\{1\}}$, so they are the same random variable $\chi_{\{1\}}$ and since $P(\{1\})= \frac 1 {16}$ it cannot be self-independent.

Let $X,Y,Z$ be mutually independent Bernoulli variables with $E(X)=a\gt0,\ E(Y)=b\gt0,\ E(Z)=c\gt0.$ Then: $$E(XZ\cdot YZ)=E(XYZ^2)=E(XYZ)=E(X)E(Y)E(Z)=abc.$$ $$E(XZ)E(YZ)=E(X)E(Z)E(Y)E(Z)=abc^2.$$ If $c\lt1$ then $E(XZ\cdot YZ)\gt E(XZ)E(YZ),$ whence $XZ$ and $YZ$ are not independent.