From the free course AP Statistics on Lykke

5.3 Linear Regression Models

Key concepts: Linear regression model — ŷ = a + bx predicts a response from an explanatory variable · Predicted value ŷ — a point on the line, not an observed data value · Slope b — predicted change in y for a one-unit increase in x · y-intercept a — the predicted response when x equals 0 · Interpolation — predicting at an x inside the observed range · Extrapolation — predicting beyond the data; less reliable the further out

A linear regression model serves as a mathematical bridge, allowing statisticians to estimate the value of a response variable based on the known value of an explanatory variable.

A linear regression model serves as a mathematical bridge, allowing statisticians to estimate the value of a response variable based on the known value of an explanatory variable. While correlation ($r$) measures the strength and direction of a linear relationship, the regression model provides the specific functional form—the "line of best fit"—necessary to turn that association into a predictive tool (LO 5.3.A, EK 5.3.A.1).

The Anatomy of Prediction

In algebra, a line is often written as $y = mx + b$. In statistics, we modify this notation to emphasize that the model provides an estimate rather than a deterministic certainty. The standard form for a linear regression model is:

$$\hat{y} = a + bx$$

The "Y-Hat" ($\hat{y}$): This symbol represents the predicted value of the response variable for a given value of the explanatory variable ($x$). It is the value that falls exactly on the regression line (EK 5.3.A.2).

Component Statistical Term Definition
$\hat{y}$ Predicted Response The estimated value of $y$ calculated by the model.
$a$ $y$-intercept The predicted value of $y$ when $x = 0$.
$b$ Slope The amount by which $\hat{y}$ is predicted to change when $x$ increases by one unit.
$x$ Explanatory Variable The independent variable used to make the prediction.

Worked Problem: The Backpack Weight Model

A school nurse notices that students carrying heavy backpacks often report back pain. She collects data from 30 students and develops the following linear regression model to predict backpack weight (in pounds) based on the number of books inside:

$$\widehat{\text{Weight}} = 2.2 + 1.5(\text{Books})$$

Task 1: Calculate a Prediction (Skill 3.B)

Predict the weight of a backpack for a student carrying 4 books.

  1. Identify the input: $x = 4$.
  2. Substitute into the model: $\hat{y} = 2.2 + 1.5(4)$.
  3. Compute: $\hat{y} = 2.2 + 6.0 = 8.2$.
  4. Interpret in context: For a student carrying 4 books, the model predicts the backpack will weigh 8.2 pounds.

Task 2: Interpret the Slope

The slope $b = 1.5$. This means that for each additional book added to the backpack, the predicted weight increases by 1.5 pounds.

Task 3: Interpret the Intercept

The $y$-intercept $a = 2.2$. This means that for a backpack with 0 books (an empty backpack), the predicted weight is 2.2 pounds.

The Extrapolation Trap

A regression model is only valid within the range of the data used to create it. Using a model to predict values far outside the interval of the explanatory variable $x$ is known as extrapolation (EK 5.3.A.3).

Why Extrapolation is Dangerous: We have no evidence that the linear relationship continues indefinitely. For example, if our backpack data only included students with 1 to 8 books, using the model to predict the weight for a student with 50 books would likely result in a massive error. The physical limits of the backpack or the student's ability to carry it might change the relationship entirely.

Misconception Check: Predicted vs. Observed

The Error: A student looks at the backpack data and sees that one specific student with 4 books actually had a backpack weighing 10 pounds. They claim the model is "broken" because it predicted 8.2 pounds. The Correction: The regression model predicts the average or expected response for a given $x$. Individual data points ($y$) rarely fall exactly on the line. The difference between the observed $y$ and the predicted $\hat{y}$ is the residual, which measures the model's prediction error for that specific instance.

Interpretation Check

A researcher develops a model to predict the height of a sunflower (in cm) based on the days since planting: $\widehat{\text{Height}} = 10 + 2.5(\text{Days})$. The data used to create the model ranged from Day 5 to Day 40.

  1. What is the predicted height of a sunflower on Day 20?
  2. Why would it be statistically "unapproved" to use this model to predict the height of the sunflower on Day 200?

Check your reasoning:

  1. $\hat{y} = 10 + 2.5(20) = 60\text{ cm}$.
  2. Predicting for Day 200 is extrapolation. The sunflower will eventually stop growing or die, so the linear relationship observed in the first 40 days will not hold.
5.3 Linear Regression Models - AP Statistics - image 1
5.3 Linear Regression Models - AP Statistics - image 1
5.3 Linear Regression Models - AP Statistics - diagram 1
5.3 Linear Regression Models - AP Statistics - diagram 1

Source Materials

Study AP Statistics on Lykke

This course page is free to open: signed out, you can read its first two sections, and signing in, on any plan, opens the rest. The free Lykke Chrome extension syncs your own Canvas courses, so ChatGPT, Claude and Muse can answer from your classes and deadlines. It only reads Canvas.

Add the free extensionSign in to open every section

All sections of AP Statistics · Browse more course pages