Definition

The correlation coefficient between two random variables, \(X\) and \(Y\), is

\[ \Corr(X,Y) \;=\; \frac{\Covar(X,Y)}{\sqrt{\Var(X)\Var(Y)}} \]

This is often denoted by the Greek letter \(\rho\).

The correlation coefficient is not affected by linear scaling:

Correlation of linear functions of X and Y

For any random variables, \(X\) and \(Y\), and constants \(a\), \(b\), \(c\) and \(d\),

\[ \Corr(a + bX, c+dY) \;=\; \begin{cases} \Corr(X, Y) & \quad\text{if }bd > 0 \\[0.3em] -\Corr(X, Y) & \quad\text{if }bd > 0 \end{cases} \]

(Proved in full version)