JEE Exam » JEE Study Material » Mathematics » Understanding Covariance vs Correlation

Understanding Covariance vs Correlation

What is the difference between covariance and correlation? Click the link to get the answers.

Understanding the change that occurs in a variable based on the changes in another variable is an important measurement. The parameters used to measure such kinds of relative changes that happen in a variable based on some other variables are correlation and covariance. 

The covariance of the dataset gives us an idea of what predictions can be expected when we make certain changes to the input values. It is very useful in fields like predictive modelling since it gives us a basic idea of what prediction we can expect if we already know the relationship between the input and output variables.

The correlation coefficient may not provide the cause for the linear relationship between two random variables, but it is vital to judge the strength of this relationship. For example, if random variable X takes up all the input values in an experiment and random variable Y takes up all the predicted output values. Then the correlation coefficient will give the best fit line to the X and Y dataset and provide an idea of how far the actual dataset is from the predicted dataset.

Covariance

Covariance is the measure of the related variability of two random variables. It gives an idea of the kind of relationship that two variables share.

When the larger values of a random variable X match with the larger values of a random variable Y and at the same time when the smaller values of the random variable X match with the smaller values of the random variable Y, then the covariance between them is said to be positive.

On the contrary, when the smaller values of the random variable X match with the larger values of the random variable Y and the larger values of the random variable X match with the smaller values of the random variable Y, then the two variables are said to be in negative covariance to each other.

In simple words, when two random variables display a covariance that has a positive sign, then it can be said that as the value of one random variable increases, the value of the second random variable also increases. But when the covariance between two variables has a negative sign, it can be said that the increase in the value of one random variable leads to a decrease in the value of the second random variable.

The formula for the covariance of two random variables, X and Y, that take up a fixed number of values is;

Cov(X,Y)=i=1n(xi-x)(yi-y)N 

where

xi are the values taken up by X

yi are the values taken up by Y

x is the mean of X

y is the mean of Y

N is the total number of values

Correlation

With covariance, one can find out what kind of relationship two random variables share and give the idea of the linear relationship between them. But the strength of the linear relationship that two random variables share is given by the correlation coefficient of the two random variables.

With the correlation coefficient, one can predict to what degree random variable changes when it is correlated to another random variable. The correlation coefficient, much like the covariance of two random variables, bears a positive or a negative sign based on the linear relationship that two random variables share between each other. A positive sign is an indication that when the value increases of one variable, it will translate to a rise in the value of the other correlated variable. A negative sign would indicate that an increase in the value of one variable would translate as a decrease in the value of the other correlated value.

The correlation coefficient is derived from the covariance between two random variables. While the covariance gives us an idea of the linear relationship between two random variables, the correlation strengthens this relationship. Still, it does not give the cause of this strength or its effect outside of the two random variables in the discussion. The formula for correlation coefficient can be given as;

X,Y=corr(X,Y)=Cov(X,Y)/XY

Covariance vs Correlation

Covariance

Correlation

Using covariance, we can tell the level of dependency of two variables on one another. The more the covariance between two variables, the greater the change between them.

While covariance gives the tendency of two variables and the kind of relation between them, correlation gives a statistical measure of this relation.

Covariance is dependent on the scale of the data. For example, in a dataset, two variables show a low covariance of 10 at a scale of 1. If the scale is multiplied by 10, the covariance becomes 100. Therefore, even though there is no high covariance between the two variables, increasing the scale increases the covariance.

Correlation is not dependent on the scale of the data. For example, if there is a dataset in which the correlation coefficient of two variables is 0.6 when the scale of the data is 1. If the scale is multiplied by 10, the correlation coefficient remains 0.6. Therefore, the correlation coefficient is free of changes made to the scale of the data.

Covariance can vary from values between – and .

The correlation coefficient can take up values between -1 and 1.

Conclusion

Covariance and correlation are important measures to verify the two variables’ relationship. Covariance is the measure of the related variability of two random variables. It gives an idea of the kind of relationship that two variables share. The higher the covariance, the more the dependency between two variables.

With the correlation coefficient, one can predict to what degree a random variable undergoes a change when it is correlated to another random variable. The correlation coefficient, much like the covariance of two random variables, bears a positive or a negative sign based on the linear relationship that two random variables share between each other.

faq

Frequently asked questions

Get answers to the most common queries related to the IIT JEE Examination Preparation.

What is given by covariance?

Ans : The covariance gives the direction in which two covariate variables share their relationship....Read full

What is given by the correlation coefficient?

Ans : The correlation coefficient gives the exact degree of the relative variability of two covaria...Read full

Is covariance dependent on the scale?

Ans : The covariance between two variables is directly dependent on the scale of the variables....Read full

What is the range of values of the correlation coefficient?

Ans : The correlation coefficient varies between the values of –1 and +1.