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
1809 • Gauss Refines Regression
1886 • Galton Coins 'Regression'
1900s–Today • Linear Models Everywhere
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.
Linear Model (Line of Best Fit)
Interpolation
Extrapolation
Domain of the Data
KEY TAKEAWAY
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.
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)
ŷ = 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
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
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!
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.
| Feature | Interpolation | Extrapolation |
|---|---|---|
| x-value location | Within the range of the original data | Outside the range of the original data |
| Reliability | Generally reliable | Less reliable, riskier |
| Example | Predicting score at 5 study hours when data spans 2–9 hours | Predicting score at 15 study hours when data spans 2–9 hours |
| Key risk | Data scatter may cause small errors | The 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
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
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
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
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.
| Strengths | Limitations |
|---|---|
| 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
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 Lesson | Advanced 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 only | Polynomial & 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 plot | Residual 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
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
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.