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
- Estimate a line of best fit from a scatter plot
- Interpret the slope and y-intercept of a trend line in context
- Use a best-fit line to predict outcomes (and recognize interpolation vs. extrapolation)
- Calculate residual = observed - predicted and interpret its sign
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.
- Substitute x = 4 into the line: predicted score = 5(4) + 20 = 40 points.
- The observed score is 37 points. Residual = observed - predicted = 37 - 40 = -3 points.
- The negative residual means (4, 37) lies below the line: the model overpredicted this student's score by 3 points.
- 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
- y = 20 + 50 = 70.
Answer: 70
2. For y = -3x + 100, predict y when x = 5.
Show solution
- y = -15 + 100 = 85.
Answer: 85
3. For y = 0.5x + 10, predict y when x = 20.
Show solution
- 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
- 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
- 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