Relationship between R2 and correlation coefficient [duplicate]

in simple linear regression

R-squared is equal to the squared correlation coefficient between the actual y and the predicted y (i.e. 𝑦 hat )

how to prove this relationship?

Thanks!

The usual way of interpreting the coefficient of determination R^{2} is to see it as the percentage of the variation of the dependent variable y (Var(y)) can be explained by our model.

For the proof we have to know the following (taken from OLS theory and general statistics):

• +1. Welcome to our site, Dinesh. You would likely find it easier to write mathematical expressions (and we would find them easier to read) using the built-in $\TeX$ markup: just enclose them between dollar signs \\$. Further help is available.. – whuber Dec 21 '15 at 13:07
• @Dinesh, can you please explain why Cov(y_hat, e)=0 ? – bespectacled Jul 10 '18 at 1:17
• if I have understood this correctly then e is the error or noise term added to y_hat and since e is a constant, the mean e_mean = e and putting this into covariance formula e-e_mean part will be 0 hence Cov(y_hat,e) = 0 – aman5319 May 12 '20 at 18:19
• Rather than e being a constant, I think the idea is that we assume that the errors are not correlated with the prediction, hence Cov(y_hat, e) = 0. Please correct me if i'm wrong. – Fortunato Mar 12 at 23:09