The Covariance of Two Random Variables
Introduces the covariance of two random variables. Covers the definition , the shortcut formula , computation for both discrete and continuous random variables, and the relationship between covariance and independence.
Tutorial
Definition of Covariance
The covariance of two random variables and measures how they vary together. It is defined as
where and denote the means of and
Interpretation: When tends to be above its mean exactly when is above its mean, the product is usually positive and the covariance is positive. When one variable tends to be above its mean while the other is below, the product is usually negative and the covariance is negative. A covariance of zero means there is no such linear tendency.
For discrete random variables with joint pmf the covariance becomes a double sum:
For example, suppose and have joint pmf
The marginals give and Hence