1
$\begingroup$

Let $Y$ = $pD_1+(1-p)D_2$, where $Y, D_1, D_2$ are random variables such that $D_1$ and $D_2$ are independent, and $p$ is a fixed parameter, $p\in(0,1)$.

I computed $$var(Y) = var[pD_1+(1-p)D_2)] = p^2var(D_1) + (1-p)^2var(D_2)$$ and I substituted the values with the given constants and I obtained the answer.

Now, I want to compute the same value for $var(Y)$ using the following formula:

$$var(Y) = E[Y^2]- E^2[Y]$$

I am asking myself how $E[Y^2]$ looks like. Here is what I've tried:

$$Y^2 = p^2D_1^2 + (1-p)^2D_2^2 + 2p(1-p)D_1D_2$$ Therefore I applied the $E$ operator and here is what I've got:

$$E[Y^2] = p^2E[D_1^2] + (1-p)^2E[D_2^2] + 2p(1-p)E[D_1]E[D_2]$$ because $E[D_1D_2] = E[D_1]E[D_2]$, due their independence.

But, when I substitute the values with constants, I got a different answer from the first computation for $var(Y)$. What did I do wrong?

1 Answers 1

2

Did you substract $\def\E{\mathbf E}\E^2[Y]$ correctly? As $$ \E[Y] = p\E[D_1] + (1-p)\E[D_2], $$ we have $$ \E^2[Y] = p^2\E^2[D_1] + 2p(1-p)\E[D_1]\E[D_2] + (1-p)^2\E^2[D_2]$$ Hence, we have, using your result for $\E[Y^2]$, that \begin{align*} \def\V{\mathrm{Var}}\V[Y] &= \E[Y^2]-\E^2[Y] \\ &= p^2\bigl(\E[D_1^2] - \E^2[D_1]\bigr) + (1-p)^2\bigl(\E[D_2^2] - \E^2[D_2]\bigr)\\ &= p^2\V[D_1] + (1-p)^2\V[D_2] \end{align*} as the mixed terms cancel. This is the same as above.

  • 0
    You are right, I typed $p$ instead of $p^2$ somewhere. Thank you!2017-01-19