Cosines and correlation
correlationcosinelaw-of-cosinesstatisticsgeometry
Abstraction: Correlation as geometric cosine angle between random variable vectors
Key points:
- For independent X and Y: Var(X+Y) = Var(X) + Var(Y), analogous to Pythagorean theorem c^2 = a^2 + b^2
- For correlated X and Y: Var(X+Y) = Var(X) + Var(Y) + 2*Cov(X,Y), analogous to law of cosines with cos(theta) = -rho
- Restated with supplementary angle phi: cos(phi) = rho = Corr(X,Y); phi near 0 means high positive correlation, near pi means high negative
- In an inner product space where <X,Y> = E(XY), correlation is literally the cosine of the angle between X and Y as vectors
- Standard deviations of independent variables add like sides of a right triangle; correlated variables add like law of cosines
Connections: Correlation · Cosine Similarity · Inner Product · Probability Theory
Source: http://www.johndcook.com/blog/2010/06/17/covariance-and-law-of-cosines/