122 Chapter 4:Random Variables and Expectation
=E[XY]−μxμy−μyμx+μxμy
=E[XY]−E[X]E[Y] (4.7.1)From its definition we see that covariance satisfies the following properties:
Cov(X,Y)=Cov(Y,X) (4.7.2)and
Cov(X,X)=Var(X) (4.7.3)Another property of covariance, which immediately follows from its definition, is that, for
any constanta,
Cov(aX,Y)=aCov(X,Y) (4.7.4)The proof of Equation 4.7.4 is left as an exercise.
Covariance, like expectation, possesses an additive property.
Lemma 4.7.1
Cov(X+Z,Y)=Cov(X,Y)+Cov(Z,Y)Proof
Cov(X+Z,Y)
=E[(X+Z)Y]−E[X+Z]E[Y] from Equation 4.7.1
=E[XY]+E[ZY]−(E[X]+E[Z])E[Y]
=E[XY]−E[X]E[Y]+E[ZY]−E[Z]E[Y]
=Cov(X,Y)+Cov(Z,Y) Lemma 4.7.1 can be easily generalized (see Problem 48) to show that
Cov(n
∑i= 1Xi,Y)
=∑ni= 1Cov(Xi,Y) (4.7.5)which gives rise to the following.
PROPOSITION 4.7.2
Cov
∑ni= 1Xi,∑mj= 1Yj
=∑ni= 1∑mj= 1Cov(Xi,Yj)