# Mixed random variables [closed]

Given X ~ N(0,1) , Y ~ Ber(1/4)

Z =

 X      if Y = 0
-X      if Y = 1


How to approach this question if i want to prove that Z and X are dependent .

• Hint: how do the distributions of $X$ and $-X$ differ? – whuber Jul 1 at 14:22

• Consider $$P(Z>0 | X>0)$$, which would be 0.5 if they were independent.
• For independent continuous variables $$X$$, $$Z$$, what is $$P(X=Z)$$?
The second approach is more powerful; it even works when $$Y$$ is Ber(1/2). If this is a teaching question I suspect the first one is what was intended.