How To Studentize
For this simple model, the design matrix is
and the hat matrix H is the matrix of the orthogonal projection onto the column space of the design matrix:
The "leverage" hii is the ith diagonal entry in the hat matrix. The variance of the ith residual is
The corresponding studentized residual is then
where is an appropriate estimate of σ (see below).
Read more about this topic: Studentized Residual