# Covariance

-

The covariance is a numerical quantity that measures the degree of interdependence between two variables. Whenever the change in one variable affects a change in another variable then we say that the two variables are covariates. Some examples of correlated variables are demand and supply, IQ score and marks in exam, income and expenditure, etc.

We can have two different types of Covariance:

1. Positive Covariance – Whenever the increase in value of one variable leads to increase in the value of the other variable or if the decrease in one variable leads to decrease in the other variable, then we say the two variables have positive covariance. An example of this is income and expenditure because as the income increases so does the expenditure and if the income decreases so does the expenditure.
2. Negative Covariance – Whenever the increase in value of one variable leads to decrease in the value of the other variable, then we say the two variables have negative covariance. An example of this is price and supply because as the supply increases the price decreases.

If the covariance is 0 then it means that there is no linear relationship between the two variables under study. This means that the two variables are not affected by each other.

Formula for Covariance:

The covariance between two variables X and Y can be calculated using the formula:

Example of Calculating Covariance:

Suppose you are given the following data about two variables X and Y. Calculate the covariance between them.

Solution: We first calculate the means and x̄ and ȳ as required in the above formula,

x̄ = 1+4+5+7/4 = 16/4 = 4

ȳ = 3+4+8+13 = 28/4 = 7

So, Covariance = ∑(x-x̄)(y- ȳ)/n = 25/4 = 6.25 and hence we conclude that the two variables are have positive covariance.

Covariance vs Variance:

The concepts of covariance and variance are different. Covariance is about measuring the relationship between two variables whereas, variance is a measure of the spread of the data for a single variable.

Covariance and Covariance:

The concepts of covariance and correlation are similar as both measure the linear relationship between two variables. The difference is that the correlation coefficient is a standardized value of the covariance and therefore the correlation coefficient always has a value lying between -1 and 1.

Hey 👋

I have always been passionate about statistics and mathematics education.

I created this website to explain mathematical and statistical concepts in the simplest possible manner.

If you've found value from reading my content, feel free to support me in even the smallest way you can.