The covariance between 2 variables is as as follows
The variance of a variable is simple the covariance with itself. Variance measures the variation of a single random variable, whereas covariance is a measure of how much two random variables vary together
A simple analysis
It is important to note that if E(A) and E(B) are similar in value, it does not mean that they are correlated, it just means that their means are similar, they are only correlated if their values track one another, i.e. if E(AB) is positive
The following matrix shows the preference for apples or oranges in a poll, each row represents a person's preference for apples and oranges.
Apples | Oranges |
---|---|
1 | 1 |
3 | 0 |
-1 | -1 |
the covariance matrix of a 2 variable system is a 2x2 matrix
Apples | Oranges | |
---|---|---|
Apples | cov(A,A) | cov(A,B) |
Oranges | cov(B,A) | cov(B,B) |
in our example,
Apples | Oranges | |
---|---|---|
Apples | 2.67 | 0.67 |
Oranges | 0.67 | 0.67 |
observations