3

I am trying to show that the matrix $\mathbf{(H-\frac{1}{n}J_n)}$ is idempotent where $\mathbf{H}$ is the Hat-matrix (Projection matrix) of linear regression and $J_n$ is the $n\times n$ matrix with $1$ in all its inputs. Taking :

$$\mathbf{(H-\frac{1}{n}J_n)(H-\frac{1}{n}J_n)= HH - H\frac{1}{n}J_n - \frac{1}{n}J_nH + \frac{1}{n}J_n\frac{1}{n}J_n}$$

Now, we know that $\mathbf{H}$ and $\mathbf{\frac{1}{n}J_n}$ are idempontent, thus :

$$\mathbf{(H-\frac{1}{n}J_n)(H-\frac{1}{n}J_n)=H-H\frac{1}{n}J_n - \frac{1}{n}J_nH +\frac{1}{n}J_n}$$

How would I continue now in order to show that the given matrix is idempontent ?

Rebellos
  • 21,666
  • The "hat matrix" should be redefined, It is not a usual name... – Jean Marie Nov 22 '18 at 19:08
  • @JeanMarie It is the projection matrix. https://en.wikipedia.org/wiki/Projection_matrix – Rebellos Nov 22 '18 at 19:12
  • 1
    @JeanMarie It's $X(X^TX)^{-1}X^T$, where $X$ is the matrix of regressors. It's called the hat matrix because when you multiply $y$ on the left by it, you get $\hat y$, that is, it "puts a hat on $y$", figuratively. – Jean-Claude Arbaut Nov 22 '18 at 19:15
  • 1
    @Jean-Claude Arbaut Thank you for this precise explanation. Thank you as well to the OP. – Jean Marie Nov 22 '18 at 19:19
  • @StubbornAtom The previous part of the exercise wants to show that $I - \frac{1}{n}J_n$ is idempotent. But this is indeed the hat matrix $H$, so I can't work anything around./ – Rebellos Nov 22 '18 at 19:37
  • Numerically on an example, the statement is wrong. $H$, however, is of course idempotent, being a projection matrix. – Jean-Claude Arbaut Nov 22 '18 at 19:57
  • @Jean-ClaudeArbaut True, $H$ is idempotent and was also used in my elaboration. If the statement is wrong then the exercise is wrong, which is weird in fact. – Rebellos Nov 22 '18 at 20:02
  • Ok, with the additional requirement that $X$ is square, it works. But then, assuming $X$ has full rank, $H$ is obviously the identity matrix, as $\hat y=y$ (the regression is "perfect", the residual vector is zero), because $\mathrm{span}, X=\Bbb R^n$. That's the same conclusion as @StubbornAtom above. – Jean-Claude Arbaut Nov 22 '18 at 20:25
  • Answered at https://math.stackexchange.com/a/1427733/321264. – StubbornAtom Apr 19 '22 at 20:36

0 Answers0