 correlation, one variable increases while the other decreases. So in this case, we're talking about age and batting averages. So in this case, the age of a baseball player is going up. And as the age of the baseball player is going up, the batting average goes down. Now note that this correlation is pretty not significant, but it is downward sloping correlation. Also note that we probably would think about this the other way around if I was making a hypothesis, I would probably put the X as the age indicating where we normally put the independent variable, which is causing the batting averages to go down. That would be my hypotheses that I would be putting in my head. But if I reverse these two this way, we would still end up with a negative correlation. So whichever variable we put on either axis, if there's a negative correlation, it'll still be negative. And if it's a positive correlation, it'll still be positive. But by tradition, we'll typically put the independent or what we think is the causal factor on the X. Okay, correlation coefficient. We usually represent it with an R. Here's the formula for it. When we think about the formula, it looks complex. But given some of the sections we have seen in the past, it's not really that difficult. We have two different data sets right now. And in prior sections, we talked about the Z score in prior calculations, that's going to take in one data set, each point minus the mean divided by the standard deviation. That's like the Z score, we do the second for the second data set, we do the same thing, each point minus its mean divided by its standard data deviation for a sample. And then we divide by N, which is the count of data sets that we have. In this case, N minus one with that added factor, we typically have for like sample calculations that we've seen in prior presentations. So what's this mathematical calculation going to do? It's going to give us a range from negative one to plus one. So when we think about this correlation, we saw it pictorially in the prior presentation, we can also represent it mathematically with this calculation giving us a result from negative one to positive one. Now, if it was exactly negative one, which isn't likely to happen most of the time. But if it was in that extreme example, it indicates a perfect negative correlation. So we'll do an example of this just to show the extreme when we do our practice problems and what example would be say the distance traveled versus the distance remaining. So if you're going on a trip that is 100 miles, and you travel 20 miles, then it would go from 100 down to 80, right? And if you went to 40 miles that you traveled, then the distance that's remaining would be 60, right? And if you went 60 miles, the distance remaining would be 40. And so you can see how you have that negative kind of correlation. Now, now in that case, you would again think of the distance traveled normally as the independent variable, but you could flip them, you could think of the distance remaining and say, well, and look at it that way, you would still get a downward sloping line. But obviously, in this case, if we were mapping this out, we would probably think the thing that we are doing is traveling. And that's causing the distance remaining to be dependent upon that. So one indicates a perfect positive correlation. So now we have them going up. In this case, we're comparing feet and inches, any kind of conversion will have a perfect kind of positive correlation. So obviously, if we said, for example, that we had one foot is that one foot would be 12 inches, right? So if we went up one foot, we'd have 12 inches. If we went up two feet, we'd have around 24 inches. So this is just showing a conversion. Now on this one, note that you don't really know whether or not you should put the feet or or the inches on the X or Y is one causing the other one. Not really, it's just a it's just a conversion, right? We're just we're just measuring the lengths using different scales. So this is showing showing a correlation. But it's hard to know if there is a cause and effect relation. No, we're just kind of defining the lengths, you know, differently using different units kind of so and then a zero means no linear correlation. So in this case, we have a bunch of data dots here. But when we draw a trend line between them, it's almost perfectly flat. So a perfectly flat trend line would indicate that there's not a correlation between them. Now remember that most data sets that we have is going to be somewhere in the middle. We're not going to see a perfect positive or perfect negative. We're going to see the dots trending positive or trending negative. And then we can see a trend line between them. And most data points might not be perfectly have a perfect zero. Because even if they were randomly chosen, you might have a little bit you might have a little bit of a correlation even basically from the randomness. So these are the extremes negative one, one and zero that we don't really expect to find in most of the things that we're going to apply this to. But we will do some examples of those extremes so that we can see what the border looks like. So this is something that would be more likely that we would see something like this. This is with heights, heights and weights of individuals. So in this case, if I was thinking about heights and weights of people, for example, measured in inches and pounds, then you would think that the heights I would hypothesize that if someone is taller, that would tend towards a higher weight. That would be my hypothesis, right? I would think if there's a cause and effect kind of relationship, taller people will tend to be heavier on in general. And so if you plot that out and we see this, we see that that does indeed look to be the case. All the dots do not fall exactly on the line, meaning I can't exactly predict what someone weighs by their height. But it is the case that if someone is taller, I would tend to think that they're going to be weighing more than if they're shorter. So but that's not always the case, right? We could have somebody that's like, if this is measured in inches, so 63 inches, 63 divided by 12 would be 5.25 feet. And they could be like 200 pounds or 180 pounds, right? That that could happen because you could have a very heavy, shorter individual, they would be kind of an outlier on the trend line, right? But the general the general line is going to go like this. So it's not going to give us a perfect it's the height of someone's not going to give us a perfect estimate of the weight. But we can give a linear approximation of what that would be. That's typically what we're trying to do here. So ice cream