Video Transcript
What is the value of the gradient of the line of best fit for the points plotted on the graph shown?
Okay, so in this question, we can see that we’ve got some points plotted on a graph. And we can also see that there’s a line of best fit that’s been drawn for these plotted points. Now, for this particular graph, it just so happens that the line of best fit perfectly goes through all of the points plotted on the graph. This is not always the case. Remember that it’s not necessary for the line of best fit to go through all of the points. However, in this particular case, it does. And we’ve been asked to find the gradient of this line of best fit.
Now, to do this, what we need to recall is how to calculate the gradient of a straight-line graph. If we start by saying that our horizontal axis is what we’ll call the 𝑥-axis and our vertical axis is what we will call the 𝑦-axis. Then we can recall that the gradient of our straight line can be calculated by first picking two points on our line and finding the change in 𝑦-values of those two points and dividing this by the change in 𝑥-values of those two points. Now, some of us may remember this as rise over run. But this statement is slightly easier to decode mathematically, because let’s say that we pick this point here and this point here as the two points on our straight line. The first thing that we can do is to work out what their 𝑥- and 𝑦-coordinates are.
To do this, we simply draw a straight line vertically downwards to the 𝑥-axis. And this gives us the 𝑥-coordinate, which is 1.5. So we can say that the 𝑥-coordinate is 1.5. And then, we draw a straight line from our point horizontally until it meets the 𝑦-axis and gives us the 𝑦-value of our point. In this case, it’s seven. Now, we can do the same thing for our second point. The 𝑥-value when we draw a line vertically downwards to meet the 𝑥-axis happens to be 2.5. And doing the same thing for the 𝑦-axis value, we find that it’s five. So we found the 𝑥- and 𝑦-coordinates of both of the points that we’ve chosen randomly on our straight line.
Note that, in this particular case, we could’ve chosen any of the actual points plotted on the graph, rather than any point on the straight line. However, that is only because our line of best fit coincidentally happens to pass through all of the points plotted on this graph. In general, though, this is not the case. And in that situation, we have to pick two points on the line, rather than two of the plotted points. This is really important to remember.
But anyway, so we’re gonna go about calculating now the gradient of our line of best fit. We’re gonna say that the first of the points that we’ve chosen on our line is point one. And the second point is point two. The reason for this is that we can then say that the gradient, which we will call 𝑔, is equal to the difference in 𝑦-values of the two points, which we can calculate as the 𝑦-coordinate of the second point minus the 𝑦-coordinate of the first point. And we need to divide this by the difference in 𝑥-values, which would then be the 𝑥-coordinate of the second point minus the 𝑥-coordinate of the first point.
Note that we could’ve said that the gradient was equal to 𝑦 one minus 𝑦 two. And then, we’d have to divide this by 𝑥 one minus 𝑥 two. In other words, it doesn’t matter where we say that the numerator is equal to 𝑦 one minus 𝑦 two or 𝑦 two minus 𝑦 one as long as we ensure that the coordinates in the denominator are in the same order, one minus two or two minus one. But anyway, so let’s stick with this equation for now. And we’re going to say therefore that the gradient, which we’ve called 𝑔, is equal to the 𝑦-coordinate of the second point, which is five, minus the 𝑦-coordinate of the first point, which is seven. And we have to divide this by the difference in the 𝑥-coordinate. So the 𝑥-coordinate of the second point, which is 2.5, minus the 𝑥-coordinate of the first point, which is 1.5.
At which point, we can simplify the numerator and the denominator. The numerator is five minus seven, which ends up being negative two. And the denominator is 2.5 minus 1.5, which ends up being one. And so our gradient is negative two divided by one, which is simply negative two. And this is going to be our final answer because we don’t have any units on the 𝑥- or the 𝑦-axes. And we know that this value makes sense. The fact that it’s negative because as we move from left to right, in other words, as we increase in 𝑥-value, the 𝑦-value actually decreases. And that’s what it means to have a negative gradient, which means that we can say that our final answer is that the gradient of the line of best fit for the points plotted on the graph shown is negative two.