2
$\begingroup$

I need to show that $\bar h= \sum{h_{ii}/n} = \operatorname{Tr}[H]/n = (p+1)/n$

Using the fact that $\operatorname{Tr}[AB]=\operatorname{Tr}[BA]$ and $H=X(X^TX)^{-1}X^T$.

But I have no idea how to calculate $\bar h$, I'm betting the first equality works out because $H$ is a symmetric idempotent matrix. I also have no clue what $\operatorname{Tr}[H]$ means, I have never seen this notation before an cannot find it in my notes.

1 Answers 1

3

The trace of a matrix is the sum of its diagonal entries. The function $A\mapsto \text{Tr}(A)$ has the property that $\text{Tr}(AB)=\text{Tr}(BA)$ for any two matrices of compatible size.

So, if $X$ is of size $n\times(p+1)$, then $X^TX$ is a $(p+1)\times(p+1)$ matrix and $ \text{Tr}(H)=\text{Tr}(X(X^TX)^{-1}X^T)=\text{Tr}((X^TX)^{-1}X^TX)=\text{Tr}(I_{p+1})=p+1. $

So $\sum_{H_{jj}}/n=\text{Tr}(H)/n=(p+1)/n$.

  • 0
    It's not explicit in the question, but Carly's comment suggests that some usual conventions are followed.2012-11-25