So covariance changes with the unit and correlation does not. Independent variables have zero covariance, but zero covariance does not mean independent: it only rules out a straight-line relationship. In general Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y).
For a random vector x with mean μ, the covariance matrixΣ=E[(x−μ)(x−μ)T] holds every variance on its diagonal and every covariance off it. It is symmetric, and its eigenvectors are the directions PCA keeps (see Dimensionality reduction).
Each dot is one sample of (x, y); the purple ring is the mean. Covariance grows with both the tilt and the spread of y, so it depends on units. The correlation ρ = Cov / (σ_x σ_y) only measures the tilt, from −1 to 1.
Recall
When is E[X+Y]=E[X]+E[Y]?
Recall
Give the shortcut formula for Var(X).
Recall
Does Cov(X,Y)=0 mean X and Y are independent?
Exercise
Find E[X] and Var(X) for a fair six-sided die.
Exercise
Var(X)=1,Var(Y)=2 and Cov(X,Y)=0.5. Find Var(2X−3Y+1).
Exercise
X is −1,0 or 1 with equal probability, and Y=X2. Which is true?