Given: P(X) = 1/4, P(Y) = 1/3, P(XY) = 1/8 (so not independent since P(XY) does not equal P(X)*P(Y)
Since these are Bernoulli RVs, we also have E(X) = 1/4, E(X^2) = 1/4, E(Y) = 1/3, E(Y^2) = 1/3, and E(XY) = 1/8
Trying to reconcile different ways to calculate E[(X+Y)^2]...simplest way which I believe yields the correct answer is:
E[(X+Y)^2] = E(X^2) + E(Y^2) + 2*E(XY) = 1/4 + 1/3 + 2*(1/4) = 5/6
However, if I use a "cases" approach I get a different answer:
Case 1: Neither event X or Y occurs Case 2: Event X occurs, event Y does not occur Case 3: Event X does not occur, event Y occurs Case 4: Both events X and Y occur
E[(X+Y)^2] = P(Case 1)(0+0)^2 + P(Case 2)(1+0)^2 + P(Case 3)(0+1)^2 + P(Case 4)(1+1)^2 = 3/4(2/3)*0 + 1/4(2/3)(1) + 3/4(1/3)(1) + 1/8(4) = 11/12
I am guessing that the cases approach is not valid here, but I can't explain to myself exactly why....I do note that the Cov(X,Y) can be easily calculated as 1/24, and if I subtract out 2*Cov(X,Y) = 1/12 I get the original answer of 5/6 but I am having trouble connecting the dots here as to why this needs to be done...
Or does the trouble lie perhaps in my assumption that E(XY) = P(XY)? I have trouble seeing how that could be incorrect though....
Second method work fine:
\begin{eqnarray*} E((X+Y)^2) &=& 1\cdot P(X\cap\neg Y) + 1\cdot P(\neg X\cap Y) + 4\cdot P(X\cap Y) \\ &=& [P(X)-P(X\cap Y)] + [P(Y) - P(X\cap Y)] + 4\cdot P(X\cap Y) \\ &=& \dfrac{1}{8} + \dfrac{5}{24} + 4\cdot \dfrac{1}{8} \\ &=& \dfrac{5}{6}. \end{eqnarray*}