In statistics, covariance is a measure of the degree to which two random variables change together. It indicates the direction of the linear relationship between the variables. Specifically, covariance can be defined as follows:
-
Positive Covariance: If the covariance is positive, it means that as one variable increases, the other variable tends to also increase. Conversely, if one variable decreases, the other variable tends to decrease as well.
-
Negative Covariance: If the covariance is negative, it indicates that as one variable increases, the other variable tends to decrease, and vice versa.
-
Zero Covariance: A covariance close to zero suggests that there is no linear relationship between the two variables.
The formula for calculating the covariance between two random variables and is given by:
where:
- and are the individual sample points,
- and are the means of and respectively,
- is the number of data points.
Covariance is used in:
- in the calculation of correlation coefficients
- and in multivariate statistics, such as in Gaussian Mixture Models where it helps describe the shape and orientation of the data distribution.