I'm trying to understand what it means exactly for $p$ to be equal to $1$ or $-1$. I know that the following is true:
$$-1\le \frac{cov(X,Y)}{SD[X]·SD[Y]}\le 1$$
Where the central term is the Pearson correlation coefficient and $SD$ stands for standard deviation.
Now, let's say $corr(X,Y)=1$. First, what does that imply graphically? Does it mean that, if we were to plot $X$ and $Y$ together on a graph, all pairs $(x,y)$ would be sitting on a straight line with some (any) slope greater than zero? Is this interpretation correct? If so, is there any way to intuitively understand why $cov(X,Y)=SD[X]·SD[Y]$ implies this perfect alignment of all $(x,y)$? I know that a positive $cov(X,Y)$ means that, on average, when $X$ is above its expectation so is $Y$, if it's of any use. Any clarification will be appreciated. Thanks in advance.
It is true that $|corr(X, Y)| = 1$ if and only if all the points $(x_i, y_i)$ fall on a straight line. (I'm ignoring the case where either all the $x_i$ are equal or all the $y_i$ are equal, because in those cases the correlation coefficient isn't defined.) This can be proven from the definition of the correlation coefficient by doing a bunch of algebra, although I can't imagine this is particularly enlightening.