MATH 1 • MODELING & APPLICATIONS

Building Linear Models from Data — I can build a linear model from data and justify the choice of model.

Learn to turn real-world data into linear equations and explain why a straight line is the right fit.

Historical Context & Motivation

Humans have been collecting data and searching for patterns in it for centuries. Long before calculators or computers existed, scientists, astronomers, and economists plotted measurements on paper and tried to draw the simplest curve that captured the overall trend. The idea of fitting a linear model — a straight line — to a set of data points grew out of this quest to summarize messy, real-world observations with a clean mathematical relationship.

1637
Descartes Introduces Coordinate Geometry
René Descartes published his coordinate system, making it possible to represent algebraic relationships as geometric shapes on a plane. This laid the groundwork for graphing data.
1805
Legendre Publishes the Method of Least Squares
Adrien-Marie Legendre formalized a technique for finding the straight line that minimizes the total squared distance from each data point — the foundation of modern regression.
1885
Galton's Regression to the Mean
Francis Galton studied heights of parents and children, discovering that extreme values tend to 'regress' toward the average. He coined the term 'regression,' which we still use today for fitting lines to data.
1960s–Present
Computers Automate Line Fitting
Digital computers made it fast and easy to calculate best-fit lines for enormous data sets. Today, every graphing calculator and spreadsheet app can produce a linear regression in seconds.

The central question this lesson addresses is straightforward but powerful: when you collect a set of data, how do you decide that a straight line is the right type of equation to describe it, and once you make that decision, how do you actually build the equation? By the end of this lesson, you will be able to do both — construct a linear model and defend your choice.

Core Principles & Definitions

Before you start building a model, you need a clear understanding of several foundational ideas. A mathematical model is an equation or function that approximates a real-world relationship. When that equation takes the form y = mx + b, we call it a linear model. The following cards summarize the core concepts you will rely on throughout this lesson.

1

Scatter Plot

A graph that displays individual data points as dots on a coordinate plane. This is always your first step — it reveals the overall shape and direction of the data.
2

Trend & Correlation

A trend is the general direction the data follows. If the points roughly follow a straight path, the data shows a linear correlation — positive (upward) or negative (downward).
3

Line of Best Fit

A straight line drawn through a scatter plot so that it comes as close as possible to all the data points. It balances the points above and below the line.
4

Residuals

The vertical distance between each data point and the line of best fit. Small, randomly scattered residuals suggest the linear model is a good fit.
5

Justification

Explaining why a linear model is appropriate — citing a roughly constant rate of change, a linear-looking scatter plot, and small residuals without a pattern.
KEY TAKEAWAY
Think of a linear model like a long ruler placed on top of a trail of breadcrumbs. The breadcrumbs (data points) will never line up perfectly, but if the ruler captures the general direction, you have a useful model. The key is that each step forward adds roughly the same amount of change — that constant rate is what makes the relationship linear.

Visual Explanation — From Scatter Plot to Line

The diagram below shows a scatter plot of data representing the relationship between hours spent studying and test scores. Notice how the data points cluster around a straight line, and the line of best fit passes through the middle of the cloud of points so that the vertical gaps (residuals) are as small as possible.

The violet dots are individual data points. The cyan line is the line of best fit (y = 7.5x + 30). The pink dashed segments show residuals — the vertical distance from each point to the line.

In the diagram, notice three important features. First, the data points form a roughly straight-line pattern — they do not curve upward or level off. Second, the line of best fit passes through the center of the point cloud, with some points above and some below. Third, the residuals (pink dashes) are short and do not show a curved pattern — they look randomly scattered. All three observations support choosing a linear model.

Mathematical Framework

A linear model has the familiar slope-intercept form. The two parameters you need to determine are the slope (m) and the y-intercept (b). The slope tells you how much y changes for every one-unit increase in x, while the y-intercept is the predicted value of y when x equals zero.

