6m left·0%
Reading Time: 6 min
Last Updated: September 15, 2026
Main Ideas: 5
Reading Time: 6 min
Last Updated: September 15, 2026
Main Ideas: 5

Topic 5.5 Notes – Least-Squares Regression

Verified for 2027 AP® Statistics Exam
Read aloud
Least-squares regression gives you the line that best predicts a response variable from an explanatory variable when the relationship is linear. This topic is about what that line means, how technology reports it, and how to interpret slope, intercept, rr, and r2r^2 correctly in context.

What the Least-Squares Regression Line Is

When two quantitative variables have an approximately linear relationship, you can model it with

y^=a+bx \hat y=a+bx

Here, y^\hat y is the predicted value of yy, not the actual observed value.

A quick reminder on residuals since regression is built on them:

  • Residual =observed y−predicted y=y−y^=\text{observed }y-\text{predicted }y=y-\hat y
  • It is the vertical distance from a point to the regression line

In the scatterplot below, the blue line is the regression line and the red vertical segments show those residuals.

Study guide illustration

The phrase least squares means this line makes

∑(y−y^)2 \sum (y-\hat y)^2

as small as possible.

Why square the residuals?

  • Positive and negative residuals do not cancel out
  • Big misses count more than small misses

Two facts AP Stats loves:

  • The LSRL always passes through (xˉ,yˉ)(\bar x,\bar y)
  • Regression of yy on xx is different from regression of xx on yy, because the explanatory and response variables play different roles

This line is only appropriate when the scatterplot looks linear and the residual plot shows no pattern.

Finding the Regression Equation

In this course, you usually get the line from technology, not by hand from raw data. What you need is to read the output correctly.

Reading the coefficients

  • In y^=a+bx\hat y=a+bx, aa is the intercept and bb is the slope
  • In a calculator display written as ax+bax+b, aa is the slope and bb is the intercept
  • A row labeled Intercept or Constant gives the intercept
  • The row named for the explanatory variable gives the slope

You should also recognize:

  • rr = correlation
  • r2r^2 = coefficient of determination

Useful formulas from summary stats

If you are given xˉ,yˉ,sx,sy,\bar x,\bar y,s_x,s_y, and rr, then

b=rsysxa=yˉ−bxˉ b=r\frac{s_y}{s_x} \qquad a=\bar y-b\bar x

Example with xˉ=4, yˉ=18, sx=2, sy=5, r=0.80\bar x=4,\ \bar y=18,\ s_x=2,\ s_y=5,\ r=0.80

  • b=(0.80)(52)=2b=(0.80)\left(\frac{5}{2}\right)=2
  • a=18−(2)(4)=10a=18-(2)(4)=10

So the line is y^=10+2x\hat y=10+2x.

Built-in check. Plug in x=xˉ=4x=\bar x=4:

  • y^=10+2(4)=18=yˉ\hat y=10+2(4)=18=\bar y

Also remember:

  • The sign of bb matches the sign of rr
  • If r=0r=0, then b=0b=0 and the line is y^=yˉ\hat y=\bar y

Interpreting the Slope and Intercept

These must be stated in context.

Slope

Template:

  • For each 1-unit increase in xx, the predicted yy increases/decreases by bb units

Example: if x=x= hours studied and y=y= quiz score, and b=4.2b=4.2,

  • For each additional hour studied, the predicted quiz score increases by 4.2 points.

Say predicted. That word matters. The slope describes association, not automatic causation.

Intercept

Template:

  • When x=0x=0, the predicted value of yy is aa

Only interpret it if x=0x=0 makes sense and is in a reasonable range.

Skip the interpretation when:

  • x=0x=0 is impossible or illogical
  • x=0x=0 is outside the data range, so it is extrapolation
  • the predicted yy at 0 is impossible in context

What rr and r2r^2 Tell You

rr is the correlation coefficient. It tells you the direction and strength of the linear relationship. It has no units.

r2r^2 is the coefficient of determination. It tells you the proportion of variation in the response variable yy explained by its linear relationship with xx.

Example: if r2=0.64r^2=0.64,

  • About 64% of the variation in quiz scores is explained by the linear relationship between hours studied and quiz score.

If you know r2r^2 but not rr,

  • ∣r∣=r2|r|=\sqrt{r^2}
  • use the slope’s sign to choose positive or negative

Common traps:

  • r2r^2 is not the percent of points on the line
  • r2r^2 is not prediction accuracy
  • r2r^2 does not prove causation
  • high r2r^2 does not prove a linear model is appropriate

When to Use It and Common Mistakes

Use the LSRL when:

  • both variables are quantitative
  • the scatterplot is roughly linear
  • the residual plot has no clear pattern

A curved residual plot like this one is a warning sign that a linear model is not appropriate.

Study guide illustration

Residual plot with a curved pattern

Use it for prediction within the observed xx-range. Outside that range, you are extrapolating, and the line may stop making sense.

Common mistakes that lose points fast:

  • writing y=a+bxy=a+bx instead of y^=a+bx\hat y=a+bx
  • mixing up slope and intercept from output
  • saying slope is the actual change instead of the predicted change
  • forcing an intercept interpretation when x=0x=0 is meaningless
  • saying r2r^2 explains variation in xx instead of yy
  • treating high rr or high r2r^2 as proof of causation or guaranteed strong predictions

Key Takeaways

The LSRL predicts yy from xx, so write y^=a+bx\hat y=a+bx, not y=a+bxy=a+bx.
Residuals are y−y^y-\hat y, and least squares minimizes ∑(y−y^)2\sum (y-\hat y)^2.
The regression line always passes through (xˉ,yˉ)(\bar x,\bar y).
The slope must be interpreted as a predicted change in the response for a 1-unit increase in the explanatory variable.
The intercept only gets a context interpretation when x=0x=0 is meaningful and reasonable.
Correlation rr gives direction and strength of a linear relationship, but slope gives the rate of predicted change.
r2r^2 always refers to variation in the response variable, not the explanatory variable.
A high rr or high r2r^2 does not prove causation, good extrapolation, or that a linear model fits well.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse this website.

Notes

1 credit used · 5/5 remaining