Proof that correlation coefficient squared equals the coefficient of determination

848 Views Asked by At

Hi I as the title says I'm looking at the proof that $r^2$ = $R^2$ in the case of simple linear regression, but I don't understand one part. There are different versions of the proof, but in most of them they do a step I don't understand. You may look at slide 9 here for instance. Particularly I don't understand how $(Y-\hat{Y})(\hat{Y}-\bar{Y}) = 0$. Could anyone please explain to me why that is?

Thank you