expected value of the product of two Bernoulli variables

74 Views Asked by At

I'm stuck on proving that the product of two Bernoulli variables has expected value equal to the difference between the probability that the variables are the same and the probability that the variables are different.

$$E(XY)= P(X=Y) - P(X \neq Y)$$

1

There are 1 best solutions below

0
On

This statement isn't true. Consider the example where X and Y are independent Bernoulli variables with parameter $p=\frac{1}{2}$.

$$\mathbb{E}[XY] = P(X=1,Y=1) = \frac{1}{4}$$

On the other hand, $$P(X=Y) - P(X\neq Y) = P(X=0,Y=0) + P(X=1,Y=1) - P(X=0,Y=1) - P(X=1,Y=0) = \frac{1}{4} + \frac{1}{4} - \frac{1}{4} - \frac{1}{4} = 0$$