From Correlation to Regression
Larger x tends to come with larger y.
Larger x tends to come with smaller y.
No steady linear direction is visible.
Correlation and Linear Regression are often taught in the same breath, and they are closely related — the slope of a regression line is literally defined in terms of the correlation coefficient. But they answer different questions, and confusing them leads to real mistakes.
What correlation tells you
Correlation measures the strength and direction of a linear relationship between two variables. The coefficient runs from to . A value of tells you the variables move together strongly and positively. A value of tells you they move in opposite directions, moderately.
What correlation doesn't tell you: how much changes when changes. It tells you the relationship is strong, not the rate.
Two datasets can have identical correlation but completely different slopes.
Dataset A: ranges from 0 to 1, from 0 to 100. .
Dataset B: ranges from 0 to 100, from 0 to 1. .
The correlation is identical. But the slope in dataset A is roughly 100 (a 1-unit change in produces a 100-unit change in ), while in dataset B it's roughly 0.01.
Correlation is dimensionless — it doesn't depend on the units of either variable. Slope is not.
What regression adds
Regression gives you the equation of the relationship — specifically, the line that best predicts from .
The slope of the least squares regression line is:
This makes the connection explicit. The slope equals the correlation times the ratio of standard deviations. Correlation tells you the direction and relative strength; the standard deviations scale it into actual units.
If , , and , then . A one-unit increase in is associated with a 4-unit increase in .
Regression is directional; correlation is not
The correlation of with is the same as the correlation of with . Regression is not symmetric.
The regression of on (predicting from ) gives a different line than the regression of on (predicting from ). Both pass through , but they have different slopes unless .
This asymmetry matters when you have a clear direction of prediction. If you're trying to predict a child's height from their age, you regress height on age — not the other way around.
The coefficient of determination
gives the proportion of variance in explained by the regression. If , then — the regression explains 64% of the variation in .
The other 36% is variation that doesn't account for. It might be explained by other variables, by randomness, or by a non-linear relationship that the straight line misses.
Regression, like correlation, measures association. The slope tells you how much tends to change with in your data. It does not tell you that changing will cause to change.
Ice cream sales and drowning rates have a positive slope in a regression — more ice cream sales predicts more drownings. The confounding variable is summer. Regressing one on the other gives you a perfectly valid predictive model (given high ice cream sales, expect more drownings) without implying any causal mechanism.
To establish causation, you need either a randomised experiment or a careful causal argument about the data-generating process. Regression is a tool for description and prediction, not causation.
When to use which
Use correlation when you want to know: "do these variables tend to move together, and how strongly?"
Use regression when you want to: make predictions, understand the rate of change, or control for other variables (multiple regression).
Both are tools for describing linear relationships. Both are blind to non-linear patterns. Both can give misleading results if the relationship has a different shape — which is why plotting your data before fitting a line is not optional.
For the underlying mechanics, see Correlation and Linear Regression.