Unit 5 · Topic 5.3 Beta

Linear Regression Models

A regression line y-hat = a + bx predicts the response from the explanatory variable.

Practice 3: Analyze DataPractice 4: Interpret Results

Part 1 · Hook

Why this matters

The sleep data show a strong, negative, linear pattern. A coach wants more than a description: if a player slept 6.8 hours, what reaction time should she expect? A line through the points answers that. Its equation, y^=391.1−11.37x\hat{y} = 391.1 - 11.37x, turns a scatterplot into a prediction machine, as long as it is used with care.

Part 2 · Before you start

What this builds on

Part 3 · Prerequisite check

Quick check before you start

1. What is the slope of y=12−3xy = 12 - 3x?

  1. −3-3
  2. 1212
  3. 33
  4. −12-12
Show the answer

In y=a+bxy = a + bx, the slope is the coefficient of xx.

  • Correct: −3-3:
  • 1212:
  • 33:
  • −12-12:

2. For y=12−3xy = 12 - 3x, what is yy when x=2x = 2?

  1. 66
  2. 1818
  3. 1010
  4. −6-6
Show the answer

12−3(2)=612 - 3(2) = 6.

  • Correct: 66:
  • 1818:
  • 1010:
  • −6-6:

3. Which variable goes on the horizontal axis of a scatterplot?

  1. The explanatory variable
  2. The response variable
  3. The larger variable
  4. Either, always
Show the answer

Explanatory on xx, response on yy.

  • Correct: The explanatory variable:
  • The response variable:
  • The larger variable:
  • Either, always:

Part 4 · See it

See it first

The sleep and reaction time scatterplot with the regression line, predicted time = 391.1 minus 11.37 times hours; dashed lines go up from 6.8 hours to the line and across to a predicted reaction time of 314 milliseconds.
The regression line for the sleep data. Go up from 6.8 hours to the line, then across: a predicted reaction time of about 314 milliseconds. LevlPrep original diagram.

Part 5 · Step by step

How it works, step by step

  1. A scatterplot shows a linear patterna line y^=a+bx\hat{y} = a + bx can summarize it and predict yy from xx
  2. Substitute a value of xxthe result y^\hat{y} is a predicted value: typical for that xx, not exact for any one individual
  3. The slope bb is the change in y^\hat{y} per one-unit increase in xxinterpret it as "for each additional ..., the predicted ... increases (decreases) by about |b||b| ..."
  4. The line was fit only to the xx values in the datapredicting far outside that range (extrapolation) can give nonsense, and the intercept means something only when x=0x = 0 is reasonable

Part 6 · Key ideas

Key ideas

  • A regression line y^=a+bx\hat{y} = a + bx gives predicted values y^\hat{y} of the response for values of the explanatory variable.
  • Slope: "For each additional [unit of xx], the predicted [yy] increases (decreases) by about |b||b| [units of yy]."
  • Intercept: "When [xx] is 0, the predicted [yy] is aa." Interpret it only when x=0x = 0 makes sense.
  • Extrapolation, predicting outside the range of the data, is unreliable.

Part 7 · Misconception

A common mistake

The wrong idea: The slope says exactly how much each individual's yy changes when xx goes up by 1.

What actually happens: The slope describes the predicted value, the average trend. Individuals scatter around the line, so always say "the predicted ..." when you interpret it.

Part 8 · Check yourself

Check yourself

Exam-style questions. Anything you miss goes into your review queue.

Graph

Sleep and reaction time, with a regression line

For 14 student volunteers, the regression line for predicting reaction time (milliseconds) from hours of sleep the night before is y^=391.1−11.37x\hat{y} = 391.1 - 11.37x. The students slept from 4.5 to 9.5 hours. (Invented data.)
45678910280300320340hours of sleepreaction time (ms)

1. What reaction time does the line predict for a student who slept 6.8 hours?

  1. About 77 milliseconds
  2. About 468 milliseconds
  3. About 314 milliseconds
  4. About 391 milliseconds
Show the answer

Substitute x=6.8x = 6.8 into the equation.

  • About 77 milliseconds: That is only the slope times 6.8. Add it to the intercept with its sign: 391.1−77.3391.1 - 77.3.
  • About 468 milliseconds: That adds the slope term. The slope is negative, so subtract.
  • Correct: About 314 milliseconds: Right: y^\hat{y}=391.1−11.37(6.8)= 391.1 - 11.37(6.8)=313.8= 313.8.
  • About 391 milliseconds: That is the intercept, the prediction for 0 hours of sleep.

