Data
Correlation vs Regression: When to Use Which (With Real Examples)
Correlation and regression both describe how two variables relate, and they use the same data — but they answer different questions. Correlation asks “how strongly do these move together?” Regression asks “how much does Y change when X changes, and what will Y be for a given X?”
The difference at a glance
- Output: correlation gives one number, r (−1 to +1). Regression gives an equation, y = m·x + b, plus R².
- Direction: correlation is symmetric — r for X and Y is the same as for Y and X. Regression is not: predicting Y from X gives a different line from predicting X from Y.
- Use: correlation screens for relationships; regression quantifies and predicts.
- Shared ground: in simple linear regression, R² equals r².
Worked example: training hours and test improvement
Eight employees completed between 1 and 8 hours of training. Their test scores improved by 3, 5, 4, 7, 8, 7, 10 and 11 points respectively.
Correlation
Pearson’s r = 0.948 — a strong positive relationship. r² = 0.898, so about 90% of the variation in improvement lines up with training hours. Check it in the correlation calculator.
Regression
The least-squares line is y = 1.083x + 2.000, with R² = 0.898 (the same as r², as expected).
- Slope 1.083: each extra hour of training is associated with about one more point of improvement.
- Prediction: for 9 hours, the line predicts 1.083 × 9 + 2 ≈ 11.7 points — though 9 hours is just outside the data, so treat it cautiously.
Fit your own line with the regression calculator.
A business example: ad spend and leads
Monthly ad spend of $2,000–$7,000 against leads of 11, 14, 15, 19, 21 and 24 gives r = 0.993 and the line y = 2.571x + 5.762 (x in $ thousands). Correlation says the two move together almost perfectly; regression adds the useful part: roughly 2.6 extra leads per extra $1,000 — the number you need for budget planning.
When to use which
- Use correlation to check many variable pairs quickly, or when neither variable is clearly the “input”.
- Use regression when you want to predict an outcome, estimate the effect of a change, or set targets.
Pitfalls that apply to both
- Correlation is not causation. Ice-cream sales and sunburns rise together because of the weather, not because one causes the other. Regression does not fix this — a slope is an association unless the data comes from a controlled experiment.
- Straight lines only. Pearson’s r and simple linear regression miss curved relationships. A U-shaped pattern can have r near zero.
- Outliers. One extreme point can create or erase a relationship. Always plot the data.
- Small samples. With six or eight points, a strong r can still be luck.
- Extrapolation. A regression line is only trustworthy within the range of X values used to fit it.
FAQs
Can correlation be strong but regression useless? Yes, if the slope is tiny in practical terms. A perfect correlation with a slope of 0.001 may not matter for decisions.
What is a good R²? It depends on the field: physical measurements often exceed 0.9, while 0.4–0.6 can be useful for marketing or social data.
What about more than one predictor? That is multiple regression, which needs a spreadsheet’s regression tool or statistical software.