Chapter 14 · Statistics and data analysis
Interpreting the Slope and Y-Intercept of a Linear Model
Learn what the slope and the y-intercept of a linear model say about a real situation, using the right units and careful words like predicted and associated.
You already know how to choose a line of best fit: a line that stays close to the data points. It does not have to pass through every point, or even through any of them. (Having points on both sides of the line is a helpful rough guide. It is not a rule that the counts must be equal.)
A linear model is such a line written as an equation of the form , where and stand for the two quantities in the data. The equation itself is exact. Its match to the data is only approximate.
In this lesson you will learn what the two numbers in a linear model say about a real situation:
- the slope : the number that multiplies , which sets how steeply the line rises or falls
- the y-intercept : the number added on, which is the value of when
Here is a small data set to work with. Six students each reported how long they studied for a quiz. Let be the number of hours a student studied (the data cover to hours). Let be that student's quiz score in points.
Their teacher chose the linear model to describe the pattern. The value that the equation gives for a chosen is called a predicted value. The table puts each actual score beside the model's predicted score, so you can judge the fit from the numbers.
| Hours studied (x) | Actual score (points) | Predicted score from the model (points) |
|---|---|---|
First compare the two score columns. Every predicted score is within 2 points of the actual score, but only one matches it exactly. That is an approximate fit: close to the data, not equal to it.
Now read down the predicted column: . Each time goes up by 1 hour, the predicted score goes up by exactly 5 points. That 5 is the slope.
So the slope is a rate. It is the change in the model's predicted for each increase of 1 unit in . Its unit is the unit of per unit of , here points per hour. In this situation:
Each additional hour of study is associated with a predicted quiz score 5 points higher.
The words is associated with mean that the two quantities change together in the data. The data alone cannot show that more study causes a higher score.
Why is the step always the same size? Take any linear model . Compare its prediction at some with its prediction at , one unit higher, by subtracting.
Multiplying out gives . Subtracting the prediction at takes away both of its terms, and . Since and , only is left. These steps only multiply, add and subtract, so they hold for every and for every slope. With a negative slope such as , the prediction goes down by 3 for each extra unit of .
Here is that subtraction in symbols:
Worked example
Interpreting a slope
A park planted the same kind of tree in different years. Let be the number of years since a tree was planted (the data cover 0 to 10 years) and let be the tree's height in meters. A linear model that stays close to the data is . What does the slope mean?
Find the slope. In the form y = mx + b, the slope is the number that multiplies x.
Give it a unit. The slope compares a change in y (meters) with a change of 1 in x (years), so its unit is meters per year.
Check the meaning with two of the model's predictions that are one year apart. First substitute x = 3 years: multiply, then add.
Now substitute x = 4 years, so that x has gone up by exactly 1.
Subtract the earlier prediction from the later one. The predicted height rises by exactly the slope. These are the model's own values, so this arithmetic is exact.
Write the meaning. The slope is positive, so the predicted height goes up. Use the words 'predicted' and 'is associated with': real trees are only close to the line, and the data show a pattern across trees, not proof of a cause.
Answer
The slope means that each additional year since planting is associated with a predicted height meters greater.
Now for the second number. Go back to the quiz table and look at the first row, where . The predicted score there is 60, because . Multiplying by 0 makes the slope term 0, so only the added number is left.
That number is the y-intercept: the model's predicted when . It is a value of , not a rate, so its unit is simply the unit of , here points. In this situation:
The model predicts a quiz score of 60 points for a student who studied 0 hours.
Two cautions go with this reading. First, the y-intercept belongs to the model, and the data are only close to it. The student who studied 0 hours actually scored 62. Second, has to make sense. Here it does: a student can study for 0 hours, and the data include one who did. But if were a person's height in centimeters, would describe nobody, and the y-intercept would only fix where the line sits.
Worked example
Interpreting a y-intercept
Use the tree model again: , where is the number of years since a tree was planted (the data cover 0 to 10 years) and is the tree's height in meters. What does the y-intercept mean?
Find the y-intercept. In the form y = mx + b, it is the number added to the x term.
Confirm it by substituting x = 0. Any number times 0 is 0, so the slope term becomes 0 and only the added number is left.
Give it a unit. The y-intercept is a value of y, so it takes the unit of y: meters, not meters per year.
Ask whether x = 0 makes sense. Here x = 0 means 0 years since planting: a tree that has just gone into the ground. The data include trees like that, so the y-intercept describes something real. It is still the model's value. Real new trees are close to this height, not all exactly at it.
Answer
The y-intercept means that the model predicts a height of meters for a tree that has just been planted, at years.
Key concept
What the two numbers in a linear model mean
For a linear model that stays close to a set of data:
- The slope is the change in the model's predicted for each increase of 1 unit in . Its unit is the unit of per unit of . A negative slope means the prediction goes down as goes up.
- The y-intercept is the model's predicted when . Its unit is the unit of . Read it as a real value when makes sense in the situation and the data reach or close to it. Otherwise it only fixes where the line sits.
Both statements are exact for the line itself. The data lie only near the line, and a pattern in data does not prove that causes . So say predicted and is associated with.
Worked example
A negative slope and a y-intercept to question
A drama club sold tickets at a different price each night. Let be the ticket price in dollars (the prices in the data run from 4 to 10 dollars) and let be the number of tickets sold that night. A linear model that stays close to the data is . Interpret the slope and the y-intercept.
Read off the two numbers and give each a unit. The slope multiplies x and compares tickets with dollars, so its unit is tickets per dollar. The y-intercept is the added number, a value of y, so its unit is tickets.
Check the slope with two prices that are one dollar apart. First substitute x = 6 dollars.
Now substitute x = 7 dollars, then subtract the prediction at 6 dollars from it. The difference is negative, so the model's predicted sales fall by 15 tickets for each extra dollar. Actual nights are only close to the line.
Substitute x = 0 to confirm the y-intercept. The slope term becomes 0, so the model's value at a price of 0 dollars is 230 tickets.
Ask whether x = 0 makes sense. A price of 0 dollars means free tickets. That could happen, but the club never tried it: the lowest price in the data is 4 dollars. So the data give no evidence about how many people would come to a free show.
Answer
The slope means each additional dollar of price is associated with a predicted 15 fewer tickets sold. The y-intercept is the model's value at a price of 0 dollars, but the data only cover 4 to 10 dollars, so do not read it as a real sales figure.
Here is the idea to keep. A linear model has two numbers, and each one answers its own question. The slope tells you how much the model's predicted changes for each increase of 1 unit in , in units of per unit of . The y-intercept tells you the model's predicted when , in units of . Read it as a real value when makes sense in the situation and the data reach or close to it.
The line only stays close to the data, and a pattern is not proof of a cause, so use the words predicted and is associated with. Next, you will use linear models to make predictions, judge when a prediction is reasonable, and find and correct errors in interpretations.