# Why squaring $R$ gives explained variance?

This may be a basic question, but I was wondering why an $R$ value in a regression model can simply be squared to give a figure of explained variance?

I understand that $R$ coefficient can give the strength of a relationship, but I don't understand how simply squaring this value gives a measure of explained variance.

Any easy explanation of this?

Thanks very much for helping with this!

• Are you looking for something intuitive or more mathematical? Have you looked through some of the other questions on $R^2$ and correlation coefficients on this site? – cardinal May 9 '12 at 23:46
• Two related questions are here and here, for example. If you play around with the equations there, you'll be able to derive the mathematical equivalence. But, neither are likely to be particularly helpful from an intuition standpoint. – cardinal May 9 '12 at 23:47
• I see this the opposite way. It is R square that is defined as 1 -residual variance/total variance and then R is postive square root of that. It just happens that when we have simple linear regression R square reduces to the square of the correlation coefficient. – Michael R. Chernick May 10 '12 at 0:37
• @Michael, you undoubtedly intended to say the appropriately signed square root rather than the positive one. – cardinal May 10 '12 at 10:28
• @cardinal, I have the same impression - $R$ (or $r$) refers to the sample correlation coefficient and would be surprised to see a widely used reference that uses that to refer to the absolute value of the sample correlation – Macro May 10 '12 at 12:39

Hand-wavingly, the correlation $R$ can be thought of as a measure of the angle between two vectors, the dependent vector $Y$ and the independent vector $X$. If the angle between the vectors is $\theta$, the correlation $R$ is $\cos(\theta)$. The part of $Y$ that is explained by $X$ is of length $||Y||\cos(\theta)$ and is parallel to $X$ (or the projection of $Y$ on $X$). The part that is not explained is of length $||Y||\sin(\theta)$ and is orthogonal to $X$. In terms of variances, we have $$\sigma_Y^2 = \sigma_Y^2\cos^2(\theta) + \sigma_Y^2\sin^2(\theta)$$ where the first term on the right is the explained variance and the second the unexplained variance. The fraction that is explained is thus $R^2$, not $R$.
• (+1) I started to write up a direct derivation that ${\rm cor}(y,\hat{y})^2$ was equal to the usual definition of $R^2$ as a ratio of variances but, in doing so, I noticed it provided little/no intuition (and so it probably wouldn't be helpful to the original poster) - I think this does! – Macro May 10 '12 at 12:17