Where Did Linear Models Come From?
People have always looked at numbers and tried to spot patterns. Centuries before smartphones or computers, scientists were collecting measurements and asking: "Is there a rule connecting these two things?" Linear models — equations that draw straight lines through data — grew out of that curiosity.
The big question these mathematicians were chasing is the same one you'll answer in this lesson: When two quantities seem connected, how can we write an equation that describes the connection — and then use that equation to make predictions?
Core Principles & Definitions
Before we start solving problems, let's nail down the key vocabulary. Each idea below is a building block you'll need for the rest of the lesson.
Bivariate Data
Scatter Plot
Line of Best Fit
Linear Equation: y = mx + b
Seeing It: A Scatter Plot with a Line of Best Fit
Imagine a class of students. We recorded how many hours each student studied and the score they earned on a test. The scatter plot below shows those data points along with the line of best fit: y = 8x + 45.
Look at the purple dots. They don't all land on the line — real data is always a little messy. But the line captures the overall trend: as study hours go up, test scores go up too. The slope triangle on the graph shows that for every 1 extra hour of studying, the score rises by about 8 points. The y-intercept (45) is where the line crosses the y-axis. It tells us the predicted score for a student who studies 0 hours.
The Math: Slope, Intercept & Prediction
Let's break the equation into pieces so you know exactly what each part does.
What Is the Slope (m)?
The slope is the rate of change. It answers: "How much does y change every time x goes up by 1?" A positive slope means the line goes uphill (both variables increase together). A negative slope means the line goes downhill (as one variable increases, the other decreases).
In the study-hours example, m = 8. That means: for every additional hour of studying, the model predicts a student's score increases by 8 points. Always include the units when you interpret slope in context!
What Is the Y-Intercept (b)?
The y-intercept is the value of y when x equals 0. It's where the line meets the y-axis. In context, it often represents a starting value before the other variable kicks in.
In our example, b = 45. That means: if a student studies 0 hours, the model predicts a score of 45 points. Sometimes the y-intercept makes perfect sense in real life, and sometimes it's just a mathematical starting point. Always ask yourself: "Does x = 0 make sense in this situation?"
Making a Prediction
Once you have the equation, plug in any x-value to predict y.
y = 2x + 3.Deeper Look: Positive, Negative & Zero Slopes
Not every linear model goes uphill. The slope tells a story about the direction of the relationship. Let's look at three possibilities side by side.
| Slope Sign | Direction | Real-World Example | Interpretation |
|---|---|---|---|
| Positive (m > 0) | Line goes up | More practice → higher free-throw % | As x increases, y increases |
| Negative (m < 0) | Line goes down | More screen time → lower sleep hours | As x increases, y decreases |
| Zero (m = 0) | Line is flat | Shoe size vs. test score (no connection) | Changes in x don't affect y |
When you interpret slope in a word problem, always connect it to the units of x and y. Don't just say "the slope is 8." Say "the slope is 8 points per hour." That phrase — "y-units per x-unit" — is the secret to a great interpretation.
Likewise, for the y-intercept, state what it means when x is 0 in the context of the problem. If x is "weeks of training" and b = 20, you might say: "Before any training (week 0), the model predicts a starting value of 20."
Worked Example
Let's walk through a complete problem from start to finish.
y = −0.6x + 60, where x is the temperature and y is the number of cups sold. (a) What does the slope mean in this context? (b) What does the y-intercept mean? (c) Predict how many cups will be sold when it's 35 °F outside.Strengths & Limitations of Linear Models
Linear models are incredibly useful, but they're not perfect. Here's an honest look at when they shine and when they struggle.
| Strengths ✓ | Limitations ✗ |
|---|---|
| Simple to create and understand | Only works well when the data's trend is roughly straight |
| Quick predictions — just plug in a number | Predictions far outside the data range can be unreliable (called extrapolation) |
| Slope and intercept have clear real-world meanings | The y-intercept might not make sense in context (e.g., 0 hours of sleep → impossible score) |
| Works across many subjects: science, sports, economics | Ignores curved patterns — some data bends, and a line will miss that curve |
Interpolation vs. Extrapolation: When you predict a y-value for an x within the range of your data, that's called interpolation — and it's usually pretty reliable. When you predict outside the data range, that's extrapolation. Extrapolation is riskier because you're assuming the trend continues, and it might not.
Looking Ahead: Where Does This Lead?
The linear model you're learning now is the starting point for some incredibly powerful ideas you'll see in high school and beyond. Here's a quick preview.
| What You're Learning Now | What Comes Next |
|---|---|
| Line of best fit drawn by eye or given to you | Least-squares regression — a formula that finds the exact best line automatically |
| y = mx + b (one straight line) | Multiple regression — equations with two or more input variables (like hours studied and sleep) |
| Interpreting slope as a rate of change | Calculus — slope of a curve at a single point (called a derivative) |
| Scatter plots with dots | Correlation coefficient (r) — a number from −1 to +1 that tells you how tightly the dots follow the line |
You don't need to worry about any of that right now. The big idea is that mastering y = mx + b gives you a foundation that connects to almost every math and science class you'll ever take.
Practice Problems
Try these on your own, then click "Show Answer" to check your work. The problems get harder as you go — that's on purpose!
y = 5x + 20, which number is the slope and which is the y-intercept? What does each one tell you about the data?y = 2.5x + 3, where x is the number of weeks and y is the height in centimeters. How tall does the model predict the plant will be after 6 weeks?y = 4.2x + 50. Interpret the slope and the y-intercept in the context of this situation.y = −8x + 100, where x is the number of hours since a full charge and y is the battery percentage remaining. (a) What does the slope tell you? (b) After how many hours will the battery reach 20%? (c) Does the y-intercept make sense here? Why?y = 3x + 65. Student B's model is y = 5x + 55. (a) Which student's data shows a stronger connection between reading and quiz scores? Explain. (b) For how many books read will both models give the same predicted score? What is that score?Lesson Summary
A linear model is an equation of the form y = mx + b that describes the trend in bivariate data — data where two measurements are paired together. The slope (m) tells you the rate of change: how much y changes for every 1-unit increase in x, always stated with units in context. The y-intercept (b) tells you the starting value — what y equals when x is 0. To make a prediction, substitute your x-value into the equation and simplify. A positive slope means the variables increase together; a negative slope means one goes up while the other goes down. Always interpret these numbers in context using the units from the problem.
Remember that predictions within the data range (interpolation) are more trustworthy than predictions outside it (extrapolation). Linear models are powerful, simple, and the foundation for much of the statistics and data science you'll encounter in the future.