Loading...

Are there methods to finding a line of best fit?

While there are quite a few ways in statistics to find best-fit lines, the least squares linear regression method is a popular one. The video below shows you how this method works.
Download PDF Transcript (opens in new window)

In this video we are going to talk about how to find the equation to the line of best fit and we are going to use the age versus height data from the previous slide. So when we’re trying to find an equation for the line of best fit since this is a line that we’re dealing with, we’re actually going to be trying to find the equation y equals mx plus b.

So we need to find our m and our b. How do we find them? Remember the m is slope and slope is y two minus y one over x two minus x one. So what we’re going to do, we’re going to look at the slide. We’re going to look at this graphic we used on the previous slide. And here’s the line that was already drawn in so we’re going to look at this and find points that fall on this line. So for instance, I’m going to use six comma forty-five and ten comma fifty-five because that’s about what it looks like to me. So I’m going to go ahead and find the slope. Remember this is my x one, my y one, my x two and my y two.

So I’ll take fifty-five minus forty-five over ten minus six which is ten over four which is roughly two point five.

So now to find the B, to find your next piece, what we need to do is use this slope, use one of these points and plug it in to this equation. And we can find it like that.

So I’m going to use ten and fifty-five to make this a little easier on us. I’m going to say fifty-five equals two point five – because that’s your slope - times ten plus b because that is what we’re trying to find. So we get fifty-five equals twenty-five –multiplying two point five times ten – plus b. If I subtract twenty- five from both sides, I get b equals thirty.

If I plug it all in, I have y equals two point five x plus thirty. And that is our equation. Keep this handy because we are going to be using this later on in the next video.