How do I prove the diagonal element of the hat matrix, $h_{ii}$ (leverage)

140 Views Asked by At

Consider the simple linear regression model $y_i = \beta_0 + \beta_1x_1 + \text{error}, i = 1,2,\ldots,n$

$h_{ij}$ denotes the $[i,j]$ element of the hat matrix.

How can I show that $h_{ii} = 1/n + (x_i - \bar{x})^2/S_{xx}$

$h_{ii}$ is the leverage but what kind of observation of $x_i$ would have the lowest/highest leverage?