The Least-Squares Regression Line (College Board AP® Statistics): Study Guide
Least-squares regression line
What is the least-squares regression line?
The least-squares regression line is a special type of regression line that:
minimizes the sum of the squares of the residuals
and that passes through the mean point
where is the mean of the -values
and is the mean of the -values
It is used to predict -values from given -values
Its full name is the least-squares regression line of on
This is not the same line if you wanted to predict -values from given -values
That is the least-squares regression line of on
You cannot swap and
What is the sum of the squares of the residuals?
The sum of the squares of the residuals for any regression line is found by
calculating the residuals for each data point
squaring each residual
then adding together all these squared values
Why is the sum of the squares of the residuals minimized?
Residuals are like errors when comparing regression lines
A good regression line should minimize the residuals
So compare the sum of all the residuals for different regression lines
However, for any line through , including the least-squares regression line, the sum of the residuals is zero
The positive residuals cancel out the negative ones, so the sum can't be used to compare lines
So, instead, compare the sum of the squares of the residuals
because squaring the residuals makes them all positive
which stops any cancellation
The regression line with the smallest possible sum of the squares of the residuals is the least-squares regression line
What is the equation of the least-squares regression line?
The equation of the least-squares regression line is given by
is the -intercept
is the slope
note that AP Statistics writes the equation as , with first, so is the slope, not the intercept
where is the -value predicted by the regression line
This is usually different from the actual -value of a data point
is the explanatory variable
where is the correlation coefficient
and
which rearranges to (to find )
You need to find before you can find
In practice, the equation of the least-squares regression line is found using technology
e.g. a calculator
Examiner Tips and Tricks
The formulas for the equation of the least-squares regression line are given in the exam.
How do I interpret the slope of a regression line?
The slope, , of the regression line is
the amount by which the predicted -variable, , tends to change for every 1 unit of increase in the -variable
i.e. the change in per 1-unit increase in
Examiner Tips and Tricks
When interpreting the slope, always say predicted (or 'on average'), name both variables in context, and include units.
How do I interpret the y-intercept of a regression line?
The -intercept, , of the regression line is
the predicted value of when the explanatory variable, , equals zero
In some contexts, the -intercept does not have a sensible interpretation, e.g.
when is outside the range of the data
so the prediction is an extrapolation
when is impossible in context
e.g. a person with a height of 0 cm
Worked Example
The scatterplot below shows the number of hours spent studying (on the -axis) against the score in a test out of 16 points (on the -axis), for five different students.
The equations of three different regression lines are shown, together with sums of squares of their residuals in the table below. The variable is the predicted value of . One of these three regression lines is the least-squares regression line.

Regression equation | Sum of the squares of the residuals |
|---|---|
25.6 | |
26 | |
40 |
(a) Explain how you know which regression line is the least-squares regression line.
(b) Explain what the -intercept and the slope of the least-squares regression line mean in context.
Answer:
(a)
Passing through is not enough to identify the least-squares regression line
You must compare the sums of the squares of the residuals
The least-squares regression line minimizes the sum of the squares of the residuals
The regression line has the smallest sum of the squares of the residuals, as 25.6 < 26 < 40
You are told that one of the three regression lines is the least-squares regression line
This means is the least-squares regression line
(b)
The -intercept of a regression line is the predicted value of when is zero
The slope of a regression line is the amount of change in the predicted value of for every increase by 1 in the value of
The -intercept shows that a student who does no studying is predicted to score 2.4 points out of 16
0 hours of studying is within the range of the data, so this interpretation is reasonable
The slope shows that the predicted score increases by 2.8 points for each additional hour of studying
Unlock more, it's free!
Was this revision note helpful?
Build on this topic