- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Covariance and Correlation
Covariance is the mutual relationship between two variables regarding their variance. In statistics, the covariance formula is generally used to assess the relationship between the variables. It is essentially a measure of the variance according to a relationship between two variables. Covariance is computed in units and is measured by multiplying the units of the two variables.
Note − The covariance formula is like the correlation formula. It deals with the measurement of data points from the average value in a dataset.
Covariance can take both positive or negative values. The difference between the two types of covariance are −
Positive covariance − It indicates that two variables will move in the same direction.
Negative covariance − It means that two variables will move in different (inverse) directions.
In finance, the concept of covariance is mainly used in portfolio theory. One of its most popular and common applications in portfolio theory is the "diversification method", where the covariance between assets in a portfolio is measured. By choosing the assets that do not show a high positive covariance with each other, the unsystematic risky investments can be partially eliminated.
What is Covariance Formula?
In the covariance formula, two random variables X and Y can be denoted as Cov(X, Y). The relationship between the two is represented as −
$$\mathrm{Cov(X, Y) =\sum\frac{𝐸((𝑋 − \mu) 𝐸(𝑌 −
u))}{𝑛 − 1}}$$
Where,
X is a random variable
E(X) = µ is the expected value (the mean) of the random variable X
E(Y) = ν is the expected value (the mean) of the random variable Y
n = the number of items in the data set.
Covariance vs. Correlation
Covariance measures the variation of two random variables from the given expected values. Covariance only lets us gauge the direction of the relationship (whether the variables tend to move in tandem or show an inverse relationship). However, it does not indicate any value of the relationship, or whether the two variables have any relativity or dependence.
On the other hand, correlation measures the power or relationship between two variables. Correlation can be termed as the scaled measure of covariance. It does not have any dimension. In other words, the correlation coefficient is an absolute value, and it is not measured in any units.
The relationship between the two concepts can be expressed using the following formula −
$$\mathrm{\rho(𝑋, 𝑌) =\frac{Cov(𝑋, 𝑌)}{\sigma_{𝑋 }\:\sigma_{𝑌}}}$$
Where −
ρ(𝑋, 𝑌) − the correlation between the variables X and Y
Cov(𝑋, 𝑌) − the covariance between the variables X and Y
σ𝑋 − the standard deviation of the X-variable
σ𝑌 − the standard deviation of the Y-variable
- Related Articles
- What is the relationship between correlation and covariance?
- How is Covariance and Correlation used in Portfolio Theory?
- Signals and Systems – Relation between Convolution and Correlation
- Covariance and Contravariance in C#
- Write a program in Python to compute grouped data covariance and calculate grouped data covariance between two columns in a given dataframe
- How to find the covariance between two vectors in R?
- Correlation and Regression in Python
- Correlation between two numeric columns in a Pandas DataFrame
- Program to find covariance in C++
- Cross Correlation Function and its Properties
- Difference Between & and &&
- How to get the correlation between two columns in Pandas?
- What is Correlation in Signals and Systems?
- How does the portfolio risk depend on the correlation between assets?
- Difference between Voltage Drop and Potential Difference
