How that R squared is squared correlation coefficient for $X$ given in the matrix form?

251 Views Asked by At

How to show that in the linear regrssion with intercept, the coefficient of determination $R^2$ is equal to the square of the sample coefficient of correlation between the variables $X$ and $Y$ given in the matrix form. I have an idea how to show this fact using the deffiniton of R squared $R^2 = \frac{ESS}{RSS}$, and formulas for ESS and RSS. However, my idea works only for one $X$ not a matrix of x's... Can you give an idea?

1

There are 1 best solutions below

0
On BEST ANSWER

Note, that $R^2$ is $\frac{ESS}{TSS}$ (not $\frac{ESS}{RSS}$).

But I will suggest another approach: $$R^2 = \frac{Var(\hat{y})}{Var(y)} = \frac{Var(\hat{a} + \hat{b}X)}{Var(y)} = \frac{Var(\hat{b}X)}{Var(y)} = $$ $$ = \hat{b}^2 \frac{Var(X)}{Var(y)} = \Bigg(\frac{Cov(X, y)}{Var(X)}\Bigg)^2 \cdot \frac{Var(X)}{Var(y)} = $$ $$ = \Bigg(\frac{Cov(X, y)}{\sqrt{Var(X)Var(y)}}\Bigg)^2 = Corr^2(X,y)$$