JentooSAT®

SAT® · Math: Problem-Solving and Data Analysis

Making Predictions from a Line of Best Fit

A line of best fit lets you predict a y value for any x by plugging into the line's equation, and a residual tells you how far the real data point missed that prediction.

Scattered data rarely lines up perfectly, but if the points trend together, a single straight line can capture that trend well enough to predict values you never actually measured. The line of best fit is the one that balances all the points at once: it does not pass through most of them, but it makes the overall gaps between the line and the real data as small as possible. Once you have that line's equation, you treat it like any linear function. Plug in an x value, even one between your data points, and read off the predicted y.

To build the equation from two points on the line, find the slope the normal way: change in y over change in x. Then use one point and that slope to write the equation, and plug in whatever x you need. For (20, 1.5) and (40, 3.3), the slope is (3.3 - 1.5)/(40 - 20) = 0.09. Starting from (20, 1.5), the prediction at x = 32 is 1.5 + 0.09(32 - 20) = 2.58. The gap between a real measurement and the line's prediction at that same x is the residual: measured minus predicted. A measured value of 2.0 under a fitted value of 2.4 gives a residual of 2.0 - 2.4 = -0.4, meaning the actual point sits below the line.

This idea connects directly to scatterplot models and to judging how well a line fits: residuals that are small and scattered randomly above and below the line mean a good linear fit, while a clear pattern in the residuals means a line is the wrong shape. Predictions only make sense near the x values the data actually covered, which is why pushing far outside that range is treated separately as a warning sign rather than a reliable use of the model.

Key terms

Line of best fit
The straight line through a scatterplot that makes the total gaps between line and data as small as possible.
Residual
The measured y value minus the value the line predicts at that same x.
Slope
The change in y divided by the change in x between two points on the line.
Extrapolation
Predicting a y value for an x far outside the range of the original data.

Watch it explained

  1. How it worksHow does a line of best fit split the difference so the leftover gaps stay as small as possible?
  2. Worked exampleFind the y value predicted at x = 32 by a best-fit line through (20, 1.5) and (40, 3.3).
  3. Worked exampleFind the residual when a measured value of 2.0 sits under a fitted value of 2.4 at the same x.
  4. Common mistakeWhy isn't a prediction made far outside the measured x range trustworthy at all?

Check yourself

Your turnmedium1 of 3
A line of best fit passes through the points (20, 4) and (48, 8). What value does the line predict at x equal to 27?

End of topic.