Topic 5.5 Notes – Least-Squares Regression
What the Least-Squares Regression Line Is
When two quantitative variables have an approximately linear relationship, you can model it with
Here, is the predicted value of , not the actual observed value.
A quick reminder on residuals since regression is built on them:
- Residual
- 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.

The phrase least squares means this line makes
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
- Regression of on is different from regression of on , 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 , is the intercept and is the slope
- In a calculator display written as , is the slope and 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:
- = correlation
- = coefficient of determination
Useful formulas from summary stats
If you are given and , then
Example with
So the line is .
Built-in check. Plug in :
Also remember:
- The sign of matches the sign of
- If , then and the line is
Interpreting the Slope and Intercept
These must be stated in context.
Slope
Template:
- For each 1-unit increase in , the predicted increases/decreases by units
Example: if hours studied and quiz score, and ,
- 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 , the predicted value of is
Only interpret it if makes sense and is in a reasonable range.
Skip the interpretation when:
- is impossible or illogical
- is outside the data range, so it is extrapolation
- the predicted at 0 is impossible in context
What and Tell You
is the correlation coefficient. It tells you the direction and strength of the linear relationship. It has no units.
is the coefficient of determination. It tells you the proportion of variation in the response variable explained by its linear relationship with .
Example: if ,
- About 64% of the variation in quiz scores is explained by the linear relationship between hours studied and quiz score.
If you know but not ,
- use the slope’s sign to choose positive or negative
Common traps:
- is not the percent of points on the line
- is not prediction accuracy
- does not prove causation
- high 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.

Residual plot with a curved pattern
Use it for prediction within the observed -range. Outside that range, you are extrapolating, and the line may stop making sense.
Common mistakes that lose points fast:
- writing instead of
- mixing up slope and intercept from output
- saying slope is the actual change instead of the predicted change
- forcing an intercept interpretation when is meaningless
- saying explains variation in instead of
- treating high or high as proof of causation or guaranteed strong predictions
Key Takeaways
Least-Squares Regression Line (LSRL) / Regression Line / Line of Best Fit
The line ŷ = a + bx for predicting y from x that has the smallest possible sum of squared residuals
Residual
eᵢ = yᵢ - ŷᵢ; observed response minus predicted response
Least-Squares Criterion
Choose the line for which the sum of squared residuals, Σeᵢ², is as small as possible
Least-Squares Regression Equation
ŷ = a + bx, where ŷ is the predicted response, a is the y-intercept, and b is the slope
Slope of the LSRL
b; the predicted increase or decrease in the response variable for a 1-unit increase in the explanatory variable
Y-Intercept of the LSRL
a; the predicted value of the response variable when the explanatory variable x = 0; interpret in context only if x = 0 is meaningful and relevant
Point the LSRL Always Passes Through
(x̄, ȳ)
Intercept Formula from the Means
A = ȳ - bx̄.
Slope Formula from Correlation and Standard Deviations
b = r(s_y/s_x)
Correlation Coefficient
r; a unit-free measure of the direction and strength of the linear association between x and y
Coefficient of Determination
r²; the proportion of variation in the response variable explained by its linear relationship with the explanatory variable
How to Read Regression Output Coefficients
Intercept or Constant row gives the intercept; the explanatory-variable row gives the slope; match coefficients to the displayed equation form
Coefficients of the LSRL
A and b; the y-intercept and slope of ŷ = a + bx
Notes
Least-Squares Regression Line (LSRL) / Regression Line / Line of Best Fit
The line ŷ = a + bx for predicting y from x that has the smallest possible sum of squared residuals
Residual
eᵢ = yᵢ - ŷᵢ; observed response minus predicted response
Least-Squares Criterion
Choose the line for which the sum of squared residuals, Σeᵢ², is as small as possible
Least-Squares Regression Equation
ŷ = a + bx, where ŷ is the predicted response, a is the y-intercept, and b is the slope
Slope of the LSRL
b; the predicted increase or decrease in the response variable for a 1-unit increase in the explanatory variable
Y-Intercept of the LSRL
a; the predicted value of the response variable when the explanatory variable x = 0; interpret in context only if x = 0 is meaningful and relevant
Point the LSRL Always Passes Through
(x̄, ȳ)
Intercept Formula from the Means
A = ȳ - bx̄.
Slope Formula from Correlation and Standard Deviations
b = r(s_y/s_x)
Correlation Coefficient
r; a unit-free measure of the direction and strength of the linear association between x and y
Coefficient of Determination
r²; the proportion of variation in the response variable explained by its linear relationship with the explanatory variable
How to Read Regression Output Coefficients
Intercept or Constant row gives the intercept; the explanatory-variable row gives the slope; match coefficients to the displayed equation form
Coefficients of the LSRL
A and b; the y-intercept and slope of ŷ = a + bx