Copyright

Line of Best Fit: Definition, Equation & Examples

Line of Best Fit: Definition, Equation & Examples
Coming up next: Ratios & Rates: Definitions & Examples

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
 Replay
Your next lesson will play in 10 seconds
  • 0:01 What Is a Line of Best Fit?
  • 0:43 Excel and Line of Best Fit
  • 2:32 Point-Slope Formula…
  • 4:44 Using the Line of Best Fit
  • 5:42 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Timeline
Autoplay
Autoplay
Speed

Recommended Lessons and Courses for You

Lesson Transcript
Instructor: Ellen Manchester
Linear graphs are a terrific way to see a trend when comparing any two factors. A line of best fit is the trendline that best fits the data set. In this lesson, we will see how the line of best fit helps to predict future events.

What Is a Line of Best Fit?

The line of best fit , also called a trendline or a linear regression, is a straight line that best illustrates the overall picture of what the collected data is showing. It helps us to see if there is a relationship or correlation between the two factors being studied. This trendline helps us to predict future events relating to the data being studied.

In this figure, the red line of best fit shows the general trend of a person's height at certain ages. As you can see, some of the points are on the line; some are above and some are below. This line helps us see the general trend of what is being studied. Let's look at how the line of best fit can be calculated using Excel and then using the point-slope formula.

Excel and Line of Best Fit

Excel can help you easily calculate the line of best fit. This example will show you how to use Excel to do this.

This information gives the values gathered to see if there is a relationship between student attendance percentages and final grades. The graph is set up using a Cartesian Coordinate System where the attendance percentage is on the x-axis and the final grades are on the y-axis. So, for example, if a student went to class 90% of the time and that particular student earned an overall grade of 94%, we will graph this as 90 on the x-axis and 94 on the y-axis.

This is the scatter plot graph identifying these same students and includes a line of best fit, which was generated automatically by the Excel program. The Excel program allows you to easily graph the trendline.

To do this, enter the data into the two columns, highlight both columns, then click Insert, then Scatter. The graph will automatically generate the data points. Put the cursor on one of the middle data points, then right click and scroll down to 'Add Trendline.' A new window will open. Make sure 'Linear' is marked under 'Trend/Regression type' and mark the box that says 'Display equation on chart' and 'Display R-squared on chart.'

As you can see, the linear equation:

y = .6596x + 33.12

shows a positive slope and indicates that if a student attended zero times, they could possibly get a 33.12% as an overall grade.

This trendline could also be used for other students to predict the grades they would receive. For instance, if Susie only wanted to come to class 80% of the time, she could expect to receive an 85% grade. If a student wanted to earn a 90% or better, they would have to come to class about 90% of the time.

Point-Slope Formula and Line of Best Fit

While Excel easily calculates the line of best fit, you can also calculate a line of best fit by picking two data points and using the point-slope formula to generate the equation of the line. For instance, let's choose two data points from this chart:

We choose (0, $34,736) and (8, $82,732). We can find the slope by using the slope formula:

m = (y - y1) / (x- x1)

Now we plug in the values from our data points:

m = ($82,732 - $34,736) / (8 - 0)

We can simplify that to give us:

m = $47,996 / 8

m = $5,999.50

Now using the slope, we will plug it into the point-slope formula:

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account
Support