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 (xˉ,yˉ)(\bar{x}, \bar{y}): 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

a=yˉbxˉa = \bar{y} - b\bar{x}

Add bxˉb\bar{x} to both sides:

yˉ=a+bxˉ\bar{y} = a + b\bar{x}

The right side is the line y^=a+bx\hat{y} = a + bx evaluated at x=xˉx = \bar{x}, and it returns yˉ\bar{y}. So the coordinates (xˉ,yˉ)(\bar{x}, \bar{y}) 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 bb 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 di=yibxid_i = y_i - bx_i, the part of each observation the slope has not accounted for. The residual at point ii is

yi(a+bxi)=diay_i - (a + bx_i) = d_i - a

so the quantity you are minimizing is (dia)2\sum (d_i - a)^2. 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 aa that sum is an upward parabola, na22adi+di2na^2 - 2a\sum d_i + \sum d_i^2, whose vertex sits at a=dina = \frac{\sum d_i}{n}.) The mean of the did_i values is yˉbxˉ\bar{y} - b\bar{x}, so the best intercept is

a=yˉbxˉa = \bar{y} - b\bar{x}

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 (xˉ,yˉ)(\bar{x}, \bar{y}). 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 eie_i and slide it up by cc units. Every residual drops by cc, so the new total is (eic)2=ei22cei+nc2\sum (e_i - c)^2 = \sum e_i^2 - 2c\sum e_i + nc^2. The middle term vanishes because those residuals sum to zero, leaving a total larger by exactly nc2nc^2. 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 (yiabxi)2\sum (y_i - a - bx_i)^2 with respect to aa equal to zero. You get 2(yiabxi)=0-2\sum (y_i - a - bx_i) = 0, so the residuals sum to zero, so yˉ=a+bxˉ\bar{y} = a + b\bar{x}.

Going through the mean point does not make a line the LSRL

This is the trap. Passing through (xˉ,yˉ)(\bar{x}, \bar{y}) 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 y^=yˉ\hat{y} = \bar{y} 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:

b=rsysxb = r \cdot \frac{s_y}{s_x}

So a full description of the least-squares line is: the line through the mean point with slope r(sy/sx)r(s_y/s_x). 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 (xˉ,yˉ)(\bar{x}, \bar{y}) 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, sx=0s_x = 0, 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 givenYou can findHow
xˉ\bar{x}, yˉ\bar{y}, and the slope bbthe intercept aaa=yˉbxˉa = \bar{y} - b\bar{x}
the equation of the line and xˉ\bar{x}yˉ\bar{y}evaluate the line at x=xˉx = \bar{x}
rr, sxs_x, sys_y, xˉ\bar{x}, yˉ\bar{y}the whole lineb=rsysxb = r\frac{s_y}{s_x}, then a=yˉbxˉa = \bar{y} - b\bar{x}

A fourth use is a habit worth building. Once you have the line from a calculator, plug in xˉ\bar{x} and confirm you get yˉ\bar{y}. 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:

y^=yˉ+b(xxˉ)\hat{y} = \bar{y} + b(x - \bar{x})

This is the same line, in point-slope form. It predicts without ever computing aa, 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 x=xˉx = \bar{x}. The line hits the mean point, not any data point that happens to sit at x=xˉx = \bar{x}.

In standardized units, the mean point is the origin

Start from the point-slope version, y^yˉ=b(xxˉ)\hat{y} - \bar{y} = b(x - \bar{x}), substitute b=r(sy/sx)b = r(s_y/s_x), and divide both sides by sys_y:

y^yˉsy=rxxˉsx\frac{\hat{y} - \bar{y}}{s_y} = r \cdot \frac{x - \bar{x}}{s_x}

Both sides are now z-scores, so the least-squares line in standardized units is simply

zy^=rzxz_{\hat{y}} = r \cdot z_x

