Grade 9 Math • Statistics & Probability

Predictions with Linear Models — I can use a linear model to make predictions and explain limitations (interpolation vs extrapolation).

Learn when a straight-line model gives trustworthy predictions and when it might lead you astray.

Grade 9 Math emblem with a calculator, geometric shapes, and line graph
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

Humans have always tried to predict the future—when crops would ripen, how far a ship could sail in a day, or how fast a population might grow. For centuries, those predictions relied on intuition and experience. The development of linear models gave us a mathematical way to turn observed patterns into precise forecasts. The story of using straight lines to make predictions stretches back surprisingly far and remains one of the most widely used tools in modern data science.

1805 • Legendre's Method of Least Squares

French mathematician Adrien-Marie Legendre published the method of least squares, a technique for fitting the best straight line through a set of data points by minimizing the total squared error.

1809 • Gauss Refines Regression

Carl Friedrich Gauss independently developed least-squares estimation and used it to predict the orbit of the asteroid Ceres—a stunning early example of prediction with a mathematical model.

1886 • Galton Coins 'Regression'

Sir Francis Galton studied the heights of parents and children. He noticed that children's heights tended to "regress" toward the average, and the term regression was born.

1900s–Today • Linear Models Everywhere

Linear prediction became a foundation of statistics, economics, sports analytics, and machine learning. Today, data scientists still start with a linear model before trying anything more complex.

Despite the power of fitting a line to data, a critical question always lurked in the background: How far beyond our data can we safely predict? This question leads to the distinction between interpolation and extrapolation—the heart of this lesson.

SECTION 2

Core Principles & Definitions

Before you can use a linear model to make predictions, you need to understand a few key ideas. A linear model is an equation of the form y = mx + b that describes the trend in a set of data. When the data points roughly follow a straight-line pattern, a linear model captures that trend and lets you estimate y-values for x-values you haven't directly observed. However, the reliability of that estimate depends heavily on where your x-value falls relative to the original data.

1

Linear Model (Line of Best Fit)

A straight-line equation, y = mx + b, that best represents the overall trend in a scatter plot. It is also called the regression line or trend line.
2

Interpolation

Using the model to predict a y-value for an x-value that falls within the range of the original data. These predictions are generally reliable because the line was built from nearby data.
3

Extrapolation

Using the model to predict a y-value for an x-value that falls outside the range of the original data. These predictions are riskier because the trend may change beyond the observed values.
4

Domain of the Data

The interval from the smallest to the largest x-value in the original dataset. This range is the boundary between interpolation (inside) and extrapolation (outside).
✦

KEY TAKEAWAY

Think of a linear model like a bridge built between two cliffs. Interpolation is like walking across the bridge—you're on solid ground because the structure was designed for that span. Extrapolation is like walking past the end of the bridge into thin air—maybe there's more ground ahead, or maybe there's a canyon. The farther you go past the edge, the riskier the step.

SECTION 3

Visual Explanation — Interpolation vs. Extrapolation

The diagram below shows a scatter plot with a line of best fit drawn through the data. The shaded green region represents the interpolation zone—the range of x-values covered by the original data. The red-shaded regions on either side represent the extrapolation zones where predictions become increasingly uncertain.

x (independent variable)y (dependent variable)EXTRAPOLATIONINTERPOLATION ZONEEXTRAPOLATIONx₁ (min)x₇ (max)Interpolated predictionExtrapolated predictionLine of Best Fit (y = mx + b)
The green zone between x₁ and x₇ represents interpolation (reliable). The red zones beyond x₁ and x₇ represent extrapolation (risky). Notice how the dashed line segments extend beyond the data—the further out, the less trustworthy the prediction becomes.

In the diagram, the seven violet dots are the observed data. The solid cyan line passes through the middle of them, representing the linear model. Notice that the prediction inside the green zone (the circled cyan dot) sits among actual data points, so the line's estimate is well supported. The prediction in the red zone (the circled red dot) lies far beyond any observed value, so it's little more than a guess—the real-world pattern might curve, level off, or reverse.

SECTION 4

Mathematical Framework

The mathematical backbone of making predictions with a linear model is the familiar slope-intercept equation. Once you have the equation of the line of best fit, you simply substitute the desired x-value to compute the predicted y-value. Understanding the components of that equation helps you interpret every prediction you make.

LINEAR MODEL (SLOPE-INTERCEPT FORM)

y^=mx+bŷ = mx + b

ŷ = predicted value of the dependent variable, m = slope (rate of change per unit increase in x), x = value of the independent variable, b = y-intercept (predicted y when x = 0).

SLOPE FORMULA

m=(y2−y1)/(x2−x1)m = (y₂ − y₁) / (x₂ − x₁)

The slope measures how much y changes for every one-unit increase in x. A positive slope means y increases as x increases; a negative slope means y decreases as x increases.

INTERPOLATION CONDITION

xmin≤x≤xmaxx_min ≤ x ≤ x_max

