Dove's LibraryDove's Library

5.3 - Linear Regression Models

Overview

When a scatterplot shows a linear form, you can summarize the pattern with a line and use it to make predictions. That line is a linear regression model. This topic covers the equation y^=a+bx\hat{y} = a + bx, how to use it to predict a response, and when a prediction can be trusted (interpolation) or can't (extrapolation).

When a linear model makes sense

If the form of the relationship between xx and yy appears linear, you can approximate it with a linear regression model: a linear equation that uses the explanatory variable xx to predict the response variable yy.
So check the form first (Topic 5.1). A line fit to a curved pattern is wrong in a predictable way, too high in some places and too low in others. Topic 5.4 shows how to check this with residuals. And remember that a model describes the overall trend. Real data points scatter around it.

The regression equation

A linear regression model has the form
y^=a+bx\hat{y} = a + bx
  • y^\hat{y} ("y-hat") is the predicted value of the response variable.
  • aa is the yy-intercept: the predicted value of yy when x=0x = 0.
  • bb is the slope of the regression line: how much the predicted yy changes for each 1-unit increase in xx.
  • xx is the value of the explanatory variable.
This is the only regression formula on the AP formula sheet. Notice the order: AP Statistics writes the intercept first (a+bxa + bx), unlike y=mx+by = mx + b in algebra. On the TI-84, use LinReg(a+bx) so the letters match.
The hat matters. yy is an actual observed value, while y^\hat{y} is a prediction. Writing y=29.0−1.80xy = 29.0 - 1.80x without the hat claims every car's price falls exactly on the line, and AP graders take credit off for it. In context, use the variable names:
price^=29.0−1.80(age)\widehat{\text{price}} = 29.0 - 1.80(\text{age})
or write "predicted price = 29.0 - 1.80(age)" and say what each variable and its units are.

Calculating a predicted response

To predict, substitute the xx-value into the equation and calculate y^\hat{y}. Then say what it means in context, with units.

Example 1: Predicting a car's price

For the 10 used cars from Topic 5.1, the regression model is y^=29.0−1.80x\hat{y} = 29.0 - 1.80x, where xx is age in years and y^\hat{y} is the predicted price in thousands of dollars. (Topic 5.5 shows how technology finds this line.) Predict the price of a car that is 8 years old.
y^=29.0−1.80(8)=29.0−14.4=14.6\hat{y} = 29.0 - 1.80(8) = 29.0 - 14.4 = 14.6
Answer: The model predicts that an 8-year-old car of this model is listed for about $14,600. On the graph, go up from x=8x = 8 to the line, then across to the vertical axis.
5.3 - Linear Regression Models
None of the 10 cars is exactly 8 years old, but 8 is between the youngest car (1 year) and the oldest (10 years). That makes this an interpolation, which is the next idea.

Interpolation and extrapolation

  • Interpolation is predicting a response using a value of the explanatory variable that is within the interval of xx-values used to find the regression line.
  • Extrapolation is predicting a response using a value of the explanatory variable that is beyond that interval. The further you extrapolate, the less reliable the prediction is.
Why is extrapolation risky? The data only show the pattern over the xx-values you actually observed. Nothing guarantees that the linear pattern continues past them. For the cars, the data cover ages 1 to 10 years. A prediction for a 25-year-old car is an extrapolation, and it comes out absurd:
y^=29.0−1.80(25)=29.0−45.0=−16.0\hat{y} = 29.0 - 1.80(25) = 29.0 - 45.0 = -16.0
A price of −16.0-16.0 thousand dollars makes no sense. A price can't drop below 0, so the real pattern has to level off somewhere past the data, and the line can't follow it there.

Example 2: Crickets and temperature

Crickets chirp faster when it's warmer. Suppose a student recorded the chirps per minute of crickets and the air temperature (°F) on 14 evenings. The chirp rates ranged from 84 to 195 chirps per minute, and the scatterplot showed a strong linear pattern. The regression model is y^=39.9+0.244x\hat{y} = 39.9 + 0.244x, where xx is chirps per minute and y^\hat{y} is the predicted temperature in °F.
5.3 - Linear Regression Models
(a) Predict the temperature when crickets chirp 160 times per minute.
y^=39.9+0.244(160)=39.9+39.04=78.94\hat{y} = 39.9 + 0.244(160) = 39.9 + 39.04 = 78.94
The model predicts about 78.9°F. This is interpolation (160 is between 84 and 195), so the prediction is reasonable.
(b) What does the model predict for 300 chirps per minute? Should you trust it?
y^=39.9+0.244(300)=39.9+73.2=113.1\hat{y} = 39.9 + 0.244(300) = 39.9 + 73.2 = 113.1
The model predicts 113.1°F, but this is an extrapolation far past the largest chirp rate in the data (195). We have no data there, and crickets may never chirp that fast. Don't trust it.
(c) What does the model predict for 0 chirps per minute?
y^=39.9+0.244(0)=39.9\hat{y} = 39.9 + 0.244(0) = 39.9°F. This is also an extrapolation, well below 84 chirps per minute. Crickets stop chirping when it gets cold, so 0 chirps could happen at many different temperatures. The prediction is unreliable.

Example 3: Growing children (AP-style)

Suppose a pediatrician used data on children ages 3 to 10 to get the model y^=31.5+2.4x\hat{y} = 31.5 + 2.4x, where xx is age in years and y^\hat{y} is predicted height in inches. Use the model to predict the height of a 30-year-old, and explain whether the prediction is reasonable.
y^=31.5+2.4(30)=31.5+72=103.5\hat{y} = 31.5 + 2.4(30) = 31.5 + 72 = 103.5
Answer: The model predicts 103.5 inches, about 8.6 feet. That's not reasonable. Age 30 is far outside the ages used to build the model (3 to 10 years), so this is an extrapolation. Children grow at a fairly steady rate, but growth stops in the late teens, so the linear pattern doesn't continue to age 30.

Common mistakes

  • Leaving off the hat or not defining the variables. Write y^\hat{y} (or "predicted ___") and say what xx and y^\hat{y} stand for, with units.
  • Mixing up aa and bb. In y^=a+bx\hat{y} = a + bx, aa stands alone and bb multiplies xx.
  • Trusting an extrapolation. Before predicting, check whether the xx-value is inside the range of the data.
  • Fitting a line without checking the form. Look at the scatterplot first.
  • Reporting a bare number. A prediction needs units and context: "about $14,600 for an 8-year-old car," not "14.6."

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.