Okay, In our previous video, we went through a series of examples in order to give you a sense of the range of residual plots. So you might expect to have even within to even what the data told, sorry, even when the data perfectly match the assumptions of normality and equal variance. My sense is it's not always useful to see good examples. So to only see cases where the data do meet the assumptions. So in this video, we're going to do the opposite. We're going to go through the same simulation procedure, but we're going to look at cases where the residuals would cause us to worry. We're going to use a same simulation approach as we had in the previous video. The only difference, Well, two things point out on this slide. One is we're not going to be using the AOV function. We're going to use the lm function. And the only reason for that is to be consistent with all the other analyses that we're going to go after this. Because we're going to use the lm function a lot. And so we could use AOV, which stands for analysis of variance. But I don't want to introduce more functions and we absolutely need. So just keep things simple. We're going to use the lm function just to be consistent with the functions are going to be using in later, in later types of analyses. And there's one other change to this code. This is the same code as we saw on the previous video, except there's, there's one other change we're going to make which will highlight for you in a moment. Okay, so let's look at our, so here's our code. Let's make this a bit bigger. Let's just walk through the code very briefly. So we're going to start out by creating a vector that contains the treatment names for our three treatments, a, B, and C. And just like in the previous video, we're gonna 20 a's, 20 Bs and Cs. We're then going to create a vector that holds our random data. And you'll see that just like the previous video, we're always using the r norm functions. We're always drawing or numbers from a normal distribution. We're always drawing 20 random numbers for each treatment and were used in C mean values as we had in the previous video as well. So the mean value for a is ten, mean for FIP, for b is 15 and the mean for C is 20. The thing that's different in this video is we're changing the value, the standard deviation for each of our treatments. You'll see that for treatment a, the standard deviation is equal to 2s, the variances for because standard deviation is the square root of the variance. And she even be the standard deviation is six and so the variance is 36. Here for achievement, see, the standard deviation is 12 and so our variance is a 144. Okay? So we are simulating data that are drawn from a normal distribution, but they will violate the assumption of equal variance. Okay? And then in this next line of code, we're doing same as we did in a previous video, which is we're just taking our two vectors, combining them to create a DataFrame which coin, fake data, bad one. And then we're going to analyze the data like this. Have AOV. There we go. So where you can use R lm function. Within the lm function, the first thing we specify is the column within our dataframe that holds the dependent variable. So this is the variable that we think will depend on some other aspect of our experiment. We're imagining in this experiments that let's say these are three different drugs. And let's say that our y variable is, let's say these are the three different growth hormones. And so these data all represent growth values, okay? So we would expect the amount that individuals grow as we'd expect that the data in this vector will depend on which growth hormone individuals experienced. So the dependent variable here is data bad one. And so we put it before the Tilda and the independent variable is in the data, sorry, is in a column called treatment where we have our three different growth hormone, growth hormone a, B, and C. Okay? Now we need to tell R where to find these columns. And so we do that by say, Hey, our, our data are in this DataFrame here called fake data bad one, which is the name that we gave to our DataFrame above. When we run the lm function, we're saving the output from that function in this object called check fake, bad one. And so we can use that objects to produce our residual plots just by feeding that object that contains the output from LM into the plot function like this. Okay? So that's how it works. Let's see, we get okay. Oh, what did I do here? Oh, I pasted something that I did not expect. So here we go. Here's our first plot. And what you can see here is as you move from actually let's get oriented. So these will be the data from treatment a, or these are the residuals from treatment a, visa residuals for cheap and B. And these the residuals for treatment C. Okay? You can see there's a fair difference between the inferred mean for treatment C and the true mean. The true mean is 20. Okay? And that's how things turned out in this particular, in this particular run of the data. And what I want you to notice is that now the spread of the residuals for treatment a is quite different from B and from C. Okay, and so if we Scott result residual plots look like this, we would worry. Here's our QQ plot. It's actually not so bad. If I got a Q-Q plot that looks like this, I would generally be happy. The data aren't absolutely ideal. But this is something that would generally not worry the, worry me very much. Now here's our second plot that allows us to assess the assumption of equal variance. You will notice that now the red line increases steadily as we go from left to right. In the previous video, we always saw this line being relatively flat, okay, but now the red line steadily increases. And you can see that the spread of the data around that red line is notably different for achievement a compared to B and C. Okay? And we're ignoring that last plot for reasons we talked about in the previous video. Let's see, we get this time. Same kind of story. Data are close together here, farther apart, farther apart again. And something I really want to point out here is that you might remember from one of the previous videos, I put up a slide or ask the question, what should the residuals look like? And one of the things that I said was that the data points are the residuals. I mean, she just look like a cloud. Okay? In this kind of experiment, they're not going to look like a cloud, they're going to look like columns of residuals. And that's just because we have three specific treatments for other types of analyses like with regression, they will look like a cloud. But the other thing that I say on that slide is that we wants to not have any systematic patterns in our residuals. You'll see here that we do have systematic patterns. We have the data or the residuals are tight together here. They're more spread out and they're more spread out again. So as you move from the left to the right, you can see that the amount of variation increases as our fitted values increase. Okay? We would also worry about the opposite trend where we've had lots of variation here. And then if the variation became less and less as we went from left to right, okay? The point is if we see a pattern like that and that's especially worrying, okay? Normality looks generally okay. Once again, our data are not happy with respect e equivariance. This red line tends to go up. And these data here tend to be closer together than in particular compared to these data. Okay, Let's do this one last time just for good luck. Okay? Super tight together, much more spread apart. We worry me. This is more worried in terms of normality. I will say that. So, um, I suspect that this deviation here arises because of issues with fitting the model when you have unequal variance. So I suspect that that's why we're having this unusual QQ plot, even when we drew the numbers from random, sorry, from a normal distribution. Okay? And finally, again, a case where the data we, we know do not meet the assumption of equal variance. See the red line changing. The data are tighter here compared to there and there. Okay, So that's what I wanted to show you. So those are some examples of some cases where the data did not meet the assumptions of equal variance in particular. Okay? The next question is, okay, if we have data that do not meet the assumptions of a one-factor general linear model. What do we do? Well, that is going to be the subject of our next series of videos. Okay? So you can learn to answer that question with those videos. And I'll stop this video here. I'll say hope it's been helpful and thank you very much.