Least Squares Regression Line Formula
Least squares regression line is the unique straight line ŷ = a + bx that minimizes the sum of squared vertical distances (residuals) between the observed data points and the line.
The Formula
Ask yourself: Am I fitting a single straight line to two-variable numeric data by minimizing squared vertical distances?
Quick example
Notation
What this formula means
The unique straight line that minimizes the sum of squared vertical distances (residuals) between the observed data points and the line.
Imagine each data point attached to a stiff rod by a vertical spring whose pull grows with its stretch. Let go, and the rod settles where all the pulls balance: close to most points, tugged hardest by the farthest. That resting position is the least-squares line. Like any rod, it stays straight, so it can't follow a curved pattern.
Formal view
Worked examples
Example 1
mediumShow solution
Answer
First step
See the full worked solution + why-it-works coaching
SetupKey insightWhy it worksCommon pitfallConnection
Example 2
hardExample 3
mediumCommon mistakes
- Minimizing perpendicular or horizontal distances - LSRL minimizes squared VERTICAL distances ( residuals) only.
- Confusing the slope with the correlation - they relate by ; has units, does not.
- Extrapolating far outside the data's -range - the line is only trustworthy across the observed values.
Why this formula matters
A scatter plot shows a trend; the LSRL turns it into a usable rule, such as "each extra hour of study goes with 4.8 more points." Its slope gives the rate of change in real units, and the equation gives predictions for new cases. Used carelessly, it extrapolates far beyond the data or is forced onto a curved pattern, and then its predictions are confidently wrong.
Frequently asked questions
What is the Least Squares Regression Line formula?
The unique straight line that minimizes the sum of squared vertical distances (residuals) between the observed data points and the line.
How do you use the Least Squares Regression Line formula?
Use the LSRL when you have paired numeric data, a scatter plot with a roughly linear trend, and a need to predict from or state a rate of change. Check the scatter plot first: if the pattern curves, a straight line is the wrong model. If you need only the strength of the relationship, report or . If two points lie exactly on a line with no scatter, the ordinary two-point slope is enough.
What do the symbols mean in the Least Squares Regression Line formula?
is the predicted value. is the slope. is the y-intercept. is the correlation coefficient. are the standard deviations of and .
Why is the Least Squares Regression Line formula important in Math?
A scatter plot shows a trend; the LSRL turns it into a usable rule, such as "each extra hour of study goes with 4.8 more points." Its slope gives the rate of change in real units, and the equation gives predictions for new cases. Used carelessly, it extrapolates far beyond the data or is forced onto a curved pattern, and then its predictions are confidently wrong.
What do students get wrong about Least Squares Regression Line?
The procedure for least squares regression line is the easy part; the trap is minimizing perpendicular or horizontal distances. Asking "Am I fitting a single straight line to two-variable numeric data by minimizing squared vertical distances?" first is what keeps a correct-looking calculation from being attached to the wrong concept.
What should I learn before the Least Squares Regression Line formula?
Before studying the Least Squares Regression Line formula, you should understand: correlation, scatter plot, mean, standard deviation.