What is the intuition behind R squared of linear regression? from the perspective of vector projection

148 Views Asked by At

enter image description here

I copied this photo from Anupam Kundu's answer on Quora.

As explained on Quora, linear regression can be imagined as a projection from the dependent variable on the hypo plane defined by the columns of $X$ matrix.

Now, if go one step further, what is the geometric meaning of $R^{2}$ in such projection? Can anyone share some ideas?

1

There are 1 best solutions below

0
On

I don't think you can see the $R^2$ in this illustration since it is a a so-called "dimensionless" scalar $$ R^2 = \frac{Y^T(H-\frac{1}{n}J)Y}{Y^T(1-J\frac{1}{n})Y} = 1 - \frac{Y^T(I-H)Y} {Y^T(1-J\frac{1}{n})Y}, $$ where $H = X(X^TX)^{-1}X^T$ is the projection matrix onto the column space of $X$, and $J = \mathrm{1}\mathrm{1}^T$.