If the x-value you're predicting for falls between the smallest (xmin) and largest (xmax) values in your dataset, you are interpolating. If x falls outside that interval, you are extrapolating.

⚠

Watch Out!

The y-intercept (b) often requires extrapolation to reach. If your data starts at x = 10, then x = 0 is outside your data range. Always check whether interpreting the y-intercept literally makes sense in context.

SECTION 5

Detailed Breakdown — Interpolation vs. Extrapolation

The distinction between interpolation and extrapolation is not just academic—it affects the confidence you should place in every prediction. The diagram below illustrates a real-world scenario: a student tracks the number of hours they study per week and their average test score over several months. The linear model fits the data well within the observed range, but watch what happens when we try to predict far beyond it.

Study Hours vs. Test ScoreStudy Hours per WeekTest Score (%)020406080246810Interpolation (x=5)Extrapolation (x=11)x=2x=9Model: ŷ = −31.5x + 423 (approx.)
The violet dots show actual data between x = 2 and x = 9 study hours. Predicting the score at x = 5 is interpolation (green circle, inside data range). Predicting at x = 11 is extrapolation (red circle, outside data range). In reality, a score can't exceed 100%, so extrapolating to very high x-values would eventually give an impossible prediction.
FeatureInterpolationExtrapolation
x-value locationWithin the range of the original dataOutside the range of the original data
ReliabilityGenerally reliableLess reliable, riskier
ExamplePredicting score at 5 study hours when data spans 2–9 hoursPredicting score at 15 study hours when data spans 2–9 hours
Key riskData scatter may cause small errorsThe real-world trend may curve, plateau, or reverse

Interpolation vs. Extrapolation at a Glance

SECTION 6

Worked Example

A local bakery tracks weekly advertising spending (in dollars) and weekly revenue (in dollars) over eight weeks. A linear model is calculated to be ŷ = 12x + 300, where x is the advertising spend and ŷ is the predicted revenue. The data spans advertising amounts from $50 to $200. Use the model to predict revenue when spending is $120 and when spending is $350, then determine which prediction involves interpolation and which involves extrapolation.

Predicting Revenue from Advertising Spend

  1. 1

    Step 1 — Identify the model and data range

    The linear model is ŷ = 12x + 300. The original data's x-values range from $50 to $200, so any prediction within that interval is interpolation and any prediction outside it is extrapolation.
  2. 2

    Step 2 — Predict revenue for x = $120

    Since 50 ≤ 120 ≤ 200, this is interpolation. Substitute x = 120 into the model: ŷ = 12(120) + 300 = 1,440 + 300.
    ŷ = $1,740 (interpolation — reliable)
  3. 3

    Step 3 — Predict revenue for x = $350

    Since 350 > 200, this x-value is outside the data range, so this is extrapolation. Substitute x = 350: ŷ = 12(350) + 300 = 4,200 + 300.
    ŷ = $4,500 (extrapolation — less reliable)
  4. 4

    Step 4 — Explain the limitation

    While the $1,740 prediction is supported by data near x = 120, the $4,500 prediction assumes the linear trend continues unchanged up to $350 in spending. In reality, there may be diminishing returns on advertising—at some point, spending more doesn't bring in proportionally more revenue. This is why the extrapolated prediction should be treated with caution.

SECTION 7

Strengths & Limitations of Linear Predictions

Linear models are powerful and easy to use, but they aren't perfect. Knowing when a linear model shines—and when it falls short—is a critical skill in statistics. The table below outlines the main strengths and limitations you should keep in mind every time you use a linear model to make a prediction.

StrengthsLimitations
Easy to calculate and understand — just plug in x.Assumes the relationship is perfectly linear, which real data often isn't.
Interpolated predictions are usually close to actual values.Extrapolated predictions can be wildly inaccurate, especially far from the data.
Identifies the direction and rate of a trend quickly.Cannot capture curves, plateaus, or turning points in the data.
Works well as a first approximation for many real-world relationships.The y-intercept may have no meaningful real-world interpretation.

Strengths vs. Limitations of Linear Models

💡

REMEMBER THIS

A linear model is like a weather forecast: it's most accurate for the near term (interpolation) and becomes less reliable the further out you go (extrapolation). A one-day forecast is usually pretty good, but a 30-day forecast? Not so much. Always state whether your prediction is based on interpolation or extrapolation so your audience knows how much to trust it.

SECTION 8

Connection to Advanced Models

Linear models are the starting point, but statistics offers more sophisticated tools for situations where a straight line doesn't fit. As you advance in math, you'll encounter models that can handle curves, multiple variables, and complex real-world phenomena. The table below gives a brief preview of how the ideas from this lesson extend into more advanced territory.

Concept in This LessonAdvanced Extension
Line of best fit (y = mx + b)Multiple regression — uses two or more independent variables (e.g., ŷ = a + b₁x₁ + b₂x₂)
Linear trend onlyPolynomial & exponential regression — fits curves, not just straight lines, to data that bends or accelerates
Interpolation vs. extrapolation (judgment call)Confidence & prediction intervals — statistical ranges that quantify how uncertain each prediction is
Visual inspection of scatter plotResidual analysis — plotting prediction errors to check whether a linear model is appropriate

