Does a regression line pass through the means?
By Jude Wallis · Published
Yes. Every least-squares regression line passes through the mean point, written (x-bar, y-bar): the mean of the x-values paired with the mean of the y-values. That is the intercept formula, intercept equals y-bar minus slope times x-bar, rearranged.
AP Statistics: Unit 5 (topics 5.3 Linear Regression Models, 5.5 Least-Squares Regression). This is Unit 5 topics 5.3 and 5.5 of the Fall 2026 course: the mean point is where the intercept formula (intercept equals y-bar minus slope times x-bar) comes from, and questions that hand you x-bar, y-bar, and a slope are testing it.
Yes, and it is the intercept formula in disguise
Every least-squares regression line runs through the point : the mean of the explanatory values paired with the mean of the response values. That point is called the mean point, or the centroid of the data.
You already know this fact in another costume. The intercept of the least-squares line is
Add to both sides:
The right side is the line evaluated at , and it returns . So the coordinates satisfy the equation of the line, which is exactly what "the line passes through that point" means. The intercept formula and the mean-point property are one statement written two ways, so if you can recall either one you can recover the other.
Two cautions before the proof. The mean point is usually not one of your data points, so nothing is being forced through an observation. And passing through the mean point says nothing about whether the line fits well: a hopeless fit does it too.
Why the line has no choice
Pick any slope you like and hold it fixed. The only freedom left is the intercept, which slides the line up and down without tilting it. Which height makes the sum of squared residuals smallest?
Write , the part of each observation the slope has not accounted for. The residual at point is
so the quantity you are minimizing is . That is the familiar question "which single number sits closest to a list, measured by squared distance," and the answer is always the mean of the list. (As a function of that sum is an upward parabola, , whose vertex sits at .) The mean of the values is , so the best intercept is
That argument never used a particular slope, so it holds for all of them. Whichever slope eventually wins, its best partner intercept puts the line through . The overall winner therefore passes through the mean point.
The penalty for missing it is easy to price. Take a line through the mean point with residuals and slide it up by units. Every residual drops by , so the new total is . The middle term vanishes because those residuals sum to zero, leaving a total larger by exactly . Any line that misses the mean point can be improved by sliding it back, so no such line can be the least-squares line.
If you have met derivatives, here is the same result in one step: set the derivative of with respect to equal to zero. You get , so the residuals sum to zero, so .
Going through the mean point does not make a line the LSRL
This is the trap. Passing through is necessary, not sufficient.
There is one line through the mean point for every slope you can name, an infinite family, and every one of them has residuals that add to zero. The flat line belongs to that family. So does a line steep enough to miss almost every point. They tie on the mean-point test and tie at zero on the sum of residuals, which is why the sum of residuals cannot pick the best line out of that family.
The slope is what separates them:
So a full description of the least-squares line is: the line through the mean point with slope . The mean point fixes the height, the slope fixes the tilt, and you need both. On a multiple-choice item that asks which equation could be the regression line, checking eliminates wrong options fast, but it confirms nothing on its own.
One technical condition sits underneath all of this: the x-values cannot all be identical. If they were, , no slope exists, and there is no regression line to talk about.
What the property lets you compute
Exam questions rarely ask "does the line pass through the means?" in those words. They hand you summary statistics and expect you to use it.
| You are given | You can find | How |
|---|---|---|
| , , and the slope | the intercept | |
| the equation of the line and | evaluate the line at | |
| , , , , | the whole line | , then |
A fourth use is a habit worth building. Once you have the line from a calculator, plug in and confirm you get . If you do not, you mistyped a value or copied the intercept and slope into the wrong slots. See reading calculator output for which number is which.
There is also a cleaner way to write predictions. Anchor the line at the mean point instead of at the intercept:
This is the same line, in point-slope form. It predicts without ever computing , so it keeps one fewer rounded number in the arithmetic. Worked example 1 does the prediction both ways.
One thing the property does not give you: a residual of zero at . The line hits the mean point, not any data point that happens to sit at .
In standardized units, the mean point is the origin
Start from the point-slope version, , substitute , and divide both sides by :
Both sides are now z-scores, so the least-squares line in standardized units is simply
At the mean point, and . Convert the data to z-scores and the mean point becomes the origin, with the regression line through it at slope . Every regression looks the same from there.
This form also explains regression to the mean in one glance. A subject two standard deviations above average in is predicted only standard deviations from average in , and since , that is closer to the mean than two standard deviations, a pull back toward the mean point. The correlation is the shrinkage factor. For more on how and differ, see slope versus correlation coefficient.
Where the property stops
The result is airtight for the least-squares line as AP Statistics defines it. The boundaries are worth knowing, because each one is a place students over-extend the rule.
- Means, not medians. The line generally misses the point (median of , median of ). Least squares is built on the mean and on squared distance, and the mean is not resistant, which is the same reason one outlier can drag the whole line. Compare mean versus median.
- The fit needs a free intercept. Statistical software can force a line through the origin, fitting with no intercept term. With nothing to adjust the height, that line will generally miss . It is outside the AP course, but it is why the property is stated for lines of the form .
- Both directions pass through it. Regressing on instead of on gives a different line with a different slope, and it also runs through . The two lines cross at the mean point and agree nowhere else unless .
- Transformed variables have their own mean point. Fit a line to and and it passes through . Undoing the transformation does not land you back on , because the mean of the logs is not the log of the mean.
- The mean point moves when the data do. Add or delete an observation and and shift, so the line pivots around a new anchor. Watch it happen in the influential point interactive.
Get the intercept from the means and the slope
A statistics class records weekly study hours and final exam score for every student. The summary statistics are hours, hours, points, points, and . Find the least-squares regression line, then predict the score for a student who studies 15 hours a week.
Slope first. points per hour.
Intercept from the mean point. The line passes through , so .
Compute the product: , so points.
The line is .
Check the mean point. At : , which is . The line does go through .
Predict at 15 hours. points.
Same prediction from the mean point, no intercept needed. points.
The least-squares line is , and the predicted score at 15 study hours is 76.39 points. The intercept came entirely from the mean point: no raw data was needed, only , , and the slope.
Check the property, then break the two rules people assume
Five stores report shelf space in meters, : 2, 4, 6, 8, 10, and weekly sales in hundreds of dollars, : 5, 6, 9, 11, 19. Find the least-squares line and confirm it passes through the mean point. Then compare it with the line of slope 1 through the same mean point, and with the least-squares line shifted up 1 unit.
Means. meters and hundred dollars. The mean point is , and notice it is not a data point: the store with 6 meters sold 9, not 10.
Deviations. For : . For : .
Sums. and .
Slope. hundred dollars per meter. Cross-check with : , so , , and . Then .
Intercept. , so .
Confirm the mean point. At : . The line passes through while the actual store at 6 meters has residual .
Residuals of the least-squares line. Predictions are , so the residuals are . They sum to 0, and the sum of squares is .
A rival through the same mean point: , which gives 10 at . Predictions ; residuals , which also sum to 0; sum of squares . Through the mean point, and far from best.
Now shift the least-squares line up 1 unit: , which gives 11 at and so misses the mean point. Every residual drops by 1: , summing to . Sum of squares .
That last total matches the formula from earlier: .
The line is , and it passes through even though no store sits there. Slope 1 through the same mean point gives a squared-residual total of 32 against 15.10, so hitting the mean point does not make a line best. Shifting the least-squares line off the mean point by 1 raises the total from 15.10 to 20.10, so leaving the mean point always costs you.
Frequently asked questions
Does the regression line pass through any of the data points?
Usually not. It passes through , and the mean point is rarely one of your observations. In the second worked example the line runs through while the store at 6 meters actually sold 9.
If a line goes through the mean point, is it the least-squares line?
No. One line through exists for every slope, and all of them have residuals that add to zero. Only the one with slope minimizes the sum of squared residuals, so the mean-point check rules options out rather than confirming one.
Does it still hold when the correlation is weak?
Yes, for any data set with at least two different x-values. Even at the least-squares line is the flat line , which passes through the mean point. The property comes from how the fit is defined, not from how good the fit is.
Does the line pass through the median of x and the median of y?
No, and there is no reason it should. Least squares is built on means and squared distance, so the mean point is the anchor. In skewed data the median point can sit well off the line.