In these lecture notes:

enter image description here

However I am unable to work this out myself. When I multiply things out I get $\frac{1}{nS_{xx}}(\sum_{j=1}^n x_j^2 -2n\bar{x}x_i+nx_i^2)$. For things to be true, the terms inside the parenthesis can be rearranged to be $S_{xx}+n(x_i-\bar{x})^2$. I tried rearranging the terms so $\sum_{j=1}^n x_j^2 -n\bar{x}x_i+nx_i^2-n\bar{x}x_i$, but I can't seem to get to the answer. There must be some form of $S_{xx}$ that I am not aware of that is buried in their somewhere. Any help would be appreciated.

  • $\begingroup$ Have you used the relation $S_{xx}= x_i^2-n\bar{x}^{2}$? $\endgroup$ – felasfa Oct 9 '16 at 22:31
  • $\begingroup$ If you use that, you get the resulting equation. Let me know otherwise $\endgroup$ – felasfa Oct 9 '16 at 22:35
  • $\begingroup$ I assume you mean $S_{xx}=\sum x_i^2 - n \bar{x}^2$. There is no $\bar{x}^2$ anywhere, so I am not sure where I would use that formula. Thanks! $\endgroup$ – Carl Ganz Oct 9 '16 at 22:43
  • $\begingroup$ yes, you are right. I forgot the summation. $\endgroup$ – felasfa Oct 9 '16 at 23:16

After multiplying things out, one gets \begin{align} h_{ii}=\frac{1}{nS_{xx}}\left(\sum_{j=1}^{n} x_{j}^{2}-2n\bar{x}x_{i}+nx_{i}^{2}\right)&=\frac{1}{nS_{xx}}\left(\sum_{j=1}^{n} x_{j}^{2}-n\bar{x}^{2}+[n\bar{x}^{2}-2n\bar{x}x_{i}+nx_{i}^{2}]\right)\\ &=\frac{1}{nS_{xx}}\left(\sum_{j=1}^{n} x_{j}^{2}-n\bar{x}^{2}\right)+\frac{1}{nS_{xx}}[n\bar{x}^{2}-2n\bar{x}x_{i}+nx_{i}^{2}]\\ & = \frac{1}{nS_{xx}}\cdot S_{xx} + \frac{1}{nS_{xx}}n[x_{i}-\bar{x}]^{2}=\frac{1}{n}+\frac{1}{S_{xx}}[x_i-x]^{2} \end{align}


\begin{align} h_{ii}&=\frac{1}{nS_{xx}}(\sum_{j=1}^n x_j^2 -2n\bar{x}x_i+nx_i^2+n\bar{x}^2_n-n\bar{x}^2_n)\\ &=\frac{1}{nS_{xx}}\left((\sum_{j=1}^n x_j^2 -n\bar{x}^2_n)+n(-2\bar{x}x_i+x_i^2+\bar{x}^2_n)\right)\\ &=\frac{1}{n}+\frac{(x_i-\bar{x}_n)^2}{S_{xx}} \end{align}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.