Covariance of two random variables XX and YY is defined by: Cov[X,Y]≜𝔼[(X−𝔼[X])(Y−𝔼[Y])]\mathrm{Cov}[X,Y]\triangleq \mathbb{E}[(X-\mathbb{E}[X])(Y-\mathbb{E}[Y])] Note that Variance is a special case: Var[X]=Cov[X,X]\mathrm{Var}[X]=\mathrm{Cov}[X,X]
References: