Correlation vs regression: how they differ

By Jude Wallis · Published

Correlation gives a single number, r, that measures the strength and direction of a linear relationship; regression fits a line that predicts one variable from another, giving a slope and an intercept.

AP Statistics: Unit 5 (topics 5.2 Correlation, 5.3 Linear Regression Models, 5.5 Least-Squares Regression). In the Fall 2026 AP Statistics course, correlation is topic 5.2 and least-squares regression spans topics 5.3 through 5.5; the course treats regression descriptively, and inference for the slope of a regression model is not part of it.

What correlation is

Correlation measures the strength and direction of a linear relationship between two quantitative variables with a single number, the correlation coefficient rr. It ranges from 1-1 to 11: values near 11 mean a strong positive linear pattern, values near 1-1 a strong negative one, and values near 00 little linear association. Correlation has no units and does not change if you swap which variable is xx and which is yy. It answers how tightly the points cluster around a line, not what that line is.

What regression is

Regression fits an actual line to the data so you can predict one variable from another. The least-squares regression line is written y^=a+bx\hat{y} = a + bx (y-hat is the predicted response, aa the intercept, bb the slope), and it treats xx as the explanatory variable and yy as the response. The slope bb carries units, giving the predicted change in yy for each one-unit increase in xx. Unlike correlation, regression is directional: predicting yy from xx is a different line from predicting xx from yy.

Correlation vs regression at a glance

Correlation and regression describe the same relationship but answer different questions.

FeatureCorrelationRegression
OutputOne number, rrA line, y^=a+bx\hat{y} = a + bx
QuestionHow strong is the linear link?What line best predicts yy?
UnitsNoneSlope has units
DirectionSymmetric in xx and yyDepends on which is the response
Range1r1-1 \le r \le 1Slope and intercept unbounded
Main useMeasure associationMake predictions

When to use which

Reach for correlation when your goal is to summarize how strong and in what direction two variables move together. Reach for regression when you want to model the relationship and describe or predict how yy responds to xx. The two are linked: the slope and correlation share a sign, and b=rsysxb = r \cdot \frac{s_y}{s_x} connects them through the standard deviations. Squaring the correlation gives r2r^2, the fraction of the variation in yy that the regression line accounts for.

The classic mix-up and how to avoid it

The common error is treating rr and the slope bb as the same thing; they are not, because rr is unitless while bb is in units of yy per unit of xx. They always share a sign, and they are equal only in the special case where sx=sys_x = s_y. A second trap is reading either one as proof of causation, when both only describe association; see correlation vs causation. Keep them straight by remembering that correlation reports the tightness of the pattern, while regression reports the line itself.

From correlation to the regression line

A dataset has correlation r=0.8r = 0.8, with xˉ=10\bar{x} = 10, sx=2s_x = 2, yˉ=30\bar{y} = 30, and sy=5s_y = 5. Find the slope and intercept of the least-squares line, and interpret r2r^2.

  1. Slope from the correlation: b=rsysx=0.8×52=0.8×2.5=2.0b = r \cdot \frac{s_y}{s_x} = 0.8 \times \frac{5}{2} = 0.8 \times 2.5 = 2.0.

  2. Intercept, using that the line passes through (xˉ,yˉ)(\bar{x}, \bar{y}): a=yˉbxˉ=302.0×10=3020=10a = \bar{y} - b\bar{x} = 30 - 2.0 \times 10 = 30 - 20 = 10.

  3. Regression line: y^=10+2x\hat{y} = 10 + 2x.

  4. Coefficient of determination: r2=0.82=0.64r^2 = 0.8^2 = 0.64, so about 64%64\% of the variation in yy is explained by the linear model.

  5. Compare the two summaries: correlation is the single unitless number 0.80.8, while regression is the full line y^=10+2x\hat{y} = 10 + 2x whose slope 2.02.0 is in units of yy per unit of xx.

The least-squares line is y^=10+2x\hat{y} = 10 + 2x with r2=0.64r^2 = 0.64; correlation compresses the relationship to r=0.8r = 0.8, while regression expresses it as a predictive line with a slope that carries units.

Frequently asked questions

Can you have a strong correlation but a small slope?

Yes. The slope depends on the spread of the two variables through b=rsysxb = r \cdot \frac{s_y}{s_x}, so a high correlation paired with a small sys_y relative to sxs_x produces a small slope. Correlation strength and slope size are separate ideas.

Does the AP exam test inference for the regression slope?

No. The Fall 2026 AP Statistics course covers regression descriptively, including the least-squares line, residuals, rr, and r2r^2, but inference for the slope of a regression model is not part of this course. It remains standard content in a full college statistics course.