Key Points
- Correlation measures the strength and direction of a straight-line relationship between two variables with a single number, r, from −1 to 1.
- Regression fits an equation, ŷ = a + bx, that predicts one variable from the other.
- Correlation is symmetric, so r is the same whichever variable is called x, but regression of y on x differs from regression of x on y.
- The square of r, written r², gives the proportion of the variation in y explained by the regression line.
- A strong correlation does not show that one variable causes the other, since a third factor may drive both.
Two Questions About One Scatter Plot
Students who revise longer tend to score higher, but how much higher, and how reliably?
"How reliably" is a question for correlation. "How much higher" is a question for regression. Both start from the same scatter plot, and together they are the main tools for studying two numerical variables.

What Is Correlation?
Correlation measures how closely points cluster around a straight line. The Pearson correlation coefficient is
where , and . The correlation coefficient formula page sets out the calculation step by step.

Values near 1 mean a strong rising pattern, near a strong falling one, and near 0 no straight-line pattern. For the revision data, .
Try It Yourself
Use the scatter and best fit to see Correlation and Regression at work: drag, change the numbers and watch what happens.
What Is Regression?
Regression fits the line that best predicts from :
For the revision data, . The slope, 3.54, is the predicted gain in score for each extra hour. The line is found by the least squares method, which makes the squared prediction errors as small as possible.
How Are Correlation and Regression Different?
They answer different questions.

They are linked: the slope equals , so they always have the same sign. And is the share of the variation in that the line explains: , so about 95 percent here.
Examples of Correlation and Regression
Example 1
Using the line , predict the score of a student who revises for 6 hours.
.
Example 2
A city finds that ice cream sales and swimming accidents are strongly correlated. Should it limit ice cream sales to reduce accidents?
The strong correlation seems to suggest one drives the other.
Both rise in hot weather. Temperature is a third variable, a confounder, that causes both, so cutting ice cream sales would not prevent accidents. Correlation shows association, not cause.

Example 3
If , describe the relationship.
A strong negative linear relationship: as one variable rises, the other tends to fall.
Example 4
For the revision data, what proportion of the variation in scores does the line explain?
, about 95 percent.
Example 5
Use the line to predict the score for 20 hours of revision.
The formula gives about 120, which is impossible on a 100-mark test. The data only cover 1 to 8 hours, and extending the line far beyond them, called extrapolation, is unreliable.
Example 6
Two variables have . Are they unrelated?
Not necessarily. measures only straight-line relationships. A U-shaped pattern can have near 0 but a strong curved relationship.
Why Correlation and Regression Matter
They are the starting point for studying relationships in data.
- Prediction. Regression turns a relationship into a formula for estimates.
- Measuring strength. Correlation summarises a scatter plot in one comparable number.
- Explaining variation. shows how much of the spread in a variable accounts for.
- Building larger models. Multiple regression extends the same idea to several predictors.
OpenStax's Regression Equation section computes the line of best fit and the correlation coefficient together, as this article does.
What Most Guides Get Wrong About Correlation and Regression
Two points are often missed.
The first is causation. Many guides mention "correlation is not causation" in passing. Example 2 shows why it deserves more weight: confounders are common, and a regression line drawn through confounded data predicts well while explaining nothing about cause.
The second is the range of the data. Regression lines are often extended freely. Example 5 shows the danger: a line that fits well from 1 to 8 hours gives a nonsense prediction at 20. Predictions are trustworthy only within, or close to, the range of the data.
Where Students Trip Up on Correlation and Regression
Mistake 1: Reading correlation as cause
Where it slips in: Interpreting strong correlations, as in Example 2.
Don't do this: Concluding that causes because is large.
The correct way: Look for confounding variables, and use experiments to establish cause.
Students read cause into correlation because a tight scatter plot looks like a mechanism, and the third variable is never shown on the graph.
Mistake 2: Extrapolating far beyond the data
Where it slips in: Predictions, as in Example 5.
Don't do this: Using the line far outside the observed range.
The correct way: Keep predictions within the range of the data, and state the range.
Mistake 3: Taking r = 0 as "no relationship"
Where it slips in: Curved patterns, as in Example 6.
Don't do this: Ignoring a clear curve because is small.
The correct way: Always look at the scatter plot as well as .
The word "regression" comes from Francis Galton's work in the 1880s on the heights of parents and children: very tall parents tended to have children closer to average height, a pattern he called regression towards the mean.
Key Takeaways
- Correlation and regression study how two numerical variables move together.
- Correlation gives , from to ; regression gives the line .
- is the share of variation explained, and the slope has the same sign as .
- Neither proves cause, and predictions should stay within the data's range.
- To work through statistics with a teacher, explore Bhanzu's high school math tutor sessions or math classes online.
Read More
Research Behind This Article
- OpenStax, Introductory Statistics 2e, 12.2 Scatter Plots (2023). openstax.org
- OpenStax, Introductory Statistics 2e, 12.4 Testing the Significance of the Correlation Coefficient (2023). openstax.org
- NIST/SEMATECH, e-Handbook of Statistical Methods, 4.1.4.1 Linear Least Squares Regression (2022). itl.nist.gov
- NIST/SEMATECH, e-Handbook of Statistical Methods, 1.3.3.26 Scatter Plot (2022). itl.nist.gov
- University of St Andrews, MacTutor History of Mathematics: Francis Galton. mathshistory.st-andrews.ac.uk
Quick Quiz: Check Yourself
Three levels, fresh numbers every time, instant feedback with the working.
Was this article helpful?
Your feedback helps us write better content
Frequently Asked Questions
What is the difference between correlation and regression?
What does the correlation coefficient r tell you?
What is a regression line?
Does correlation and regression show causation?
What is r squared in correlation and regression?