From Linear Basics to Advanced Modeling

Even with all these advanced tools, the core idea you've learned today remains central: predictions inside your data range are more trustworthy than predictions outside it. That principle applies whether you're fitting a straight line in Grade 9 or building a neural network in college. Mastering the basics now gives you a strong foundation for everything ahead.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A researcher collects data on daily temperatures from June 1 to August 31. She builds a linear model from this data and uses it to predict the temperature on December 25. Is this prediction an example of interpolation or extrapolation? Explain why.
Show answer
This is extrapolation because December 25 is far outside the data range of June 1 to August 31. The linear model was built to capture the temperature trend during summer months, and it has no information about fall or winter temperatures. The real pattern almost certainly changes (temperatures drop in autumn), so this prediction would be unreliable.

Question 2: BASIC CALCULATION

The linear model for the relationship between the number of hours a car has been driven (x) and its remaining fuel in gallons (y) is ŷ = −0.04x + 15. The data was collected for driving times between 0 and 300 hours. Predict the remaining fuel after 150 hours of driving.
Show answer
Since 0 ≤ 150 ≤ 300, this is interpolation. Substituting into the model: ŷ = −0.04(150) + 15 = −6 + 15 = 9 gallons. This prediction is reliable because 150 falls within the data range. The negative slope (−0.04) tells us the car uses 0.04 gallons per hour of driving.

Question 3: INTERMEDIATE

A fitness tracker collects data showing the relationship between weeks of training (x) and the number of push-ups a person can do (y). The linear model is ŷ = 3.2x + 10, based on data from weeks 1 through 12. (a) Predict the number of push-ups at week 8. (b) Predict the number at week 25. (c) Identify which prediction is interpolation and which is extrapolation, and explain any concerns with the less reliable prediction.
Show answer
(a) At week 8: ŷ = 3.2(8) + 10 = 25.6 + 10 = 35.6 push-ups (interpolation, since 1 ≤ 8 ≤ 12). (b) At week 25: ŷ = 3.2(25) + 10 = 80 + 10 = 90 push-ups (extrapolation, since 25 > 12). The week-25 prediction is concerning because physical improvement typically plateaus over time. A person's body can't keep adding 3.2 push-ups per week indefinitely, so the model likely overestimates performance at week 25.

Question 4: APPLIED

A city collects data on population (in thousands) from the year 2000 to 2020. The resulting linear model is ŷ = 2.5x + 80, where x is the number of years after 2000. A city planner uses this model to budget for the year 2045. (a) Calculate the predicted population. (b) Is this interpolation or extrapolation? (c) Give two real-world reasons why this prediction might be inaccurate.
Show answer
(a) For 2045, x = 45: ŷ = 2.5(45) + 80 = 112.5 + 80 = 192.5 thousand. (b) This is extrapolation because x = 45 is well beyond the data range of x = 0 to x = 20. (c) First, population growth often slows due to limited housing, jobs, or resources—a curve that levels off, not a straight line. Second, unforeseen events like economic downturns, natural disasters, or policy changes can dramatically shift population trends. A prediction 25 years beyond the data should be treated as a rough estimate, not a guarantee.

Question 5: CRITICAL THINKING

Two students use the same linear model, ŷ = −5x + 100, built from data where x ranges from 2 to 14. Student A says: "At x = 22, the model predicts ŷ = −10. This means the quantity goes negative." Student B says: "That prediction is meaningless because the model doesn't apply there." Who is correct, and what does this situation reveal about the limitations of extrapolation?
Show answer
Student B is correct. While the math gives ŷ = −5(22) + 100 = −10, predicting at x = 22 is extrapolation (22 > 14), and in most real-world contexts a negative quantity (e.g., negative population, negative distance) is impossible. This reveals a fundamental limitation of extrapolation: linear models assume a constant rate of change forever, but real-world relationships have natural boundaries. The model works fine within the data range but produces nonsensical results when pushed too far. This is why it's essential to check whether a prediction is reasonable in context, not just whether the arithmetic is correct.

SUMMARY

Lesson Summary

Summary

A linear model of the form ŷ = mx + b captures the trend in a scatter plot and allows you to predict the value of the dependent variable for any given x. When the x-value falls within the range of the original data, the prediction is called interpolation and is generally reliable. When the x-value falls outside the range of the original data, the prediction is called extrapolation and carries greater risk because the real-world pattern may change beyond the observed values.

Key limitations to remember: linear models assume a constant rate of change, cannot capture curves or plateaus, and the y-intercept may not have a meaningful real-world interpretation. Always identify whether a prediction uses interpolation or extrapolation, and consider whether the result is reasonable in context. These skills form the foundation for more advanced statistical modeling.

Varsity Tutors • Grade 9 Math • Predictions with Linear Models