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.

15 min read

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 y=mx+by = mx + b, where xx and yy 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 mm: the number that multiplies xx, which sets how steeply the line rises or falls
  • the y-intercept bb: the number added on, which is the value of yy when x=0x = 0

Here is a small data set to work with. Six students each reported how long they studied for a quiz. Let xx be the number of hours a student studied (the data cover x=0x = 0 to x=5x = 5 hours). Let yy be that student's quiz score in points.

Their teacher chose the linear model y=5x+60y = 5x + 60 to describe the pattern. The value that the equation gives for a chosen xx 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.

Six students' quiz data beside the model's predicted scores
Hours studied (x)Actual score (points)Predicted score from the model (points)
00
6262
5(0)+60=605(0) + 60 = 60
11
6464
5(1)+60=655(1) + 60 = 65
22
7171
5(2)+60=705(2) + 60 = 70
33
7373
5(3)+60=755(3) + 60 = 75
44
8080
5(4)+60=805(4) + 60 = 80
55
8686
5(5)+60=855(5) + 60 = 85

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: 60,65,70,75,80,8560, 65, 70, 75, 80, 85. Each time xx 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 yy for each increase of 1 unit in xx. Its unit is the unit of yy per unit of xx, 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 y=mx+by = mx + b. Compare its prediction at some xx with its prediction at x+1x + 1, one unit higher, by subtracting.

Multiplying out m(x+1)m(x + 1) gives mx+mmx + m. Subtracting the prediction at xx takes away both of its terms, mxmx and bb. Since mx−mx=0mx - mx = 0 and b−b=0b - b = 0, only mm is left. These steps only multiply, add and subtract, so they hold for every xx and for every slope. With a negative slope such as m=−3m = -3, the prediction goes down by 3 for each extra unit of xx.

Here is that subtraction in symbols:

(m(x+1)+b)−(mx+b)=mx+m+b−mx−b=m(m(x + 1) + b) - (mx + b) = mx + m + b - mx - b = m

Worked example

Interpreting a slope

A park planted the same kind of tree in different years. Let xx be the number of years since a tree was planted (the data cover 0 to 10 years) and let yy be the tree's height in meters. A linear model that stays close to the data is y=0.4x+1.2y = 0.4x + 1.2. What does the slope mean?

  1. Find the slope. In the form y = mx + b, the slope is the number that multiplies x.

    m=0.4m = 0.4
  2. 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.

    0.4 meters per year0.4 \text{ meters per year}
  3. Check the meaning with two of the model's predictions that are one year apart. First substitute x = 3 years: multiply, then add.

    0.4(3)+1.2=1.2+1.2=2.40.4(3) + 1.2 = 1.2 + 1.2 = 2.4
  4. Now substitute x = 4 years, so that x has gone up by exactly 1.

    0.4(4)+1.2=1.6+1.2=2.80.4(4) + 1.2 = 1.6 + 1.2 = 2.8
  5. 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.

    2.8−2.4=0.42.8 - 2.4 = 0.4
  6. 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 0.40.4 means that each additional year since planting is associated with a predicted height 0.40.4 meters greater.

Now for the second number. Go back to the quiz table and look at the first row, where x=0x = 0. The predicted score there is 60, because 5(0)+60=0+60=605(0) + 60 = 0 + 60 = 60. 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 yy when x=0x = 0. It is a value of yy, not a rate, so its unit is simply the unit of yy, 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, x=0x = 0 has to make sense. Here it does: a student can study for 0 hours, and the data include one who did. But if xx were a person's height in centimeters, x=0x = 0 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: y=0.4x+1.2y = 0.4x + 1.2, where xx is the number of years since a tree was planted (the data cover 0 to 10 years) and yy is the tree's height in meters. What does the y-intercept mean?

  1. Find the y-intercept. In the form y = mx + b, it is the number added to the x term.

    b=1.2b = 1.2
  2. 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.

    0.4(0)+1.2=0+1.2=1.20.4(0) + 1.2 = 0 + 1.2 = 1.2
  3. Give it a unit. The y-intercept is a value of y, so it takes the unit of y: meters, not meters per year.

    1.2 meters1.2 \text{ meters}
  4. 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 1.21.2 means that the model predicts a height of 1.21.2 meters for a tree that has just been planted, at x=0x = 0 years.

Key concept

What the two numbers in a linear model mean

For a linear model y=mx+by = mx + b that stays close to a set of data:

  • The slope mm is the change in the model's predicted yy for each increase of 1 unit in xx. Its unit is the unit of yy per unit of xx. A negative slope means the prediction goes down as xx goes up.
  • The y-intercept bb is the model's predicted yy when x=0x = 0. Its unit is the unit of yy. Read it as a real value when x=0x = 0 makes sense in the situation and the data reach x=0x = 0 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 xx causes yy. So say predicted and is associated with.

predicted y=m⏟change per 1 unit of x⋅x+b⏟value when x=0\text{predicted } y = \underbrace{m}_{\text{change per 1 unit of } x} \cdot x + \underbrace{b}_{\text{value when } x = 0}

Worked example

A negative slope and a y-intercept to question

A drama club sold tickets at a different price each night. Let xx be the ticket price in dollars (the prices in the data run from 4 to 10 dollars) and let yy be the number of tickets sold that night. A linear model that stays close to the data is y=−15x+230y = -15x + 230. Interpret the slope and the y-intercept.

  1. 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.

    m=−15 tickets per dollar,b=230 ticketsm = -15 \text{ tickets per dollar}, \quad b = 230 \text{ tickets}
  2. Check the slope with two prices that are one dollar apart. First substitute x = 6 dollars.

    −15(6)+230=−90+230=140-15(6) + 230 = -90 + 230 = 140
  3. 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.

    −15(7)+230=−105+230=125,125−140=−15-15(7) + 230 = -105 + 230 = 125, \qquad 125 - 140 = -15
  4. 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.

    −15(0)+230=0+230=230-15(0) + 230 = 0 + 230 = 230
  5. 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 −15-15 means each additional dollar of price is associated with a predicted 15 fewer tickets sold. The y-intercept 230230 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 yy changes for each increase of 1 unit in xx, in units of yy per unit of xx. The y-intercept tells you the model's predicted yy when x=0x = 0, in units of yy. Read it as a real value when x=0x = 0 makes sense in the situation and the data reach x=0x = 0 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.