CMClearMathAcademy

Line of Best Fit

A free Algebra I lesson from the “Statistics and Data Analysis” unit, with a worked example and practice problems including step-by-step solutions.

A line of best fit (also called a trend line or linear regression line) summarizes a scatter plot. Its slope is the predicted change in y per unit of x; its y-intercept is the predicted value when x = 0. Interpolation predicts inside the data range; extrapolation predicts outside it and is riskier. A residual measures a prediction's error: residual = observed - predicted. First use the line to predict y at the observation's x-value, then subtract that prediction from the observed y. A positive residual puts the point above the line (the model underpredicted); a negative residual puts it below (the model overpredicted). A zero residual means the point lies on the line. Residuals have the same units as y.

What you'll learn

Why it matters: Stock analysts, weather forecasters, and sports coaches all use trend lines to make predictions from past data.

Worked example

Problem. A best-fit line is y = 5x + 20 for (hours studied, test score). A student studies 4 hours and scores 37 points. Predict the score, then calculate and interpret the residual.

  1. Substitute x = 4 into the line: predicted score = 5(4) + 20 = 40 points.
  2. The observed score is 37 points. Residual = observed - predicted = 37 - 40 = -3 points.
  3. The negative residual means (4, 37) lies below the line: the model overpredicted this student's score by 3 points.
  4. Check the subtraction order: predicted + residual = 40 + (-3) = 37, the observed score.

Answer: Predicted score: 40 points; residual: -3 points; the observed score is 3 points below the prediction.

Lesson preview: this page shows 5 practice items. The interactive activity contains 28 practice items and 15 quiz items (typed response and multiple choice). Counts include repeated prompts and variants.

Practice problems

1. For y = 2x + 50, predict y when x = 10.

Show solution
  1. y = 20 + 50 = 70.

Answer: 70

2. For y = -3x + 100, predict y when x = 5.

Show solution
  1. y = -15 + 100 = 85.

Answer: 85

3. For y = 0.5x + 10, predict y when x = 20.

Show solution
  1. y = 10 + 10 = 20.

Answer: 20

4. The slope of a best-fit line tells us:

Choices: Rate of change between variables · Range only

Show solution
  1. Slope = change in y per unit change in x.

Answer: Rate of change between variables

5. The y-intercept of a best-fit line is:

Choices: Value when x = 0 · Maximum value

Show solution
  1. That is the definition of y-intercept.

Answer: Value when x = 0

Practice this interactively with instant feedback and an AI tutor.

Practice Line of Best Fit Take the free placement check

More Algebra I lessons