Pages

Showing posts with label covariance. Show all posts
Showing posts with label covariance. Show all posts

Tuesday, November 29, 2011

Difference between Covariance and Correlation

Both measure the same thing, nearly the same to be more accurate. Covariance measures how the two variables are related. A positive value indicates a positive linear relationship. In R software, it can be calculated by cov(variable x, variable y).
Correlation coefficient is covariance divided by the product of the standard deviations of the two variables. It is a normalized measurement of the relationship between two variables.If it is near to one means that there is a positive linear relationship. If '-1' means that negative linear relationship. If zero, it means no linear relationship. In R software, it can be calculated simply by cor(variable x, variable y)