Finding variance given expected value How would one find the variance of a random variable, $X$ given that it is composed of say two dependent random variables $Y_1$ and $Y_2$ (so $X = Y_1 + Y_2$), each with expected value of .5 and variance of .25. I'm basically stuck on how to account for the dependent aspect of the random variables.
If I know the possible values for Y1 and Y2 are {0,1}, each with probability .5, how would I use cov(Y1,Y2) = E(Y1*Y2)-E(Y1)*E(Y2)? I'm not sure how to get E(Y1*Y2). Is it simply .5 given the above information?
 A: \begin{eqnarray*}
  \text{var} \left( X \right) & = &
  \text{var} \left( Y_1 \right)
  +\text{var} \left( Y_2 \right) +
  2\text{cov} \left( Y_1, Y_2 \right)
\end{eqnarray*}
So you additionaly need to know the value of the covriance of $Y_1$ and $Y_2$
to be able to answer the question.
A: No, $E[Y_1Y_2]$ cannot be taken to be $0.5$.  Here are three different joint distributions for which $Y_1$ and $Y_2$ both have mean $0.5$ and variance $0.25$. I will leave it to you
to compute $E[Y_1Y_2]$ for each.


*

*$P\{Y_1 = 1, Y_2 = 1\} = 0.5,~~ P\{Y_1 = 0, Y_2 = 0\} = 0.5$.
$P\{Y_1 = 1, Y_2 = 0\} = 0,~~~~ P\{Y_1 = 0, Y_2 = 1\} = 0$.

*$P\{Y_1 = 1, Y_2 = 1\} = 0,~~~~ P\{Y_1 = 0, Y_2 = 0\} = 0$
$P\{Y_1 = 1, Y_2 = 0\} = 0.5,~~ P\{Y_1 = 0, Y_2 = 1\} = 0.5$

*$P\{Y_1 = 1, Y_2 = 1\} = 0.25,~~ P\{Y_1 = 0, Y_2 = 0\} = 0.25$,
$P\{Y_1 = 1, Y_2 = 0\} = 0.25,~~ P\{Y_1 = 0, Y_2 = 1\} = 0.25$.
A: As you wrote,
$$
cov(Y_1,Y_2) = E[Y_1Y_2]-0.5^2.
$$
However, note that the random variable $Y_1Y_2$ takes the value of 1 only when both $Y_1$ and $Y_2$ are equal to one. In any other case, $Y_1Y_2 = 0$. Thus,
$$
E[Y_1Y_2] = Pr\{Y_1 = 1, Y_2 = 1\}\times 1+0
$$
which is their joint probability. If they are independent, $Pr\{Y_1 = 1, Y_2 = 1\} = Pr\{Y_1=1\}Pr\{Y_2=1\}$ which gives you the result you propose. However, if they are not independent, you must be able to calculate the joint distribution somehow to give an answer.
