Skip to main content

5.3 Linear Regression Models

add to ChatGPT
Verified for the 2027 examUpdated October 2026Fiveable Content Team
Fiveable

📊AP Statistics Unit 5 Review

QR code for AP Statistics practice questions

5.3 Linear Regression Models

A simple linear regression model uses an explanatory variable xx to predict a response variable yy with the equation y^=a+bx\hat{y} = a + bx, where aa is the y-intercept and bb is the slope. Plug a given xx value into the equation to get the predicted response y^\hat{y}, and stay inside the range of your data to keep predictions trustworthy.

AP Stats Linear Regression

In AP Stats, a linear regression model predicts a response variable y from an explanatory variable x using ŷ = a + bx. The predicted response ŷ is the value on the regression line, not the actual observed y value, so you should always describe it as a prediction in context.

The main calculation skill is substituting an x-value into the model to find ŷ. The main interpretation skill is deciding whether that prediction is reliable, especially whether the x-value is inside the observed range of data or is an extrapolation.

Regression equations on the exam are often built from technology output, so you need to read the slope and intercept, predict ŷ, and explain the result in context with correct units. You also need to explain why extrapolation makes a prediction less reliable, and these ideas set you up for the rest of revised Unit 5.

Predicting ŷ and Watching for Extrapolation

  • A simple linear regression model predicts the response variable y from one explanatory variable x using ŷ = a + bx.
  • ŷ is always the predicted value, not the actual observed value. The x you plug in is a chosen value of the explanatory variable, and the resulting y is a prediction.
  • To predict a response, substitute the given x into the equation and compute ŷ.
  • Interpolation means predicting inside the observed range of x. It is generally more reliable.
  • Extrapolation means predicting outside the observed range of x. The farther out you go, the less trustworthy the prediction.
  • Always interpret your predicted value in context and check whether it makes sense for the situation.

What is a Linear Regression Model?

A simple linear regression model is an equation of a line that uses an explanatory variable, x, to predict a response variable, y. You can use it when the association between x and y looks linear, because the line approximates that association. The predicted value is written as ŷ and calculated with:

ŷ = a + bx

where a is the y-intercept (the predicted value of ŷ when x = 0) and b is the slope (how much ŷ changes for each one-unit increase in x).

Once you have the slope and intercept, you can substitute any x value into the equation to find the predicted response.

Keep the notation straight: ŷ is the predicted response, so it is never the exact observed y value. The x value is whatever value you choose to substitute, but the y value you report from the line is always a prediction, not a measured result.

Extrapolation

When you have a regression equation, you can use it to predict the response variable for a given value of the explanatory variable. Predicting inside the range of x-values in your data set is called interpolation, and it is generally more accurate because the prediction is supported by actual data.

Extrapolation is predicting a response value using an x-value that is beyond the interval of x-values used to build the regression line. Extrapolation is generally less reliable because it assumes the linear pattern keeps holding outside the observed data, which may not be true. The farther outside the range of the data you go, the less reliable the predictions are likely to be.

Be cautious with extrapolation. Predictions far outside your data can produce unrealistic or misleading results, so stay aware of your model's limits.

Example

In a model built using data for 19 to 24 year olds, a regression line predicts an individual's comfort level with technology (on a scale of 1 to 10) from their age: ŷ = 0.32x + 0.67, where ŷ is the predicted comfort level and x represents age.

Predict the comfort level of a 45 year old and explain why this prediction does not make sense.

ŷ = 0.32(45) + 0.67

ŷ = 15.07

This prediction does not make sense because comfort levels were measured on a 1 to 10 scale, and 15.07 falls outside that range. The problem is that the model was built using data for 19 to 24 year olds, so predicting for a 45 year old is extrapolation. The model was never designed to describe ages that far outside the original data.

Predicting a Response and Checking the x-Value

Problem Solving: To predict a response value, substitute the given x into ŷ = a + bx and compute. Show the substitution, not just the final number, so your work is clear.

A study examined the relationship between hours of study per week and final exam scores for a sample of 25 students. The least squares regression line was ŷ = 42.3 - 0.5x, where ŷ is the predicted final exam score and x is the number of hours of study per week.

Predict the final exam score for a student who studies 15 hours per week.

ŷ = 42.3 - 0.5(15)

ŷ = 42.3 - 7.5

ŷ = 34.8

Interpretation in context: The predicted final exam score for a student who studies 15 hours per week is 34.8 points.

Common Trap: Before reporting any predicted value, check whether the x you used falls inside the range of the data. If it does not, label your work as extrapolation and note that the prediction is less reliable. Also confirm your answer is realistic for the context, like a comfort score staying within its 1 to 10 scale.

Common Misconceptions

  • Misconception: ŷ is the actual value.
    Actually: ŷ is the predicted response from the line, not a measured data point. The real value usually differs from the prediction.
  • Misconception: A regression line works for any x.
    Actually: Predictions are most trustworthy inside the observed range of x. Outside that range, you are extrapolating, and reliability drops the farther you go.
  • Misconception: A prediction is valid just because the math works.
    Actually: You can always compute ŷ, but the result can be meaningless if it falls outside a realistic range or relies on extrapolation. Always check context.
  • Misconception: Slope and intercept are just numbers.
    Actually: The slope tells you how much ŷ changes per one-unit increase in x, and the intercept is the predicted ŷ when x = 0. Read them in context, and remember the intercept does not always make real-world sense.
  • Misconception: "Correlation" and "regression" mean the same thing.
    Actually: Correlation measures the strength and direction of a linear relationship, while a regression model gives you an equation to predict the response from the explanatory variable.

Practice Questions for 5.3

1 of 10

The scatterplot above shows the relationship between the distance driven in miles and the amount of gas remaining in the tank in gallons, along with the least-squares regression line.

Based on the regression line, what is the predicted amount of gas remaining after driving 75 miles?

A.

12.0 gallons

B.

3.0 gallons

C.

18.0 gallons

D.

11.8 gallons

Vocabulary

The following words are mentioned explicitly in the AP® course framework for this topic.

Term

Definition

explanatory variable

A variable whose values are used to explain or predict corresponding values for the response variable.

extrapolation

Predicting a response value using a value for the explanatory variable that is beyond the range of x-values used to create the regression model, resulting in less reliable predictions.

least-squares regression line

A linear model that minimizes the sum of squared residuals to find the best-fitting line through a set of data points.

linear regression model

An equation that uses an explanatory variable to predict a response variable in a linear relationship.

predicted value

The estimated response value obtained from a regression model, denoted as ŷ.

regression model

A statistical model that describes the relationship between a response variable (y) and one or more explanatory variables (x).

response variable

A variable whose values are being explained or predicted based on the explanatory variable.

slope

The value b in the regression equation ŷ = a + bx, representing the rate of change in the predicted response for each unit increase in the explanatory variable.

y-intercept

The value a in the regression equation ŷ = a + bx, representing the predicted response value when the explanatory variable equals zero.

See Fiveable more often in Google

Mark Fiveable as a preferred source and Google is more likely to show you our guides in Top Stories, with a "preferred" badge in AI Mode and AI Overviews.

Prefer us on Google