This website uses cookies
Privacy Policy
Cookie Policy


What is covariance?

Covariance is, in other words, a measure of the linear relationship between random variables X and Y.

The measure of covariance is based primarily on an examination of the joint variability of the data value of X and Y. If there is no linear relationship between X and Y, then covariance will be close to 0 (cov(X,Y) = 0). Conversely, if the relationship is strong, then the covariance value will be far from zero – i.e., (cov(X,Y)>0). However, there may also be a case, when it turns out that variables X and Y will be negatively correlated, then we will get a negative correlation value (cov (X, Y) < 0).

It is an intermediate measure that is used to calculate the correlation coefficient, thanks to which we can determine if there is a linear relationship and how large it is.

Formula for covariance:

How to understand it?
- cov(X,Y) – is the covariance between X and Y
- X and Y – are the variables
- E – is the expected value

In order to calculate the covariance between two variables X and Y, one should first calculate the product between the results of one and the other variable, derive the expected value (i.e., the arithmetic mean) from the results obtained and then subtract the product of the expected values for X and Y from the expected value of the products of these variables.

Disadvantages of covariance
A very noticeable disadvantage in counting covariance as a relationship characteristic is, first of all, that its value depends on the units of measurement of both characteristics. Therefore, the intensity of the relationship cannot be measured reliably.


Scientific fields


Interesting articles


Satisfied website users


Emails exchanged with our users :-