I am working through a measure-theory probability theory book and I have the following problem:
Suppose each of $X$ and $Y$ take on at most two values, $a$ and $b$. Prove that $X$ and $Y$ are independent if $E(XY) = E(X)E(Y)$.
I know that to show independence, I need to show that for any two Borel sets $E_{1}$ and $E_{2}$, we have
$$P(\{ \omega \mid X(\omega) \in E_{1}\}) = P(\{\omega \mid Y(\omega) \in E_{2}\}), $$
but I have been having a lot of trouble doing so. I'm also not really sure where I would use the fact that they only take on two values.
Thank you for any help.
Hints: when $a=0,b=1$ just observe thatb $XY=1$ iff $X=1$ and $Y=1$. This gives $P(X=1,Y=1)=P(X=1)P(Y=1)$ and you can prove independence fron this.
For the general case take $X=\frac {X-a} {b-a}, V=\frac {Y-b} {a-b}$ and verify that $EUV=EUEV$. Since $U$ and $V$ take only the values $0$ and $1$ you can use the first case here.