In one part of our notes (and some books), the following expression is used :
For the generalized linear model $y=X\beta + \epsilon$, it is : $$\text{cov}(y_i,\hat{y_i})=\sigma^2h_{ii}$$
Question : How does one proceed with proving that formally ?
In one part of our notes (and some books), the following expression is used :
For the generalized linear model $y=X\beta + \epsilon$, it is : $$\text{cov}(y_i,\hat{y_i})=\sigma^2h_{ii}$$
Question : How does one proceed with proving that formally ?
Use $y-E(y)=\epsilon$ and $\hat y = Hy$, so $\hat y - E(\hat y)=Hy - E(Hy)=H(y-E(y))=H\epsilon$. Then $$ \operatorname{Cov}(y,\hat y) = E\left[(y-E(y))(\hat y - E(\hat y))^T\right] =E(\epsilon\epsilon^TH)=\sigma^2H $$ The $i,i$ diagonal element of the LHS is $\operatorname{Cov}(y_i, \hat y_i)$, while the $i,i$ diagonal element of the RHS is $\sigma^2 h_{i,i}$.