So recall that our residuals were defined as e equal to y minus y hat which we could write as I minus the hat matrix times y. And again, now, we're in the context where we're going to assume y is normally distributed with mean x beta in variance sigma squared times I. So the residuals then are singularly normal, distributed because this is not a full rank transformation. So the residuals are singularly normal distributed mean. Expected as the residuals is I minus H of x, times X beta which is zero. Because for the reasons that we've discussed at length. The variance of the residuals is then I minus H of x sigma squared I minus H of x and then which is just I minus H of x sigma squared since the matrix I minus H of x is [INAUDIBLE]. So, the residuals have this issue or not issue, but they have this property that they inherit the units of y. So, of course, that's a good thing. They're a linear transformation y. But that often means that if we do things like a plot of our residuals, which we often plot. Say for example, our residuals versus our fit of values, that's a terrible Y. The scale, the vertical scale, when we look at that, isn't comparable across experiments. And so, if you wanted to standardize your residuals, that's some of the things that we're going to talk about. In this lecture, so what you could do is simply take the diagonal of the variance of E, that matrix to the one half power. So, what I mean by that, not writing this out perfectly, but the square root of the diagonal of the variance at. Let me write it out here. To the minus one-half power. So I just mean the diagonal matrix that has the rate, the inverse of standard deviations. If we were to multiply that times our e, then we would have now, random variables that have unit variance. So of course, we'd have to estimate to sigma squared. So that is a nice way to do things. And of course, it satisfies our criteria for creating a unit free quantity. However, these quantities. These so called standardized residuals have the problem that you can't easily establish boundaries for calling standardized residuals outliers. Just because the distribution of this quantity isn't a terribly easy distribution to work with. It's not a t distribution because the numerator and the denominator are not independent in the same way that our typical statistic, t statistics that we derive for, say, the coefficients of ours So we're going to talk a little bit more about how to get more T like residual statistics here when we talk more about different ways in which we can standardize our residuals. But this is by no means a terrible thing to do to take our residual, say e i, and then divide it by the, let's say square root 1 minus h i i where HII and then times S. Where hii is the eyes diagonal element of the matrix that's often quite useful thing to do. Another little comment that we might need later on. Is because the variance of e is equal to i minus h of x times sigma square. We know that that has to be greater or equal to zero. So, we know that any element, I should say any element of this, the diagonal of this matrix has to be greater than or equal to 0. So 1- hii, this quantity in the denominator of our statistic over there, has to be greater or equal to 0 so that hii has to be less than or equal to 1. So our diagonals of our hat matrix always have to be bounded from above by 1. This is a fact that we're going to use later on when we use our hat diagonals as a diagnostic measure. Okay, so let's just go through a coding exercise where we create standardized residuals and look at them.