# Expectation value problem

1. Oct 14, 2015

### toothpaste666

1. The problem statement, all variables and given/known data
If X1 has mean -3 and variance 2 while X2 has mean 5 and variance 4 and the two are independent find
a) E(X1 - X2)
b) Var(X1 - X2)

3. The attempt at a solution
I am not very clear on what I am supposed to be doing for this problem. I don't fully understand this expectation value concept. Can someone help explain what they are asking me to do or give me a hint on how to get started please? Here is what I did so far but I don't know if its worth anything

they are independent so my book says the covariance is 0
so
E[(X1 - μ1)(X2 - μ2)] = 0
E[(X1 + 3)(X2 - 5)] = 0
E[X1X2 - 5X1 + 3X2 -15] = 0

I think that is equal to this but I may be wrong:

E[X1X2] - 5E[X1] + 3 E[X2] - 15 = 0

I don't know what to do from here though. Am I on the right track at all?

2. Oct 14, 2015

### andrewkirk

Yes you are on the right track.

'The mean of X1' is defined to be E[X1].

As regards E[X1X2]: have they given you the rule for the expectation value of a product of independent variables?
If not, it's easy to derive. Start by writing the expectation as a double integral.

3. Oct 14, 2015

### LCKurtz

No, I don't think you are on the right track. You are making it much too difficult. You don't need to do any calculations with covariance or the expectation of a product. Surely your text has formulas for the expected value and variance of a sum of independent random variables. Have you looked for such formulas?

4. Oct 17, 2015

### toothpaste666

Ok sorry my book is very confusingly written but I think I figured it out.
so E(aX1 + bX2) = aE(X1) + bE(X2)
for part a) a = 1 and b = -1
so E(X1-X2) = E(X1) - E(X2) = -3 - 5 = -8

for part b)
Var(aX1+bX2) = a^2Var(X1) + b^2Var(X2)
since a =1 and b = -1
Var(X1-X2) = Var(X1) + Var(X2) = 2 + 4 = 6

is this correct?

5. Oct 17, 2015

### andrewkirk

Yes that's correct. Just be careful not to forget that the formula you use in (b) only holds when the two random variables are independent. The formula in (a) holds regardless of dependence.

6. Oct 17, 2015

thank you!