Statistics
Population covariance
Use when the paired observations are the entire group of interest. Centre each variable on its own mean, multiply the deviations pair by pair, sum them and divide by the total count.
Last updated
The Formula
Cov(X,Y) = Sum((xi - meanX)(yi - meanY)) / N
Use when the paired observations are the entire group of interest. Centre each variable on its own mean, multiply the deviations pair by pair, sum them and divide by the total count.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| Cov(X,Y) | Population covariance | x units times y units | Measured in the product of the two variables' units; 1.2 for the five pairs used here. |
| muX, muY | The two population means | same as each variable | Computed separately for each variable; 3 and 4 in the worked data. |
| N | Number of paired observations | count | Five here, so the cross-product sum of 6 is divided by 5. |
What Each Symbol Means
Cov(X,Y)x units times y units
Population covariance
Measured in the product of the two variables' units; 1.2 for the five pairs used here.
muX, muYsame as each variable
The two population means
Computed separately for each variable; 3 and 4 in the worked data.
Ncount
Number of paired observations
Five here, so the cross-product sum of 6 is divided by 5.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to calculate the covariance page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Calculate The Covariance, filed under Math. Every number the guide produces comes from substituting into this one line.
Common Questions
What is the formula for Population covariance?
The formula for Population covariance is Cov(X,Y) = Sum((xi - meanX)(yi - meanY)) / N. Use when the paired observations are the entire group of interest. Centre each variable on its own mean, multiply the deviations pair by pair, sum them and divide by the total count.
What does each symbol in Population covariance stand for?
Cov(X,Y) is population covariance; muX, muY is the two population means; N is number of paired observations.
What units should I use with Population covariance?
Substitute Cov(X,Y) in x units times y units, muX, muY in same as each variable, N as a plain count. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using Population covariance?
Using the wrong divisor. Dividing by n when the pairs are a sample understates the population covariance, while dividing by n minus one for a complete population inflates it for no reason. With five pairs the two answers are 1.2 and 1.5, far apart enough that the choice must be made deliberately.