At the mean point, zx=0z_x = 0 and zy^=0z_{\hat{y}} = 0. Convert the data to z-scores and the mean point becomes the origin, with the regression line through it at slope rr. 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 xx is predicted only 2r2r standard deviations from average in yy, and since r1|r| \le 1, 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 rr and bb 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 xx, median of yy). 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 y^=bx\hat{y} = bx with no intercept term. With nothing to adjust the height, that line will generally miss (xˉ,yˉ)(\bar{x}, \bar{y}). It is outside the AP course, but it is why the property is stated for lines of the form y^=a+bx\hat{y} = a + bx.
  • Both directions pass through it. Regressing xx on yy instead of yy on xx gives a different line with a different slope, and it also runs through (xˉ,yˉ)(\bar{x}, \bar{y}). The two lines cross at the mean point and agree nowhere else unless r=1|r| = 1.
  • Transformed variables have their own mean point. Fit a line to xx and logy\log y and it passes through (xˉ,logy)(\bar{x}, \overline{\log y}). Undoing the transformation does not land you back on (xˉ,yˉ)(\bar{x}, \bar{y}), 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 xˉ\bar{x} and yˉ\bar{y} 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 xx and final exam score yy for every student. The summary statistics are xˉ=12.4\bar{x} = 12.4 hours, sx=4.0s_x = 4.0 hours, yˉ=68.2\bar{y} = 68.2 points, sy=17.5s_y = 17.5 points, and r=0.72r = 0.72. Find the least-squares regression line, then predict the score for a student who studies 15 hours a week.

  1. Slope first. b=rsysx=0.7217.54.0=0.724.375=3.15b = r \cdot \frac{s_y}{s_x} = 0.72 \cdot \frac{17.5}{4.0} = 0.72 \cdot 4.375 = 3.15 points per hour.

  2. Intercept from the mean point. The line passes through (12.4,68.2)(12.4, 68.2), so a=yˉbxˉ=68.23.15(12.4)a = \bar{y} - b\bar{x} = 68.2 - 3.15(12.4).

  3. Compute the product: 3.1512.4=39.063.15 \cdot 12.4 = 39.06, so a=68.239.06=29.14a = 68.2 - 39.06 = 29.14 points.

  4. The line is y^=29.14+3.15x\hat{y} = 29.14 + 3.15x.

  5. Check the mean point. At x=12.4x = 12.4: y^=29.14+3.15(12.4)=29.14+39.06=68.2\hat{y} = 29.14 + 3.15(12.4) = 29.14 + 39.06 = 68.2, which is yˉ\bar{y}. The line does go through (xˉ,yˉ)(\bar{x}, \bar{y}).

  6. Predict at 15 hours. y^=29.14+3.15(15)=29.14+47.25=76.39\hat{y} = 29.14 + 3.15(15) = 29.14 + 47.25 = 76.39 points.

  7. Same prediction from the mean point, no intercept needed. y^=yˉ+b(xxˉ)=68.2+3.15(1512.4)=68.2+3.15(2.6)=68.2+8.19=76.39\hat{y} = \bar{y} + b(x - \bar{x}) = 68.2 + 3.15(15 - 12.4) = 68.2 + 3.15(2.6) = 68.2 + 8.19 = 76.39 points.

The least-squares line is y^=29.14+3.15x\hat{y} = 29.14 + 3.15x, 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 xˉ\bar{x}, yˉ\bar{y}, and the slope.

Check the property, then break the two rules people assume

