Statistics

Covariance

Students place paired points on a chart that rises from left to right.

Covariance definition

Covariance measures whether two variables tend to be above or below their means together.

In Spanish
covarianza
Topic
Association and regression

Covariance in a picture

Covariance diagramPoints above or below both means contribute positively.XY
Points above or below both means contribute positively.

How it works

For random variables with finite second moments, covariance is E[(X − E[X])(Y − E[Y])]. Deviations with the same sign make a positive contribution, and opposite signs make a negative contribution. The units are the product of the two variables’ units. Correlation rescales covariance to remove units.

Worked examples

If Y = 2X, what is Cov(X, Y)?

2 Var(X).

If X and Y are independent with finite second moments, what is their covariance?

Zero.

Does zero covariance prove independence?

No. A nonlinear relationship can give zero covariance.

Common mistake

Compare covariance carefully across different scales. Changing meters to centimeters changes its numerical value.

Quick check

What sign comes from two above-mean values?

Show answer

Positive.

What sign comes from one above and one below?

Show answer

Negative.

What equals Cov(X, X)?

Show answer

Var(X).

Sources

Flashcard

Covariance

Reveal the definition

Covariance measures whether two variables tend to be above or below their means together.

Effortless Math. “Covariance.” Math Dictionary.