Let $X,Y$, two random variables which are indicators. Lets assume $P(X=1)=p$ and $P(Y=1)=q$ for some $0 \le p,q \le 1$.
I've understood that: $E[XY] = P(X=1, Y=1)$. How to show it?
$$E[XY] = \sum_{i=0}^1 XY\cdot Pr(?)$$
I guess it should be $Pr(X=i, Y=i)$ and of course, when $i=0$ the all expression equals to $0$.
But, why is it $Pr(X=i, Y=i)$? I'd be glad for both algebraic and intuitive explanation.
Thanks!
It should be $$E[XY] = \sum_{i=0}^1 \sum_{j=0}^1 i j\cdot P(X=i, Y=j)$$ and if you write all four members of the above sum, three of them is egual to zero: $$E[XY] = 0 \cdot 0 \cdot P(X=0, Y=0) + 1 \cdot 0 \cdot P(X=1, Y=0)\\ + 0 \cdot 1 \cdot P(X=0, Y=1)+ 1 \cdot 1 \cdot P(X=1, Y=1)$$