Simple expected value and variance exercise

105 Views Asked by At

The question is to find the expected value and variance of $X - Y$ where $X, Y$ are independent random variables distributed in $[0,1]$

My Attempt:

The expected value is simple enough, where $E(X-Y) = E(X) - E(Y) = \frac{1}{2} - \frac{1}{2} = 0$.

The variance is where I'm running into issues,

$\mathrm{Var}(X-Y) = \mathrm{Var}(X) - \mathrm{Var}(Y) = \frac{1}{12} - \frac{1}{12} = 0$.

I don't know if the variance is set up correctly. Is there a step I am missing?

2

There are 2 best solutions below

0
On

$Var(X-Y)=Var(X)+Var(Y)-2Cov(X,Y)$. When are X and Y independent then $Cov(X,Y)=0$.

0
On

You have forgot to square the factors in front of the variables. For independent random variables $X,Y$ we have that $$\text{Var}(aX+bY)=a^2\text{Var}(X)+b^2\text{Var}(Y)$$ where you can use $a=1$ and $b=-1$ in your case.