Covariance

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:

  1. https://cs229.stanford.edu/section/cs229-prob.pdf