Covariance

Expectation of a centered product measuring joint linear variability of two random variables
Covariance

A covariance is the quantity Cov(X,Y)=E ⁣[(XE[X])(YE[Y])]=E[XY]E[X]E[Y]\operatorname{Cov}(X,Y)=\mathbb{E}\!\left[(X-\mathbb{E}[X])(Y-\mathbb{E}[Y])\right]=\mathbb{E}[XY]-\mathbb{E}[X]\mathbb{E}[Y] associated to two XX and YY with finite second moments.

Covariance is built from on a and generalizes , since Cov(X,X)=Var(X)\operatorname{Cov}(X,X)=\operatorname{Var}(X). If XX and YY are and have finite second moments, then Cov(X,Y)=0\operatorname{Cov}(X,Y)=0 (but the converse need not hold).

Examples:

  • If X=1AX=\mathbf{1}_A and Y=1BY=\mathbf{1}_B are indicator of events A,BA,B, then Cov(X,Y)=P(AB)P(A)P(B)\operatorname{Cov}(X,Y)=\mathbb{P}(A\cap B)-\mathbb{P}(A)\mathbb{P}(B) in terms of .
  • If Y=aX+bY=aX+b for constants a,ba,b and XX has finite second moment, then Cov(X,Y)=aVar(X)\operatorname{Cov}(X,Y)=a\,\operatorname{Var}(X).
  • If XX and YY are independent standard normal , then Cov(X,Y)=0\operatorname{Cov}(X,Y)=0.