Google News
logo
Data Science - Interview Questions
What are the differences between correlation and covariance?
Although these two terms are used for establishing a relationship and dependency between any two random variables, the following are the differences between them :
 
Correlation : This technique is used to measure and estimate the quantitative relationship between two variables and is measured in terms of how strong are the variables related.

Covariance : It represents the extent to which the variables change together in a cycle. This explains the systematic relationship between pair of variables where changes in one affect changes in another variable.

Mathematically, consider 2 random variables, X and Y where the means are represented as  and  respectively and standard deviations are represented by  and  respectively and E represents the expected value operator, then:
 
covarianceXY = E[(X-),(Y-)]
correlationXY = E[(X-),(Y-)]/()

correlation(X,Y) = covariance(X,Y)/(covariance(X) covariance(Y))

Based on the above formula, we can deduce that the correlation is dimensionless whereas covariance is represented in units that are obtained from the multiplication of units of two variables.
Advertisement