SLOPE-INTERCEPT FORM
y = mx + b
m = slope (rate of change), b = y-intercept (starting value)
SLOPE FROM TWO POINTS
m = (y₂ − y₁) / (x₂ − x₁)
(x₁, y₁) and (x₂, y₂) are two representative points on or near the line of best fit.
FINDING THE Y-INTERCEPT
b = y₁ − m × x₁
After computing m, substitute one of the two points to solve for b.

When you use a graphing calculator or spreadsheet to run a linear regression, the technology uses the least-squares method to find the exact m and b that minimize the sum of the squared residuals. By hand, however, you can estimate the line by choosing two representative points on the scatter plot, calculating the slope, and then solving for b. Both approaches produce a usable model — the calculator version is simply more precise.

RESIDUAL
residual = y_observed − y_predicted
A positive residual means the point is above the line; a negative residual means it is below. Small, randomly distributed residuals indicate a good fit.

Justifying the Choice of a Linear Model

Building the equation is only half the task. You also need to justify why a linear model is appropriate for your data. The diagram below illustrates three common scatter-plot shapes and shows which type of model each one suggests.

Left panel (amber): data that follows a straight path — a linear model is appropriate. Middle panel (violet): data that curves like a parabola — a quadratic model would be better. Right panel (pink): data that grows faster and faster — an exponential model is needed.

To justify a linear model, you should check three things. First, the scatter plot should show points that cluster along a straight path, not a curve. Second, the rate of change between successive data points should be roughly constant — the y-values should increase (or decrease) by about the same amount for each equal step in x. Third, a residual plot (a graph of the residuals versus x) should show points randomly scattered above and below zero with no obvious curve or fan shape.

  • Scatter plot check: Do the points follow a straight-line path?
  • Rate-of-change check: Are the differences in y roughly equal for equal intervals of x?
  • Residual check: Are the residuals randomly scattered with no pattern?

Worked Example — Building a Linear Model

A student measures the temperature (°F) of a cup of hot chocolate as it cools. She records the temperature every 5 minutes. Here is her data:

Hot chocolate cooling data
Time (min)Temperature (°F)
0180
5168
10155
15144
20132
25121
Building a Linear Model for Cooling Data
1
Step 1 — Plot the Data and Assess the ShapePlot the six data points on a scatter plot with time on the x-axis and temperature on the y-axis. The points appear to fall along a straight line sloping downward. This suggests a negative linear relationship.
2
Step 2 — Check the Rate of ChangeCalculate the change in temperature for each 5-minute interval: 180 → 168 (−12), 168 → 155 (−13), 155 → 144 (−11), 144 → 132 (−12), 132 → 121 (−11). The drops range from −11 to −13, which is roughly constant. This supports using a linear model.
Average rate of change ≈ −11.8 °F per 5 min
3
Step 3 — Choose Two Representative PointsSelect two points that sit close to the overall trend. We'll use (0, 180) and (25, 121) because they span the full range of the data.
4
Step 4 — Calculate the Slopem = (y₂ − y₁) / (x₂ − x₁) = (121 − 180) / (25 − 0) = −59 / 25 = −2.36. The temperature drops about 2.36 °F per minute.
m = −2.36
5
Step 5 — Solve for the Y-InterceptUsing the point (0, 180): b = y₁ − m × x₁ = 180 − (−2.36)(0) = 180.
b = 180
6
Step 6 — Write the Model and JustifyThe linear model is T = −2.36t + 180, where T is temperature in °F and t is time in minutes. Justification: the scatter plot shows a straight-line pattern, the rate of change is approximately constant (about −12 °F every 5 minutes), and the data does not curve. Therefore a linear model is appropriate over this time interval.
T = −2.36t + 180

Strengths and Limitations of Linear Models

Linear models are powerful, but they are not always the best choice. Understanding when a linear model works well — and when it breaks down — is essential for making good modeling decisions.

