Theory 1

In many contexts it is useful to consider random variables that are summations of a large number of variables.

Summation formulas: E[X] and Var[X]

Suppose X is a large sum of random variables:

X=X1+X2++Xn

Then:

E[X]=E[X1]+E[X2]++E[Xn]Var[X]=Var[X1]++Var[Xn]+2i<jCov[Xi,Xj]

If Xi and Xj are uncorrelated (e.g. if they are independent):

Var[X]=Var[X1]++Var[Xn]

Extra - Derivation of variance of a sum

Using the definition:

Var[X1++Xn]=E[(X1++Xn(μX1++μXn))2]=E[((X1μX1)++(XnμXn))2]=E[i,j(XiμXi)(XjμXj)]=i,jCov(Xi,Xj)=iVar[Xi]+2i<jCov[Xi,Xj]

In the last line we use the fact that Cov[X,X]=Var[X] for the first term, and the symmetry property of covariance for the second term with the factor of 2.