Find a Line of Best Fit from Scatterplot Points

Use y1 ~ m*x1 + b on observed table points to get exact slope, intercept, and residuals.

Worked problem

Four data points are (1, 4), (2, 7), (3, 9), and (4, 12). Using the linear line of best fit, what y-value is predicted when x = 5?

Target answer: 14.5 (compatible with typed-answer questions).

What to enter in the calculator

  • table: (1,4), (2,7), (3,9), (4,12)
  • y_1 ~ m*x_1 + b
  • m*5 + b

Step-by-step calculator moves

  • Enter the 4 scatterplot points into a Desmos table.
  • Type y1 ~ m*x1 + b to fit the least-squares regression line (m = 2.6, b = 1.5).
  • Evaluate m*5 + b on line 3 to read 14.5.

Check the math

2.6(5) + 1.5 = 13 + 1.5 = 14.5. Click "plot" next to residuals e1 if asked for a residual.

When to skip the graph

If a printed scatterplot already draws the line of best fit, read two clean lattice points off THAT printed line rather than guessing raw dots.

Connected book chapter, skill, and practice

Maps to Chapter 24 (One-Variable and Two-Variable Data) and the Two-Variable Data and Scatterplots skill guide.

SAT® and AP® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website or book. PSAT/NMSQT® is a registered trademark of the College Board and the National Merit Scholarship Corporation, which are not affiliated with, and do not endorse, this site. Bluebook™ is a trademark of the College Board. ACT® is a trademark of ACT Education Corp., which is not affiliated with and does not endorse this website or book. Desmos is a trademark of Desmos Studio PBC.

Last updated .