# Var(X+Y+Z)

#### shrek

##### New Member
What is the formula for the variance of 3 dependent variables?

For 2 dependent variables, the formula is

Var(X)+Var(Y)+2*Cov(X,Y)

What is Var(X+Y+Z) if the variables are dependent? Please do not give me the general formula for n number of variables. I've seen it but I don't understand it. If I see an example with 3 variables then I think I can figure it out. Thanks.

Last edited:

#### Dragan

##### Super Moderator
What is the formula for the variance of 3 dependent variables?

For 2 dependent variables, the formula is

Var(X)+Var(Y)+2*Cov(X,Y)

What is Var(X+Y+Z) if the variables are dependent? Please go not give me the general formula for n number of variables. I've seen it but I don't understand it. If I see an example with 3 variables then I think I can figure it out. Thanks.

Var (X + Y + Z) = Var(X) + Var(Y) + Var(Z) + 2Cov(X,Y) + 2Cov(X,Z) + 2Cov(Y,Z).

I can write out a short proof if you would like.

#### shrek

##### New Member

Var (X + Y + Z) = Var(X) + Var(Y) + Var(Z) + 2Cov(X,Y) + 2Cov(X,Z) + 2Cov(Y,Z).

I can write out a short proof if you would like.
thanks! no proof necessary. how about Var(X+Y-Z)? is this right?

Var (X + Y - Z) = Var(X) + Var(Y) - Var(Z) + 2Cov(X,Y) - 2Cov(X,Z) - 2Cov(Y,Z)

#### Dragan

##### Super Moderator
thanks! no proof necessary. how about Var(X+Y-Z)? is this right?

Var (X + Y - Z) = Var(X) + Var(Y) - Var(Z) + 2Cov(X,Y) - 2Cov(X,Z) - 2Cov(Y,Z)

Well, you're always going to sum the variances so we have,

Var (X + Y - Z) = Var(X) + Var(Y) + Var(Z) + 2Cov(X,Y) - 2Cov(X,Z) - 2Cov(Y,Z)

#### zevmil

##### New Member

Var (X + Y + Z) = Var(X) + Var(Y) + Var(Z) + 2Cov(X,Y) + 2Cov(X,Z) + 2Cov(Y,Z).

I can write out a short proof if you would like.
Hi,
Can you please write out the proof?

#### BGM

##### TS Contributor
$$Var\left[\sum_{i=1}^n X_i\right]$$

$$= Cov\left[\sum_{i=1}^n X_i, \sum_{j=1}^n X_j\right]$$

$$= \sum_{i=1}^n \sum_{j=1}^n Cov[X_i, X_j]$$

#### joepxs

##### New Member
hi can you help me with my statistics paper?