# Intuitive explanation for when Pearson correlation coefficient equals 1

Whenever I teach a complicated formula, I always demonstrate to the class that it works intuitively in extreme cases. For example, when all the data values are equal, the standard deviation is 0. Not surprisingly, some formulas for the same quantity do a better job than others. Again, for standard deviation, the definition $s = \sqrt{\frac{1}{n-1} \sum (x_i - \overline{x})^2}$ makes the $s=0$ intuitive explanation more obvious than other formulas such as $s = \sqrt{\frac{n\sum{x_i^2 - (\sum{x_i})^2}}{n(n-1)}}$.

I can't seem to do this for when the Pearson product-moment correlation coefficient equals 1.

While looking for an appropriate answer online, I came across this truly amazing(!) intuitive explanation for the covariance. I think$^?$ this can answers my question if we use the formula $\rho_{X,Y}={\mathrm{cov}(X,Y) \over \sigma_X \sigma_Y}$. But covariance is not part of our lesson.

The following are the only formulas we can use in class.    $^?$ I have not come up with an explanation using the covariance either, so an explanation using it will also be much appreciated.

• You need explanation for correlation of equally valued data? – Hemant Rupani Apr 26 '15 at 20:48
• Not equally valued, but data that has correlation 1. For example, (1,3), (2,10), (6,100). – Mark Lao May 20 '15 at 16:34
• You ought to be defining correlation as the average product of the standardized variables. That reduces your formulas to (1) standardizing a variable $x \to (x-\mu)/\sigma$ and (2) the definition of the correlation between standardized $x$ and $y$ as the mean of $xy$. This approach is more fundamental, simpler, much easier to appreciate and remember than any of the formulas quoted in the question, and leads to easy solutions to all kinds of questions about correlation. For instance, in three of the four formulas it is not apparent that correlation is location-invariant, but now it's obvious. – whuber May 20 '15 at 16:50
• Re your comment: Are you sure this question is about Pearson correlation coefficients? The correlation of the example you give is $0.992$, not $1$. It has a Spearman (i.e., rank) correlation of $1$. – whuber May 20 '15 at 17:46

## 1 Answer

Note that perfect correlation means the deviations of the $y_i$'s about their mean are proportional to the corresponding deviations of the $x_i$'s about their mean; that is, $y_i - \bar y = k(x_i - \bar x)$ for all $i$ and some constant $k$. So using your first expression

\begin{align} \rho &= \frac{\sum (x_i - \bar x)(y_i - \bar y)} {\sqrt{\sum (x_i - \bar x)^2}{\sqrt{\sum (y_i - \bar y)^2}}}\\ &= \frac{\sum k(x_i - \bar x)(x_i - \bar x)} {\sqrt{\sum (x_i - \bar x)^2} \sqrt{\sum k^2 (x_i - \bar x)^2}} \\ &= \frac{k \sum (x_i - \bar x)^2} {\pm k \sqrt{\sum (x_i - \bar x)^2} \sqrt{\sum (x_i - \bar x)^2}} \\ &= \pm 1 \end{align}