Okay, in this video, we're going to gain some practice with interpreting interactions, and we're gonna do that visually. I'm going to show you a number of figures that may or may not involve interactions between different factors. And we're going to talk about whether our interactions are present and whether or not other types of effects are present. And we're going to be looking for the telltale signs of interactions. Okay, so our goal in this video is to really hone your understanding or your intuition of what interactions really mean. To remind you. Interactions occur when the effect of one factor and a model depends on the particular level that we're considering. For another factor in a model. We're going to be looking for signals that are consistent with this. So looking for cases where the effect of one factor depends on the size of the effect of one factor depends on what level we're considering for another factor. And we're going to just use a hypothetical situation. These are not real data, but we're going to consider a situation that's consistent with the previous videos we've looked at so far. Where we have a test of either a drug or control group and being tested either in females or males. So I'm going to be showing you a series of pictures like this, a series of figures like this. And in each case, I want you to be asking yourself whether or not there seems to be an effective treatment. Where the treatment is either the drug or the placebo, which is explained in this legend here. Whether there's an effect of gender or whether or not there's a significant interaction. Okay? So I'll walk you through this first example to kind of get you oriented to this kind of thinking. And then after that, I'm going to be asking you to do it and then I'll be talking about what we can see. So let's, let's walk through this example. The first thing we want to figure out is whether or not there's an effective treatment. So we IS, does tend to be a difference between the placebo group and the drug group. To figure that out, what we can do is we can just average over the values of females and males for each of our drug and placebo treatments. So if we wanted to determine the overall average effect of the placebo average over females and males who were just average. This data point with that data point, which gives us a point there. So that's the average effect for the placebo treatment. And for the, for the drug treatment. We average this value with that phi u, which gives us really no change. But this gives us the mean value for the drug treatment. And what you should see here is that the placebo, the mean guide for the placebo, seems to be greater than the mean value for the drug. I'll just highlight that these are idealized data. We don't even have standard error bars on here. So we're imagining that we have very good measurements of these means. So if this mean is higher, if this mean for the placebo is higher than the mean for the drug, and that would imply, Yes, we do have ineffective treatment. What about an effective gender? Well, if you were to compare females and males than what we should do is we should average, average over the treatment effect within each of our females and males. So to figure out the average for females, we can average over placebo and drug treatment. So average that value and that value to give us a value somewhere in the middle. And then we do the same thing for males. So average over the placebo and the drug situations for males and the average value for males will be identical to the average value we got for females. And so these data suggest that there's no effect of gender because the mean values for females and males are identical. What about, is there any evidence for an interaction? Remember, an interaction occurs when the effect of one factor depends on the level that we're considering in another factor. Well, let's, let's look at that. So let's look at females. The difference between the placebo and the drug is this much the difference between this point for the drug and females and that point, and for the placebo and females, that's the size of the effective treatment in females. That's exactly the same size of effect of comparing placebo and drug and males. So this implies that the effect of drug or the effect of treatment the same in females and males. And so that implies that there is no significant interaction in this data set. And so now look at the next slide. And I agree with myself, since I came up with these decisions. So we have, there isn't effective treatment. There's no effect of gender and no signal of an interaction in these data. Okay, so that's the first scenario will consider. Now I want you to do the same exercise, but for this scenario, okay, we'll just pause the video for a moment and stop and think about whether or not there's a treatment effect, an effect of gender, or a significant interaction. Just pause video. Okay, now that you've given that a good thing, let's walk through this. First of all, is there an effective treatment? To get an effective treatments we want to average over females and males for each of drugs and placebo. So if we average over the red points for the placebo, the average of that point, and that point will be 4x right about there. And the average for the drug will be there, will be the average of the point in males and females, which gives us an identical average. I know this has been drawn with these points separated. So it looks like to placebo is a bit higher than the drug that simply been done to help you to actually see the data points. So apologies if, if that tricked you. But this implies that since the average for the plus the, since the average that we get from averaging over females and males for the placebo is the same result as we get for the drug. That implies there's no effect of the treatment. For gender. If we average over the two drug treatments in females, we get a point way up there. If we average over the drug treatments for males, you gotta point way down there. In that case, yes, we do have an effect of gender. What about an interaction? Does the effect of the treatment differ between females and males? Well, no. Because in neither case do we really see any effect of the treatment. There's really no difference between the drug and placebo and males and similarly in females. And so the effective drug, which is none, is consistent in females and males. So we do not have a significant interaction. All we have here is an effect of gender. Let's move on to the next scenario. Now let's consider this again. Pause the video and think about the three outcomes. Okay, Now if you've had a good think, let's walk through this together. So is there an effective treatment? Is there a difference between the placebo and the drug? Well, let's start as we've always done by averaging over females and males for each of those treatments. If we average over females and males for the placebo to ravaging that datapoint in males with that data pushing females will get a point somewhere up there for the placebo. And then we could do the same thing for the drug treatment. So average the point for females and average the drug point for males. And that gives us an average around here, which is much lower than we had for the placebo. So that implies that there is an effect of treatment. What about gender? Well, to compare females and males, we want to average each of their values over the treat, the gaba treatments of jargon placebo. So the average for the placebo and drug scenarios for females is way up here, rounded value of 85. Whereas the average for males, which we're averaging over the placebo and the drug, that average is around 75. And so we can see the average for females is greater than the average for males, which implies that there is an effect of gender as well. So you have an effective treatment. We've ineffective gender. Is there a significant interaction? In other words, does the effect of the treatment differ between females and males? Well, no, it doesn't. Because the difference between the placebo and the drug for females is that big. And that is the same size as the difference between the placebo and the drug as we find in males. So the effect or the overall difference between the drug and placebo was the same in males and females. So we do not have an interaction here. So that's what we have. Here is our summary. We do have an effective treatment, we do have an effect or gender, but there's no interaction. What about this case? Again, stop the video and run through the exercise again for yourself. Okay, now Japan had to think, let's walk through this. So is there an effect of treatment? So does the average for placebo differ from the average of the drug? Well, that average for the placebo is averaging this point for the placebo and males with this point for the, for the placebo and females, which gives us an average around there, an average of around 85. You can see there. In contrast, the average for the drug is just the average of the drug treatments in males, in the drug treatment in females, and there's no difference between them. And so the average for the drug scenario will be equal to 80. So the average for the placebo is greater than the average for the drug imply. And yes, we have an effect of treatment. What about for gender? Well, we can average over our drug treatments. So the average value for females is the average of the drug females and the placebo females. And that gives us an average at 85. And we can similarly average over the drug treatments for males, which gives us an average down here, around 80. That implies that on average, females have higher values than males. So we do expect there to be an effective gender. What about a drug treatment by gender interaction? In this case, yes, we do have an effect. We do have an interaction. And that's because there is a large effect of the drug in females. So the value of females and placebo is much greater than the value in the drugged females. Where's there's no difference between the placebo and the drug in males. So we have a large difference in females and no difference at all in males. So that implies that the effect of the drug depends on whether or not we're looking at females or males, and that means we have an interaction. Just a couple more to go. Okay, stop the video again and consider this scenario. Okay. That you've given that I think I'll just jump ahead and give it the answers, but I'll walk through them as well. So this, like the previous slide, reveals this. The set of data gives us a significant effect of treatment and of gender and of an interaction. The significant effective treatment comes from the fact that the average of the red points is higher than the average of the black points. And so there is a difference between the placebo and the drug treatment. The effect of gender comes to the fact that if you average over the data points for females, that's going to give us a value of 85, it looks like. So averaging a value of 9080 gives us a value of 85 for females. Whereas for males the average of the placebo and drug treatment is somewhat lower. It's probably about 82.5 or so. Okay. So we do have an effect or gender because the average is 0 for females is greater the average point for males. And we also have an interaction because we can see that the effect of the drug is far greater in females than it is in males. There does appear to be an effective the drug in both females and males. So that aspect of things is not different. It seems that's the placebo and drug. Those scenarios differ both she'd females and males. But the size of that difference is the size. The difference between the drug and placebo is not the same. Females and males. The size, the difference between the placebo and the drug is much greater in females than it is for males. And that will also mean that we have an interaction. It says that basically the effect of the drug or the size of the effect of the drug, depends on whether or not you're looking at females or males. And here's another situation, okay, this one's a bit of a mind bender, so it's pause video. I'm thinking about this one for a moment. Okay, now that you've given that a good think, I'll give you the answers and we'll walk through this. So isn't effect of treatment. So does the average for the red values differ from the average from the black values? While the average for the placebo and the drug, I sorry, the average for the placebo. If we're averaging over males and females, is going to lie right there in the middle at 85. And the same thing is true for the drug. If we average over the male point and the female point for the drug treatment, we're also going to get an average that is right in the middle of 85. So the average for the placebo and the average for the drug are not different from one another. So we do not have an effect of treatment. We also do not have an effect of gender. And that's because if we take the average of the drug and the placebo treatment at females, again, that gives us an average female value of 85. And the same is true if we do that averaging and males, they get an average value of 85 for males as well. And so there's no difference on average between the females and the males. But there is a strong interaction. And that's because the effect of the drug differs between females and males. And females. Adding the drug causes the causes our mean values to increase from having a low value for, for the placebo to a high value for the drug. Okay, so adding a drug to females increases the thing that we're measuring. The opposite is true for males. If you give males the drug, and that tends to give them a lower value than what you get for the placebo. And so this implies that the effect of the drug differs between males and females. In fact, that the direction of the effect is difference between females, males. And that's what gives us our significant interaction. This slide here kind of summarizes what we've been looking at so far. Where I've taken all the cases where we did not find a significant interaction and put them on the left. And we've taken all the cases where we did have a significant interaction. We put them on the right. Okay. And I want you to notice kind of are a telltale sign when looking for an interaction. When the lines are parallel, that's consistent with there being no interaction. And that's what we see on the left. Whereas when the lines are not parallel, the lines that connect the mean values for various treatments, the lines are not parallel, then that implies that we do have an interaction. Okay, at least in this case, or we have idealized data where we're measuring everything perfectly. And that's because when the lines are not parallel, that is, the lack of parallel. The lack of parallel lines, I was wondering is parallel nis a word? The lack of parallel lines implies that the effective one treatment or the effect of one factor will depend on which level we're looking at in the other factor. Now with this in mind, I want you to consider this very last scenario. I don't want you to ask yourself whether or not this figure suggested interaction. And the key difference between this figure in the previous ones is that now are mean values which are given by these various, by these points. These are the circles. They are not measured with great certainty, as you can see by these error bars which we have around each of the means. Ok. Now stop and think about this for a moment and ask yourself whether or not this figure suggests whether or not there's an interaction. And then start the video again after you've thought about it. Okay, you're actually given it a thought. The answer is it's actually really difficult to tell in the situation. And that's because of the uncertainty in the estimates. If we were just to look at this figure and get rid of the error bars, we would see that there's a slight difference in the slopes. And that might imply that we do have a significant interaction like we saw in all of our previous scenarios. But these error bars completely change that. And that's because we can no longer be absolutely certain of what the real values are for these, for these slopes. For example, these error bars imply that this points that I'm pointing to here on the, on the upper left. If this mean we're moved up a little bit within this range of the error bars. And if this point and this top right, if this point where move down a little bit within the error bars, then that would tend to make this slope a little more, a little bit more shallow. And we could probably get the slope identical. We could probably make this top slope identical to what we get in the bottom slope just by fiddling around with the fact that these just fiddling around with the fact that we know that these estimates for mean values, they're not measured perfectly. And when we take that uncertainty into account and consider the range of possible slopes that we can get. We can see that it's certainly possible to come across situations where these slopes in these two situations would be identical? I don't feel like I said that in a particularly articulate fashion, so I'll just kind of repeat myself, but with this bottom bit. So let's just repeat that, that argument. Hopefully be a little more clear this time, is that you can imagine that because this data points in the bottom right is not measured with complete certainty, which we know because of our error bars. If we were to move this, this mean value up somewhat, then we could probably create a slope for these bottom two points that is very similar to the slope that we get for these upper two points. Okay? In other words, when we take the uncertainty in these mean values into account, it becomes much more difficult to know whether or not the slopes are parallel just by looking at the data. And that is why it's so important to estimate an interaction effect in a model. So if you estimate an interaction effect in a model, that estimation can provide you with the evidence that you need to decide whether or not we have good reason to believe that these slopes are different from one another. Or in other words, to believe that the effect of one factor depends on the level of the other factor we're considering. So when we get a p-value for an interaction, that p-value helps us to decide whether or not we have sufficient evidence to believe that. To believe that we have a significant interaction or to believe that the effect of one factor depends on the level of the other factor. I'm not a big fan of thinking about things in these concrete terms, in terms of significant or not. So I will point out, and another way of thinking about this where you could get effect sizes. And then based on those effect sizes, you could effect sizes for various contrasts. And based on those effect sizes, you could then judge for yourself, or you could use those effect sizes to determine whether or not it's plausible that the effect of one factor or the size, the effect of one factor could potentially be different depending on what level it is you're looking at. In the other factor. That was a bit of a mouthful. Will stop this video there and say, I hope that this tour of this visual tour of interaction has been helpful to wrap your mind around what it really means to be thinking about interactions. And hopefully this visual guide will help you to understand plots of your data more when you're analyzing your data in the future. Thank you very much.