- expectation of a sum always splits ( Linearity of Expectation ), variance only splits when the variables are independent ( uncorrelated is enough )
- otherwise you pay a Covariance term for how much they move together
Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)
- in general, with every pair counted once
Var(X1+⋯+Xn)=i=1∑nVar(Xi)+2i<j∑Cov(Xi,Xj)
- $Cov(X, X) = Var(X)$, so this is just $Cov\left(\sum X_i, \sum X_j\right)$ expanded
- example ( exercise 39.13 ): roll two dice, X = max, Y = min, find Cov(X,Y)=E(XY)−E(X)E(Y)
| k | P(X=k) | P(Y=k) |
|---|
| 1 | 361 | 3611 |
| 2 | 363 | 369 |
| 3 | 365 | 367 |
| 4 | 367 | 365 |
| 5 | 369 | 363 |
| 6 | 3611 | 361 |
- $E(X) = \frac{161}{36} \approx 4.47$, $E(Y) = \frac{91}{36} \approx 2.53$
- max times min is just the product of the two dice, which are independent, so $E(XY) = 3.5^2 = \frac{441}{36}$
- $Cov(X, Y) = \frac{441}{36} - \frac{161 \cdot 91}{36^2} = \frac{1225}{1296} \approx 0.945$, positive since a high min forces a high max