Unit 5 · Topic 5.3 · about 20 minutes
AP Statistics 5.3: Linear Regression Models
Use a linear regression model to calculate a predicted response, and judge whether that prediction can be trusted.
Unit 5: 10 to 20% of the multiple-choice section
What you'll be able to do
- Calculate a predicted response value using a linear regression model.
Key vocabulary
| Term | What it means | The exam trap |
|---|---|---|
| Linear regression model | A linear equation, , that uses the explanatory variable to predict the response variable , where is the y-intercept and is the slope. | Fitting one to curved data, like the typing speeds, gives a line that misses in the same direction over whole stretches of the data. |
| Predicted value | The response value the model gives for a value of . Plain is a value that was actually observed. | Writing where belongs turns a prediction into a claim about an observed value. |
| Interpolation | Predicting the response for an -value inside the interval of -values used to build the model. | Being close to the edge does not make it extrapolation: 1,150 square feet is still inside data that run from 1,100 to 3,200. |
| Extrapolation | Predicting the response for an -value beyond the interval of -values used to build the model. The further out, the less reliable the prediction. | Even with , the sedan line says a 20-year-old car is worth thousand dollars, because a strong fit inside the data says nothing outside it. |
Predict first
A line fits the 14 used sedans from 5.1 Graphical Representations Between Two Quantitative Variables very well: their ages run from 1 to 10 years, and . A neighbor wants to use the same line to price her own sedan of that model, which is 20 years old. How much should she trust the prediction?
A line that predicts
When a scatterplot shows a linear form, you can summarize the relationship with a linear regression model: an equation that uses the explanatory variable to predict the response variable .
Here is the y-intercept, is the slope, and is a value of the explanatory variable. What and mean in context is the subject of 5.5 Least-Squares Regression.
The hat on (say "y-hat") marks a predicted value. Plain is a value that was actually observed. Keep the two apart. The model gives a prediction, and real cars land above it or below it.
The model only makes sense when the form looks linear. A straight line fit to curved data, like the typing speeds in 5.1 Graphical Representations Between Two Quantitative Variables, will miss in the same direction over whole stretches of the data.
The sedans with the model
Price is in thousands of dollars, so a predicted value of 17.03 means about 17,030 dollars.
Making a prediction
To predict, substitute a value of and calculate. For a 6-year-old sedan:
The model predicts an asking price of about 17,030 dollars. Two of the sedans in the data are 6 years old, listed at 16,800 and 17,800 dollars. Neither matches the prediction, and the model never promised that it would. 5.4 Residuals measures how far each real car lands from the line.
Inside the data or outside it
The 14 sedans are 1 to 10 years old. A prediction for an age inside that interval, like 6 years, is interpolation. A prediction for an age outside it, like 20 years, is extrapolation.
Interpolation has data on both sides of it. Extrapolation assumes the straight-line pattern keeps going where nobody collected any data, and patterns often change. Cars lose value quickly at first and more slowly later, so a line fit to younger cars drops below zero long before real prices do. The model hits zero at about 17 years.
The further you extrapolate, the less reliable the prediction. A 12-year-old sedan is a small stretch past the data. A 20-year-old sedan is a leap.
Chirp rate and temperature on 16 summer nights
The data stop at 82 chirps per minute. Everything to the left of that is the line continuing on its own, with no nights to check it against.
Worked examplePredicting temperature from cricket chirps
On 16 summer nights, a student counted how many times a snowy tree cricket chirped in one minute and recorded the temperature. Chirp rates ran from 82 to 184 per minute. The regression line is , where is chirps per minute and is the predicted temperature in degrees Fahrenheit. (a) Predict the temperature on a night with 150 chirps per minute. (b) A cricket in a cold garage chirps 30 times per minute. What does the model predict, and should you trust it?
Identify . The model takes chirps per minute and returns a temperature, so 150 and 30 are values of .
(a) Substitute. . The model predicts about 77.4 degrees. Since 150 is between 82 and 184, this is interpolation.
(b) Substitute. degrees. But 30 chirps per minute is far below anything in the data, so this is extrapolation. The student never recorded a night that cold and has no evidence the line still holds there.
Compare. Trust (a) far more than (b). The arithmetic is equally easy in both; the evidence behind it is not.
(a) About 77.4 degrees, an interpolation. (b) About 48.1 degrees, but 30 chirps per minute is well outside 82 to 184, so this extrapolation is much less reliable.
Check your understanding
A pet store models a hamster's weight (grams) from its age (weeks), using hamsters 3 to 12 weeks old: . What weight does the model predict for an 8-week-old hamster? Give your answer in grams.
A model that predicts a house's sale price from its floor area was built from 60 houses with floor areas between 1,100 and 3,200 square feet. For which house is the prediction an extrapolation?
A model predicts the temperature (degrees Fahrenheit) from the number of cricket chirps per minute, : . What does stand for?
A pediatrician's model predicts a child's height (inches) from age (years), using children aged 2 to 10: . A parent substitutes her own age, 40. Which statement is correct?
A linear regression model predicts nighttime temperature from cricket chirps per minute. The data used to fit it covered chirp rates from 82 to 184 per minute, but no night had between 125 and 130 chirps per minute. Using the model to predict the temperature at 127 chirps per minute is
Exam strategy for this topic
- Section I, Multiple Choice: 42 questions in 90 minutes.
- Section II, Free Response: 4 questions in 90 minutes.
- A graphing calculator with statistical capabilities is expected on both sections.
Questions students ask
What does the hat on mean?
It marks a predicted value, read 'y-hat'. Plain is what actually happened, and real values land above or below the prediction.
Is a prediction inside the data always right?
No, it is the model's prediction, not a promise. Two 6-year-old sedans were listed at 16,800 and 17,800 dollars, while the model predicted about 17,030 for a 6-year-old.
How far outside the data is too far?
There is no fixed cutoff. The further you extrapolate, the less reliable the prediction. With sedans aged 1 to 10 years, a 12-year-old car is a small stretch and a 20-year-old car is a leap.
Why did the sedan model predict a negative price?
The line keeps falling at the same rate forever and reaches zero at about 17 years. Real cars lose value quickly at first and more slowly later, so the straight-line pattern stops matching real prices well past the data.
Can I predict for an -value that no individual in the data had?
Yes, that is what a model is for. No night had 127 chirps per minute, but 127 lies between 82 and 184, so the prediction is interpolation.
Course alignment, for teachers
AP Statistics topic 5.3, Unit 5: Regression Analysis.
- Skill 3.B: Calculate summary statistics, relative positions of points within a distribution, and predicted responses.