Unit 10 · Lesson 10.3

10.3Lines of Best Fit

Draw and interpret lines of best fit for bivariate data. Use the line to make predictions and understand the difference between interpolation and extrapolation.

Why This Matters

Lines of best fit let you make predictions from data — a technique used in weather forecasting, economics, and machine learning. This is your first introduction to regression, one of the most powerful tools in statistics and data science.

Workbook

Lesson, vocabulary, worked examples, and practice problems.

Essential Question

How can a line of best fit help us summarize data and make predictions?

Lesson Overview

A line of best fit (also called a trend line) is a straight line drawn through a scatter plot that best represents the overall trend of the data. It does not need to pass through any specific data point — its goal is to minimize the total distance between the line and all the data points. Once drawn, the line can be used to make predictions: substitute an x-value into the line's equation to predict the corresponding y-value. Predictions within the data range are called interpolation; predictions outside the data range are called extrapolation and are less reliable.

Line of Best Fit — Scatter Plot

22446688x (hours studied)y (score)Line of Best Fit

Blue dots = data points

Each dot represents one observation (one student's hours and score).

Red dashed = line of best fit

The line that best summarizes the trend. Roughly equal numbers of points above and below.

Equation: y ≈ 0.85x + 0.6 — How was this found?

Pick two points that lie on the line (not necessarily data points). Here we use (1, 1.5) and (9, 8.2) from the plotted data:

  1. m = (8.2 − 1.5) / (9 − 1) = 6.7 / 8 ≈ 0.84 ≈ 0.85
  2. y − 1.5 = 0.85(x − 1) (point-slope)
  3. y = 0.85x − 0.85 + 1.5 = 0.85x + 0.65 ≈ 0.85x + 0.6

Slope 0.85: each extra hour of study adds ~0.85 points. y-intercept 0.6: predicted score with 0 hours studied.

Rules for Drawing a Line of Best Fit

1Follow the trendThe line should follow the general direction of the data (upward for positive, downward for negative).
2Balance above and belowRoughly equal numbers of data points should fall above and below the line.
3Pass through the middleThe line should pass through the "center" of the data cloud, not just connect the first and last points.
4Extend the lineDraw the line through the entire data range (and slightly beyond) to allow for predictions.
5Ignore outliersOutliers should not anchor the line. The line represents the majority of the data.

Interpolation vs. Extrapolation

Interpolation

Predicting a value within the range of the data. Generally reliable.

Data range: x = 1 to 9
Predict at x = 5 → interpolation ✓

Extrapolation

Predicting a value outside the range of the data. Less reliable — use with caution.

Data range: x = 1 to 9
Predict at x = 15 → extrapolation ⚠

How to Find the Equation of a Line of Best Fit — 4-Step Method

  1. Pick two points ON the line (not necessarily data points) — read their coordinates from the graph.
  2. Calculate the slope: m = (y₂ − y₁) / (x₂ − x₁)
  3. Write the equation using point-slope form: y − y₁ = m(x − x₁), then simplify to slope-intercept form y = mx + b.
  4. Make predictions by substituting x-values into the equation. Check whether each prediction is interpolation or extrapolation.

Worked Examples

Example 1

A scatter plot shows hours studied (x) vs. test score (y). The line of best fit passes through (2, 55) and (8, 85). Use the line to predict the score for a student who studies 5 hours.

Find the slope: m = (85 − 55) / (8 − 2) = 30 / 6 = 5.

Use point-slope: y − 55 = 5(x − 2) → y = 5x + 45.

Predict at x = 5: y = 5(5) + 45 = 25 + 45 = 70.

Answer:Predicted score: 70 points
Example 2

A line of best fit for temperature (°F) vs. ice cream sales ($) passes through (60, 200) and (90, 500). Predict sales when the temperature is 75°F.

m = (500 − 200) / (90 − 60) = 300 / 30 = 10.

y − 200 = 10(x − 60) → y = 10x − 400.

At x = 75: y = 10(75) − 400 = 750 − 400 = 350.

Answer:Predicted sales: $350
Example 3

A line of best fit passes through (0, 12) and (6, 30). Is predicting at x = 4 interpolation or extrapolation? What about x = 10?

Data range: x = 0 to 6.

x = 4 is within [0, 6] → interpolation.

x = 10 is outside [0, 6] → extrapolation.

Answer:x = 4: interpolation. x = 10: extrapolation.
Example 4

Describe how to draw a line of best fit on a scatter plot by hand.

Look at the overall trend (positive or negative).

Draw a line that follows the trend with roughly equal numbers of points above and below.

The line should pass through the middle of the data cloud.

Extend the line across the full data range.

Do not anchor the line to outliers.

Answer:A well-drawn line of best fit follows the trend, balances points above and below, and passes through the center of the data.
Example 5

A line of best fit for age of a car (years) vs. value ($1000s) has equation y = −1.5x + 18. Predict the value of a 7-year-old car. Is this interpolation or extrapolation if the data ranged from 1 to 10 years?

y = −1.5(7) + 18 = −10.5 + 18 = 7.5.

x = 7 is within [1, 10] → interpolation.

Answer:Predicted value: $7,500. This is interpolation.

Guided Practice

Guided Practice Video: Lines of Best Fit

Review how to draw and interpret a line of best fit on a scatter plot — including writing its equation, making predictions, and understanding interpolation vs. extrapolation — before completing the guided problems below.

Video by Sang Real Math

Watch on YouTube ↗
Guided Problem 1

A line of best fit passes through (1, 4) and (5, 16). Find the equation of the line.

Hint: Find slope: m = (y₂−y₁)/(x₂−x₁). Then use point-slope form.

Guided Problem 2

Using the equation y = 3x + 1, predict the y-value when x = 7.

Hint: Substitute x = 7 into the equation.

Guided Problem 3

A scatter plot has data from x = 2 to x = 12. A student predicts at x = 8 and at x = 20. Which is interpolation and which is extrapolation?

Hint: Compare each x-value to the data range [2, 12].

Guided Problem 4

A line of best fit for weight (lbs) vs. height (in) passes through (60, 110) and (72, 170). Predict the weight of someone 66 inches tall.

Hint: Find the slope, write the equation, then substitute x = 66.

Guided Problem 5

Error Analysis: A student draws a line of best fit that passes through the two outermost data points. What is wrong with this approach?

Hint: Should the line pass through specific data points? What should it do instead?

Key Vocabulary

Line of Best Fit

A straight line drawn through a scatter plot that best represents the trend of the data. Also called a trend line.

Trend Line

Another name for the line of best fit. Summarizes the direction and pattern of bivariate data.

Prediction

Using the line of best fit to estimate a y-value for a given x-value, or vice versa.

Interpolation

Predicting a value within the range of the data. Generally more reliable.

Extrapolation

Predicting a value outside the range of the data. Less reliable — the trend may not continue.

Bivariate Data

Data involving two variables measured on the same subject. Displayed in a scatter plot.

Interactive Practice — 5 Questions

1

A line of best fit passes through (1, 5) and (4, 11). What is the slope?

2

Using ŷ = 3x + 2, predict y when x = 5.

3

A dataset has x-values from 2 to 12. Predicting at x = 7 is:

4

The line of best fit should:

5

Which prediction is LESS reliable?

Independent Practice

Independent Practice

1

A line of best fit passes through (2, 6) and (8, 18). Find the equation of the line in slope-intercept form.

2

Using the equation ŷ = 2.5x + 4, predict the y-value when x = 6. Then predict x when y = 29.

3

A scatter plot has data from x = 1 to x = 10. A student predicts at x = 5 and at x = 15. Which is interpolation and which is extrapolation? Which prediction is more reliable?

4

A line of best fit for study hours (x) vs. test score (y) passes through (0, 55) and (10, 95). Write the equation. Interpret the slope and y-intercept in context.

5

Error Analysis: A student draws a line of best fit that passes through the two highest data points. Explain why this is incorrect and describe the correct approach.

⚠️

Common Mistakes

Drawing the line of best fit through the origin or through the first and last points instead of balancing the data.

The line of best fit minimizes overall distance to all points. It doesn't have to pass through any specific point.

Confusing interpolation and extrapolation — predicting outside the data range and calling it interpolation.

Interpolation: predicting within the data range. Extrapolation: predicting outside the data range. Extrapolation is less reliable.

Using the line of best fit to make predictions when the correlation is weak (r close to 0).

A line of best fit is only useful for predictions when the correlation is strong. Weak correlation → unreliable predictions.

Forgetting that the line of best fit is a model — treating its predictions as exact values.

Predictions from a line of best fit are estimates. The actual value may differ from the predicted value.

💡

Math Tips

📌

A line of best fit does NOT need to pass through any data points — it minimizes overall distance from all points.

📌

Interpolation (predicting within the data range) is more reliable than extrapolation (predicting outside the range).

📌

To find the equation: pick two points ON the line (not necessarily data points), calculate slope m = (y₂−y₁)/(x₂−x₁), then use point-slope form.

📌

The slope tells you the rate of change: for every 1-unit increase in x, y changes by m units.

📌

The y-intercept tells you the predicted value of y when x = 0 — always interpret it in context.