2. Which is the correct interpretation of the slope?

  1. For each extra hour of sleep, predicted reaction time drops by about 11.4 ms
  2. A student who slept 0 hours is predicted to react in 391 milliseconds
  3. For each millisecond of reaction time, predicted sleep decreases by 11.4 hours
  4. For each additional hour of sleep, reaction time decreases by exactly 11.4 milliseconds
Show the answer

Slope: "for each additional [unit of xx], the predicted [yy] increases (decreases) by about |b||b| [units of yy]".

  • Correct: For each extra hour of sleep, predicted reaction time drops by about 11.4 ms: Right: the slope is the predicted change in yy for each one-unit increase in xx, in context.
  • A student who slept 0 hours is predicted to react in 391 milliseconds: That describes the intercept, and 0 hours is far outside the data.
  • For each millisecond of reaction time, predicted sleep decreases by 11.4 hours: The line predicts reaction time from sleep, not the other way round.
  • For each additional hour of sleep, reaction time decreases by exactly 11.4 milliseconds: The line gives predictions, not exact changes for each student. Say "predicted".

3. The line predicts a reaction time of about 243 milliseconds for a student who sleeps 13 hours. How much should this prediction be trusted?

  1. Hardly, because predictions do not work for one person
  2. Very little: 13 hours is far outside the data, so it is extrapolation
  3. Fully, because the equation gives a number
  4. Fully, because the association between sleep and reaction time is strong
Show the answer

Extrapolation: predicting outside the range of xx values in the data.

  • Hardly, because predictions do not work for one person: Predictions inside the data range are reasonable for typical students. The problem is extrapolating.
  • Correct: Very little: 13 hours is far outside the data, so it is extrapolation: Right: no one in the data slept that long, so there is no reason to think the linear trend continues there.
  • Fully, because the equation gives a number: Any xx gives a number; that does not make the prediction sensible.
  • Fully, because the association between sleep and reaction time is strong: A strong association inside the data says nothing about values far outside it.

Table

Used phone prices

A resale site fits a regression line to 60 listings of one phone model, aged 0 (new, unopened) to 6 years: price^\widehat{\text{price}}=620−95(age)= 620 - 95(\text{age}), with price in dollars and age in years. (Invented data.)
The regression line
TermValueMeaning
Intercept620predicted price at age 0
Slope−95-95change in predicted price per year of age

4. Interpret the slope in context.

Write the conclusion in context.

Show the answer

Slope: predicted change in yy per one-unit increase in xx.

  • A full-credit answer: For each additional year of age, the predicted resale price of this phone model decreases by about 95 dollars.

5. Write the expression for the predicted price of a 3.5-year-old phone, then evaluate it.

Type the expression as on the exam, with the values substituted.

Show the answer

price^\widehat{\text{price}}=620−95(3.5)= 620 - 95(3.5)=287.5= 287.5 dollars.

  • Answer: 620−95⋅3.5620 - 95 \cdot 3.5

6. A regression line has slope 2.5 and passes through the point (4,30)(4, 30). What is its equation?

  1. y^=40+2.5x\hat{y} = 40 + 2.5x
  2. y^=30+2.5x\hat{y} = 30 + 2.5x
  3. y^=4+2.5x\hat{y} = 4 + 2.5x
  4. y^=20+2.5x\hat{y} = 20 + 2.5x
Show the answer

Substitute the point into y^=a+bx\hat{y} = a + bx and solve for aa.

  • y^=40+2.5x\hat{y} = 40 + 2.5x: Subtract 10 from 30, do not add it.
  • y^=30+2.5x\hat{y} = 30 + 2.5x: That uses the yy value as the intercept. Solve 30=a+2.5(4)30 = a + 2.5(4).
  • y^=4+2.5x\hat{y} = 4 + 2.5x: That uses the xx value as the intercept.
  • Correct: y^=20+2.5x\hat{y} = 20 + 2.5x: Right: 30=a+2.5(4)30 = a + 2.5(4), so a=30−10=20a = 30 - 10 = 20.

Part 9 · Summary

Summary

A regression line y^=a+bx\hat{y} = a + bx predicts the response from the explanatory variable. Interpret the slope as the predicted change in yy for each one-unit increase in xx, and the intercept as the predicted yy at x=0x = 0 when that makes sense, always in context and with "predicted". Do not extrapolate beyond the data.

Part 10 · Up next

What comes next

Part 11 · Connections

Connections