Covariance
Learned this in Statistics. when the random variables are independent, the covariance is 0, since (see full formula below).
We use the covariance to get a measure of the Correlation (i.e. Covariance is used to calculate the Correlation Coefficient).
Covariance
Covariance describes how much two variables vary together. Covariance is short for correlated variances.
The covariance of two random variables is This can also be written as
- This is the”difference between the average of the products and the product of the averages”
Warning
NOTE: The covariance can be negative.
A Simple example is suppose:
- X = # hours spent playing video games
- Y = grade on STAT206 final
If , you expect , so
The covariance of a random variable with itself is just the variance of that random variable.
Variance vs covariance:
Correlation vs. covariance?
The correlation is computed using the covariance. Correlation allows prediction. If you are significantly taller than me I can predict that you also weigh more than me.
Properties of Covariance
- , where is a constant
- and are independent
- However, does NOT imply and are independent
Other
Varying the covariance while holding the variance constant:
These are called error/confidence ellipses. They’re very useful to visualize the correlation
To build intuition, think of this image