Comparing strengths and limitations of linear models
StrengthsLimitations
Simple to calculate and interpret — slope has a clear real-world meaning.Cannot capture curved patterns such as exponential growth or parabolic shapes.
Works well for short-range predictions near the observed data.Extrapolating far beyond the data range often produces unreasonable predictions.
Easy to communicate to non-technical audiences; graphs are intuitive.Sensitive to outliers — a single extreme data point can pull the line off-center.
Technology can quickly compute exact regression coefficients.Assumes a constant rate of change, which many real-world phenomena do not exhibit over long periods.
KEY TAKEAWAY
A linear model is like a snapshot of a moving object — it captures the direction and speed at one moment, but if the object speeds up or changes direction later, the snapshot no longer tells the full story. Always state the domain (the range of x-values) over which your model is valid, and avoid predicting far outside it.

Connection to Advanced Modeling

Linear models are your entry point into a much larger world of mathematical modeling. As you progress through high school and college math, you will encounter situations where the data clearly curves, and you will need more sophisticated tools. The table below previews how linear modeling connects to more advanced techniques.

FeatureLinear Model (This Lesson)Advanced Models (Future Courses)
Equation formy = mx + by = ax² + bx + c (quadratic), y = abˣ (exponential), etc.
Rate of changeConstant — same change in y for each unit change in xVariable — may increase, decrease, or oscillate
Fit methodTwo-point method or linear regression (least squares)Polynomial regression, logistic regression, sinusoidal regression
Goodness of fitResidual analysis, visual inspectionR² value, adjusted R², analysis of variance (ANOVA)

In Math 2 and beyond, you will learn to use the correlation coefficient (r) and the coefficient of determination (r²) to measure precisely how well a linear model fits the data. For now, your ability to inspect a scatter plot, evaluate the rate of change, and examine residuals gives you a solid qualitative toolkit for justifying your model choice.

Practice Problems

PROBLEM 1CONCEPTUAL
A scatter plot shows data points that curve upward like the right half of a U-shape. A classmate suggests using a linear model. Do you agree or disagree? Explain your reasoning using at least two criteria for choosing a linear model.
PROBLEM 2BASIC CALCULATION
Using the two points (2, 15) and (8, 45), find the equation of the line in slope-intercept form.
PROBLEM 3INTERMEDIATE
A data set contains the points (1, 22), (3, 30), (5, 37), (7, 46), and (9, 53). Build a linear model by selecting two representative points, write the equation, and then use it to predict the y-value when x = 12. Comment on whether you trust this prediction.
PROBLEM 4APPLIED
A small business tracks its monthly revenue (in thousands of dollars) over six months: Month 1 = $12k, Month 2 = $14.5k, Month 3 = $17k, Month 4 = $19k, Month 5 = $21.5k, Month 6 = $24k. Build a linear model, interpret the slope in context, and predict the revenue for Month 10. State any assumptions you are making.
PROBLEM 5CRITICAL THINKING
Two students each build a linear model for the same data set. Student A uses points at the extremes of the data and gets y = 4.2x + 3. Student B runs a linear regression on a calculator and gets y = 3.9x + 4.1. Their models give different predictions for x = 20. Explain why the two models differ, discuss which is likely more reliable, and describe a scenario in which Student A's approach could actually produce a misleading model.

Lesson Summary

A linear model uses the equation y = mx + b to describe data that follows a straight-line pattern. To build one, start by creating a scatter plot, then select two representative points (or use a calculator's linear regression feature) to find the slope and y-intercept. The slope tells you the constant rate of change, and the y-intercept is the predicted starting value.

To justify choosing a linear model, verify three things: the scatter plot shows a straight-line trend, the rate of change is approximately constant, and the residuals are small and randomly scattered. Remember that linear models have limitations — they work best within the observed data range and assume the trend continues unchanged. Always state the domain over which your model applies.

Varsity Tutors • Math 1 • Building Linear Models from Data