Five stores report shelf space in meters, xx: 2, 4, 6, 8, 10, and weekly sales in hundreds of dollars, yy: 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.

  1. Means. xˉ=2+4+6+8+105=305=6\bar{x} = \frac{2+4+6+8+10}{5} = \frac{30}{5} = 6 meters and yˉ=5+6+9+11+195=505=10\bar{y} = \frac{5+6+9+11+19}{5} = \frac{50}{5} = 10 hundred dollars. The mean point is (6,10)(6, 10), and notice it is not a data point: the store with 6 meters sold 9, not 10.

  2. Deviations. For xx: 4,2,0,2,4-4, -2, 0, 2, 4. For yy: 5,4,1,1,9-5, -4, -1, 1, 9.

  3. Sums. (xxˉ)2=16+4+0+4+16=40\sum (x-\bar{x})^2 = 16+4+0+4+16 = 40 and (xxˉ)(yyˉ)=20+8+0+2+36=66\sum (x-\bar{x})(y-\bar{y}) = 20+8+0+2+36 = 66.

  4. Slope. b=6640=1.65b = \frac{66}{40} = 1.65 hundred dollars per meter. Cross-check with r(sy/sx)r(s_y/s_x): (yyˉ)2=25+16+1+1+81=124\sum (y-\bar{y})^2 = 25+16+1+1+81 = 124, so sx=40/4=103.1623s_x = \sqrt{40/4} = \sqrt{10} \approx 3.1623, sy=124/4=315.5678s_y = \sqrt{124/4} = \sqrt{31} \approx 5.5678, and r=6640124=6649606670.42730.9371r = \frac{66}{\sqrt{40 \cdot 124}} = \frac{66}{\sqrt{4960}} \approx \frac{66}{70.4273} \approx 0.9371. Then 0.93715.56783.16230.93711.76071.650.9371 \cdot \frac{5.5678}{3.1623} \approx 0.9371 \cdot 1.7607 \approx 1.65.

  5. Intercept. a=yˉbxˉ=101.65(6)=109.9=0.1a = \bar{y} - b\bar{x} = 10 - 1.65(6) = 10 - 9.9 = 0.1, so y^=0.1+1.65x\hat{y} = 0.1 + 1.65x.

  6. Confirm the mean point. At x=6x = 6: y^=0.1+9.9=10=yˉ\hat{y} = 0.1 + 9.9 = 10 = \bar{y}. The line passes through (6,10)(6, 10) while the actual store at 6 meters has residual 910=19 - 10 = -1.

  7. Residuals of the least-squares line. Predictions are 3.4,6.7,10.0,13.3,16.63.4, 6.7, 10.0, 13.3, 16.6, so the residuals are 1.6,0.7,1.0,2.3,2.41.6, -0.7, -1.0, -2.3, 2.4. They sum to 0, and the sum of squares is 2.56+0.49+1.00+5.29+5.76=15.102.56+0.49+1.00+5.29+5.76 = 15.10.

  8. A rival through the same mean point: y^=4+x\hat{y} = 4 + x, which gives 10 at x=6x = 6. Predictions 6,8,10,12,146, 8, 10, 12, 14; residuals 1,2,1,1,5-1, -2, -1, -1, 5, which also sum to 0; sum of squares 1+4+1+1+25=321+4+1+1+25 = 32. Through the mean point, and far from best.

  9. Now shift the least-squares line up 1 unit: y^=1.1+1.65x\hat{y} = 1.1 + 1.65x, which gives 11 at x=6x = 6 and so misses the mean point. Every residual drops by 1: 0.6,1.7,2.0,3.3,1.40.6, -1.7, -2.0, -3.3, 1.4, summing to 5-5. Sum of squares 0.36+2.89+4.00+10.89+1.96=20.100.36+2.89+4.00+10.89+1.96 = 20.10.

  10. That last total matches the formula from earlier: 15.10+nc2=15.10+5(1)2=20.1015.10 + nc^2 = 15.10 + 5(1)^2 = 20.10.

The line is y^=0.1+1.65x\hat{y} = 0.1 + 1.65x, and it passes through (6,10)=(xˉ,yˉ)(6, 10) = (\bar{x}, \bar{y}) 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 (xˉ,yˉ)(\bar{x}, \bar{y}), and the mean point is rarely one of your observations. In the second worked example the line runs through (6,10)(6, 10) 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 (xˉ,yˉ)(\bar{x}, \bar{y}) exists for every slope, and all of them have residuals that add to zero. Only the one with slope b=r(sy/sx)b = r(s_y/s_x) 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 r=0r = 0 the least-squares line is the flat line y^=yˉ\hat{y} = \bar{y}, 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.