The covariance of two random variables X and Y is defined as
Cov(X, Y) = E[(X - E[X]) (Y - E[Y])]
where E is expectation.
If we replace Y with X, then this reduces to just the variance of X, which is defined as
Var(X) = E[(X - E[X])²]
5.2m questions
6.8m answers