# How to show that $R^2=\rho_{xy}^2$?

Having $$||y-\bar y||^2=||\hat y-\bar y||^2+ ||\epsilon||^2$$

$$\underbrace{\sum\limits_{i=1}^{n}(y_i-\bar y)^2}_{TSS}=\underbrace{\sum\limits_{i=1}^{n}(\hat y_i-\bar y)^2}_{ESS} +\underbrace{\sum\limits_{i=1}^{n}(\hat\epsilon_i^2)}_{RSS}$$

I have to show that $R^2=\frac{ESS}{TSS}=\frac{(\hat y-\bar y)^2}{(y_-\bar y)^2}=1-\frac{||\hat \epsilon||^2}{(\hat y-\bar y)^2}=\underbrace{1-\frac{RSS}{TSS}=\rho_{xy}^2}_{The \ step \ I \ don't \ get}$

I don't even know where to start... Any hint appreciate.

What happens when you write $TSS-ESS=RSS$? What algebra can you use from this re-writing to show $$R^2=1-\frac{||\hat{\epsilon}||^2}{(\hat{y}-y)^2}?$$
• okay, should I recognize a binomial expansion from $TSS-ESS=RSS$? such as $\sum\limits_{i=1}^{n}(y_i-\bar y)^2-\sum\limits_{i=1}^{n}(\hat y_i-\bar y)^2 =(\sum\limits_{i=1}^{n}(y_i-\bar y)-\sum\limits_{i=1}^{n}(\hat y_i-\bar y))(\sum\limits_{i=1}^{n}(y_i-\bar y)+\sum\limits_{i=1}^{n}(\hat y_i-\bar y))$? Commented Oct 19, 2015 at 17:36
• Ja, I do $\frac{TSS-ESS}{TSS}=\frac{RSS}{TSS}$, I get $1-\frac{ESS}{TSS}=\frac{RSS}{TSS}$ ... Commented Oct 19, 2015 at 17:47
• I'm missing the addition step... The definition I had for $\rho_{y,\epsilon}$ was $$\frac{\sum (y_i -\bar y)(\epsilon_i-\bar\epsilon)}{n * var(x_i)var(\epsilon_i)}$$ Commented Oct 19, 2015 at 17:59
• I have a better understanding of where you are stuck now. When I first composed my answer, I thought you were stuck earlier on in the equation starting with $R^2$. I've got to run now, but if I have time I'll work out the steps. In the meantime, I'm pretty sure this question is answered elsewhere on this site. Perhaps you could try the archives.