# Effects of subtracting numbers in a set of random variables on their mean and standard deviation

This is a question about linear combinations of independent random variables. X and Y are independent random variables.

$X$ has mean 2 and standard deviation 4.
$Y$ has mean 3 and standard deviation 2.
How would you calculate the mean and standard deviation of $X - Y$?

I know that if a set of random variables are all added by k then the mean becomes mean+k but since we are adding the numbers by different numbers, how would this work?

-
If the random variables X and Y are normal, then the variance of the sum is the sum of the variances. en.wikipedia.org/wiki/…. Variance is the square of the standard deviation. For the more general case, see: lmgtfy.com/?q=sum+of+independent+random+variables&l=1 –  Dan Brumleve Sep 14 '11 at 7:53

Mean is linear in its argument, i.e. $$\mathsf E(X-Y) = \mathsf EX-\mathsf EY.$$
About the standard deviation you know that the variance of sum of independent random variables is equal to the sum of their variances, i.e. $$V(X+Y) = V(X)+V(Y)$$ and the standard deviation is a positive square root of the variance: $\sigma_X = +\sqrt{V(X)}$. What you still need to do is to recall that $V(Y) = V(-Y)$, so $$\sigma_{X-Y} = \sqrt{V(X-Y)} = \sqrt{V(X+(-Y))} = \sqrt{V(X)+V(-Y)}$$ $$=\sqrt{V(X)+V(Y)} = \sqrt{\sigma_X^2+\sigma_Y^2} = \sqrt{20} = 2\sqrt{5}.$$