I can't quite grasp the meaning of the denominator in the correlation coefficient.
$$\frac{\sum(X - \bar X)(Y-\bar Y)}{\sqrt {\sum (X-\bar X)^2\sum(Y-\bar Y)^2}}$$
What exactly am I dividing with, and why?
I understood dividing with the standard deviation in the Z distribution, that got me the difference from the mean in terms of standard deviations. But what does this give?
The covariance measured in....what, the standard deviation of X times the standard deviation of Y?
That would explain where the n's in the denominator (of the covariance as well as that of the standard deviations) have gone, but what does that mean?
Do you know the scalar/inner product of vectors on $\mathbb{R^3}$ or $\mathbb{R^n}$?
$\hat{u} \cdot \hat{v} = \|\hat{u}\|\|\hat{v}\|\cos\theta\ $ or
$$\cos\theta = \frac{\hat{u} \cdot \hat{v}}{\|\hat{u}\|\|\hat{v}\|} = \frac{\hat{u}}{\|\hat{u}\|}\cdot\frac{\hat{v}}{\|\hat{v}\|} = \frac{\sum_i u_i v_i}{\sqrt{\sum_i u_i^2 }\sqrt{\sum_i v_i^2}}$$
Correlation then is analogous to finding the angle between two vectors. The denominator is normalizing the vectors so that we are taking the scalar/inner product between two vectors of unit length.