# Thread: Quick Quesiton with expectation and variance with independent random variables

1. ## Quick Quesiton with expectation and variance with independent random variables

Suppose X and Y are independent random variables with E(X) = 1 and Var(X) = 5 and E(Y) = 7 and Var(Y) = 3. Find E((2+X)^2) and Var(X-3Y-4)

For the Variance one, it's just Var(X) - 3Var(Y) - 4 right?

The quick question I had was does the square of (2+X) matter at all? Or do I just do (2 + E(X))^2?

2. Originally Posted by Janu42
For the Variance one, it's just Var(X) - 3Var(Y) - 4 right?
Does translation by a constant change the variance? I would encourage you to use the identity $Var(X)=\mathbb{E}[X^2]-\mathbb{E}[X]^2$ to compute it.

The quick question I had was does the square of (2+X) matter at all? Or do I just do (2 + E(X))^2?
Just expand it out and see for yourself.
$
\mathbb{E}[(2+X)^2]=\mathbb{E}[4+4X+X^2]
$

Now apply the linearity and use the above formula for the variance to find $\mathbb{E}[X^2]$.

3. Originally Posted by Focus
Does translation by a constant change the variance? I would encourage you to use the identity $Var(X)=\mathbb{E}[X^2]-\mathbb{E}[X]^2$ to compute it.

Just expand it out and see for yourself.
$
\mathbb{E}[(2+X)^2]=\mathbb{E}[4+4X+X^2]
$

Now apply the linearity and use the above formula for the variance to find $\mathbb{E}[X^2]$.

I know the formula for Variance, but what do you mean use the identity to compute it? I thought Var(X+Y) = Var(X) + Var(Y) for independent random variables.

Let me see if I understand. E(X) = 1 and Var(X) = 5, so 5 = E(X^2) - 1, so E(X^2) is 6. But then how does that matter to the first part? Like I said, I thought I could just plug in the Var(X) for X and Var(Y) for Y.

And for the second one, then it's 4 + 4E(X) + E(X^2)?

4. Originally Posted by Janu42
I know the formula for Variance, but what do you mean use the identity to compute it? I thought Var(X+Y) = Var(X) + Var(Y) for independent random variables.

Let me see if I understand. E(X) = 1 and Var(X) = 5, so 5 = E(X^2) - 1, so E(X^2) is 6. [snip] Mr F says: Yes.

And for the second one, then it's 4 + 4E(X) + E(X^2)?
Yes, and you know E(X^2).

Originally Posted by Janu42
Suppose X and Y are independent random variables with E(X) = 1 and Var(X) = 5 and E(Y) = 7 and Var(Y) = 3. Find E((2+X)^2) and Var(X-3Y-4)

For the Variance one, it's just Var(X) - 3Var(Y) - 4 right?

[snip]
Wrong. Because Var(aX + bY + c) = a^2 Var(X) + b^2 Var(Y). I can't be bothered searching but the member zorro asked the same question a few days ago - I gave a more detailed reply at that thread.