Topic 2.8 Notes – Least Squares Regression
1. The Least Squares Regression Line
When you model a linear relationship, you write it as
- = explanatory variable
- = response variable
- = predicted value of
The least squares regression line is the line that minimizes the sum of the squared residuals.
A residual is
So for each data point, you:
- Find how far it is from the line (the residual)
- Square that value
- Add them all up
The LSRL makes that total as small as possible.
Why square?
- Prevents positive and negative residuals from canceling
- Penalizes large errors more heavily
One fact you should know cold:
The LSRL always passes through .
That connection to the means shows up on quizzes more than people expect.
2. The Components of the LSRL
Everything in the model connects back to summary statistics you already know.
Slope
Where:
- = correlation
- = standard deviation of
- = standard deviation of
What this tells you:
- The sign of always matches the sign of
- The size depends on strength of relationship and relative spread
Interpretation
“The predicted change in (y in context) is ___ (units of y) for each 1 (unit of x).”
Example:
If when modeling quiz score (points) from study time (hours):
“For each additional hour of study time, the predicted quiz score increases by 2.4 points.”
Always include:
- The word predicted
- Units
- Context
Students lose points every year by leaving out “predicted.”
Y-Intercept
This is the predicted value of when .
Interpretation:
“The predicted value of (y) is ___ when (x) is 0.”
Important: sometimes this makes no sense.
If you’re modeling college GPA from number of absences, what does “0 absences” mean? That’s fine.
But if you’re modeling house price from square footage, what does 0 square feet mean? Not realistic.
If 0 is outside the data range, don’t force meaning onto it.
Coefficient of Determination
Also called R-squared.
- Between 0 and 1
- No direction
- Measures model fit
Interpretation:
“___% of the variation in (y) is explained by its linear relationship with (x).”
If :
“64% of the variation in exam scores is explained by their linear relationship with hours studied.”
Two common mistakes:
- Saying “64% of exam scores are caused by…”
- Saying “64% of the points lie on the line.”
It’s about variation explained, not causation and not number of points.
3. Estimating the Regression Line from Summary Stats
If you’re given , here’s the flow.
- Compute slope
- Compute intercept
- Write the equation
Example numbers:
Suppose
, , , ,
Regression line:
On your calculator, LinReg gives:
- a (intercept)
- b (slope)
- r
- R-Sq
Always use R-Sq, not adjusted R-Sq.
4. Interpreting and Comparing Models
When reading regression output, you should be ready to interpret:
- Slope → rate of predicted change
- Intercept → predicted value at
- r → strength and direction of linear relationship
- r² → percent of variation explained
When comparing two models:
Stronger linear model usually has:
- closer to 1
- Larger
- Smaller unexplained variation
If slope magnitude decreases, the rate of predicted change becomes weaker.
If moves closer to 0, the linear relationship is weaker.
Key Takeaways
Least Squares Regression Line (LSRL)
The line y-hat = a + bx that minimizes the sum of squared residuals.
Residuals and Why They Are Squared
Residuals are observed minus predicted values; squaring prevents cancellation and emphasizes larger errors.
LSRL Form
Predicted response equals y-hat = a + bx, with a as intercept and b as slope.
Slope of the LSRL
The predicted change in y for each 1-unit increase in x.
Slope Formula
Compute slope with b = r(sy/sx), using correlation and the variables' standard deviations.
Y-Intercept Formula
Compute intercept with a = y-bar - b x-bar.
LSRL Passes Through (x-bar, y-bar)
The regression line always contains the point of the sample means.
Coefficient of Determination / r-squared
The square of r; the proportion of y-variation explained by its linear relationship with x.
Interpreting r-squared
State the percent of variation in the response variable explained by the linear model with x.
Y-Intercept of the LSRL
The predicted y-value when x = 0, though it may lack meaning in context.
Notes
Least Squares Regression Line (LSRL)
The line y-hat = a + bx that minimizes the sum of squared residuals.
Residuals and Why They Are Squared
Residuals are observed minus predicted values; squaring prevents cancellation and emphasizes larger errors.
LSRL Form
Predicted response equals y-hat = a + bx, with a as intercept and b as slope.
Slope of the LSRL
The predicted change in y for each 1-unit increase in x.
Slope Formula
Compute slope with b = r(sy/sx), using correlation and the variables' standard deviations.
Y-Intercept Formula
Compute intercept with a = y-bar - b x-bar.
LSRL Passes Through (x-bar, y-bar)
The regression line always contains the point of the sample means.
Coefficient of Determination / r-squared
The square of r; the proportion of y-variation explained by its linear relationship with x.
Interpreting r-squared
State the percent of variation in the response variable explained by the linear model with x.
Y-Intercept of the LSRL
The predicted y-value when x = 0, though it may lack meaning in context.