Covariance: Definition and Interpretation
You'll learn what covariance measures and how it quantifies the relationship between two random variables.
What Is Covariance?
Covariance measures how two random variables change together. If one variable tends to be above its mean when the other is above its mean, they have positive covariance. If one tends to be above its mean when the other is below its mean, they have negative covariance.
The Definition
For random variables X and Y, the covariance is defined as:
Cov(X, Y) = E[(X - E[X])(Y - E[Y])]
This can be read as: "the expected value of the product of the deviations from their respective means."
What It Measures
Think of covariance like a dance partnership. When both partners move in sync (both high together, both low together), the covariance is positive. When they move in opposition (one high when the other is low), it's negative. When their movements are unrelated, it's near zero.
Three Scenarios:
- Positive covariance: X and Y tend to increase together
- Negative covariance: When X increases, Y tends to decrease (and vice versa)
- Zero covariance: No linear relationship between X and Y
Computational Formula
Using properties of expectation (linearity), we can derive an alternative formula:
Cov(X, Y) = E[XY] - E[X]E[Y]
This is often easier to compute in practice.
Key Takeaway: Covariance quantifies the joint variability of two random variables, measuring whether they tend to move together (positive), in opposition (negative), or independently (zero).