The correlation coefficient (Pearson's r) is a number between −1 and 1 that measures both the strength and direction of the linear relationship between two quantitative variables.
r=∑(xi−xˉ)2∑(yi−yˉ)2∑(xi−xˉ)(yi−yˉ)
Each pair of values plotted as a point on the grid.
Quick Answer
The correlation coefficient (Pearson's r) is a number between −1 and 1 that measures both the strength and direction of the linear relationship between two quantitative variables. A value of 1 indicates a perfect positive linear relationship, −1 a perfect negative linear relationship, and 0 no linear relationship at all. Compute r when both variables are numerical and the scatter plot is roughly straight, to put one number on how tightly the points follow a line. It has no units, so switching from hours to minutes leaves it unchanged, and it says nothing about steepness, curves or cause.
Why This Matters
With r, strength becomes comparable across studies: sleep and quiz scores at r=0.77 are more closely linked than apps installed and hours online at r=0.14. It also unlocks regression, since the least-squares slope equals rsxsy and r2 is the share of variation a line explains. Read without a plot, though, r can be inflated by one outlier or miss a strong curve.
Intuitive Explanation
Draw a cross on the scatter plot through the point of averages (xˉ,yˉ). It splits the plot into four boxes. A dot in the upper-right box is above average on both variables; one in the lower-left is below average on both. For those dots the product (x−xˉ)(y−yˉ) is positive, while dots in the other two boxes give negative products. Add up all the products: if most dots sit upper-right and lower-left, the sum is large and positive.
The formula divides that sum by ∑(x−xˉ)2∑(y−yˉ)2, which cancels the units and squeezes the result between −1 and 1. That is why r is the same whether time is measured in hours or minutes. Values near ±1 mean the dots lie close to a line; values near 0 mean no straight-line trend. The sign gives direction only, so r=−0.9 is stronger than r=0.6, and a steep line and a gentle one can both have r=1.
Because r adds up products, one extreme point can dominate. Five points with r≈0.14 jump to r≈0.95 when a single far-off point is added, because that point's product outweighs all the others combined. And because r measures only straight-line trends, an arch-shaped pattern, such as test scores that peak at moderate anxiety, can give r=0. Look at the scatter plot before trusting the number.
Think of it like this.The correlation coefficient scores how well a crowd keeps to a single file: ±1 means everyone stands exactly on one straight line, 0 means no line at all, and the sign says whether the file runs uphill or downhill. A crowd standing in a perfect circle scores 0, even though it is very orderly.
Core idea.Multiply each point's deviations from the two means, add the products, and scale the total so it lands between −1 and 1: the result measures how closely the points follow a straight line, uphill or downhill, whatever the units or the steepness.
When to Use
Compute r when both variables are quantitative, the scatter plot is roughly linear, and the question asks how strong the relationship is or wants one number for direction and strength. Look at the plot first: if it curves, r understates the relationship; if one point sits far from the rest, report r with and without it. For predictions, use the regression line; for the share of variation explained, use r2; for categorical variables, use a two-way table.
Tip.Ask: Do you need one signed, unitless number between −1 and 1 for how tightly paired data follow a straight line?
How to Recognize It
Before computing r, check that both variables are numbers, that the scatter plot is roughly straight, and what kind of answer is wanted.
1.
Are both variables measured as numbers on the same individuals?
Yes allows r. If both are categories, compare groups with Conditional Relative Frequency; if only one is, such as team, compare the groups' means instead.
2.
Is the scatter plot roughly a straight band, with no strong bend?
Yes means r describes it fairly. For a curve, r can sit near 0 even when the link is strong, so describe the shape you see on the Scatter Plot instead.
3.
Does the answer need a sign and a size but no units?
Yes is r. If it needs units, like kilograms per centimeter, it is the slope from Linear Regression; if it needs a percent of variation explained, use R-Squared.
4.
Are all the points part of the main cloud, with none far away from the rest?
Yes lets you trust r. One extreme point can drag r toward ±1 or toward 0, so check it with Outlier Detection and report r with and without it.
Correlation Coefficient vs Correlation vs Linear Regression vs R-Squared (Coefficient of Determination)
All four describe the same scatter plot, so they get treated as one number. Ask whether you need words, a signed strength with no units, a slope with units, or a share of variation.
Correlation Coefficient vs Correlation vs Linear Regression vs R-Squared (Coefficient of Determination)
Type
Meaning
Key test
Formula
Example
Correlation Coefficient
The correlation coefficient r is a unitless number from −1 to 1 whose sign gives the direction and whose size gives the tightness of a straight-line trend.
Signed, unitless and symmetric: swapping x and y leaves it unchanged.
r=∑(xi−xˉ)2∑(yi−yˉ)2∑(xi−xˉ)(yi−yˉ)
Practice hours and free-throw percentage: r=0.92, a strong positive link.
Correlation
Correlation is the general idea that two variables tend to move together, described in words as positive, negative or none.
A description in words; no value is calculated.
—
Saying that players who practice more tend to make more of their free throws.
Linear Regression
Linear regression fits an equation for predicting y from x, whose slope has units and depends on which variable is predicted.
Gives a slope with units, such as percentage points per hour.
b1=rsxsy
With r=0.92, sy=10 points and sx=2 hours, the slope is 4.6 points per hour.
R-Squared (Coefficient of Determination)
R-squared, which equals r2 for a single straight line, is the fraction of the variation in y that the line accounts for.
From 0 to 1 with no sign; squaring r throws away the direction.
R2=r2
r=0.92 gives R2≈0.85, so practice accounts for about 85% of the variation.
Correlation Coefficient
Meaning
The correlation coefficient r is a unitless number from −1 to 1 whose sign gives the direction and whose size gives the tightness of a straight-line trend.
Key test
Signed, unitless and symmetric: swapping x and y leaves it unchanged.
Formula
r=∑(xi−xˉ)2∑(yi−yˉ)2∑(xi−xˉ)(yi−yˉ)
Example
Practice hours and free-throw percentage: r=0.92, a strong positive link.
Correlation
Meaning
Correlation is the general idea that two variables tend to move together, described in words as positive, negative or none.
Key test
A description in words; no value is calculated.
Example
Saying that players who practice more tend to make more of their free throws.
Linear Regression
Meaning
Linear regression fits an equation for predicting y from x, whose slope has units and depends on which variable is predicted.
Key test
Gives a slope with units, such as percentage points per hour.
Formula
b1=rsxsy
Example
With r=0.92, sy=10 points and sx=2 hours, the slope is 4.6 points per hour.
R-Squared (Coefficient of Determination)
Meaning
R-squared, which equals r2 for a single straight line, is the fraction of the variation in y that the line accounts for.
Key test
From 0 to 1 with no sign; squaring r throws away the direction.
Formula
R2=r2
Example
r=0.92 gives R2≈0.85, so practice accounts for about 85% of the variation.
Formula & Notation
r=∑(xi−xˉ)2∑(yi−yˉ)2∑(xi−xˉ)(yi−yˉ)
For paired observations (xi,yi), Pearson's correlation coefficient is r=∑i=1n(xi−xˉ)2⋅∑i=1n(yi−yˉ)2∑i=1n(xi−xˉ)(yi−yˉ), where r∈[−1,1].
Worked Examples
Example 1 — Compute r for sleep and quiz scores
Easy
Five students' hours of sleep and quiz scores out of 10 are (5, 6), (6, 8), (7, 9), (8, 8), (9, 9). Compute r and describe the relationship.
Show the steps and the answer
Find the means: xˉ=535=7 and yˉ=540=8.
Every term in the formula is a deviation from one of these means.
Deviations: x: −2,−1,0,1,2; y: −2,0,1,0,1. Their products, 4,0,0,0,2, add up to 6.
The positive total says the points lean toward the upper-right and lower-left boxes, an uphill trend.
Squared deviations: ∑(x−xˉ)2=10 and ∑(y−yˉ)2=4+0+1+0+1=6.
These go in the denominator to cancel the units and cap the result at ±1.
Divide: r=10⋅66=606≈7.7466≈0.77.
0.77 is well above 0 but short of 1: a clear uphill trend with some scatter, since the scores level off at 8 to 9.
Answer:r≈0.77: a fairly strong positive linear relationship between sleep and quiz score.
Takeaway:Work from the means: sum the deviation products, then divide by the square root of the product of the two sums of squares.
Example 2 — One outlier inflates r
Standard
Five teens' (apps installed, hours online per day) are (1, 3), (2, 1), (3, 4), (4, 2), (5, 3), with r≈0.14. A sixth teen, (15, 15), is added. Find the new r and explain the change.
Show the steps and the answer
New means: xˉ=630=5 and yˉ=628≈4.67.
The far-off point drags both means toward itself.
Deviation products: 6.67,11.0,1.33,2.67,0, and for the new teen 10×10.33≈103.3; total ≈125.
One point supplies about 103 of the 125, so it controls the result.
Scale: ∑(x−xˉ)2=130 and ∑(y−yˉ)2≈133.3, so r≈130×133.3125≈131.7125≈0.95.
The new r looks like a strong linear relationship, though five of the six points show almost none.
Report both values: r≈0.14 without the outlier and r≈0.95 with it.
Readers can then see that the strong correlation describes one extreme teen, not the group.
Answer:r jumps from about 0.14 to about 0.95 because of a single outlier, so the high value does not describe the typical teen.
Takeaway:Check the scatter plot for outliers before reporting r; one extreme point can create or destroy a correlation.
Example 3 — Find the mistake: zero means unrelated?
Application
Seven students rate their test anxiety from 1 to 7 and score 60, 72, 80, 84, 80, 72 and 60 respectively. A calculator gives r=0. Lee writes: "r=0, so anxiety and performance are unrelated." Find the mistake and correct it.
Show the steps and the answer
Read the pattern: scores rise from 60 to 84 as anxiety goes from 1 to 4, then fall back to 60 at 7.
The data form an arch, a strong relationship with a clear peak.
See why r=0: the mean anxiety is 4, and levels 3 and 5 (or 1 and 7, or 2 and 6) have equal scores but opposite deviations, so their products cancel in pairs.
The uphill half and the downhill half cancel exactly, leaving no straight-line trend for r to measure.
Correct the claim: r measures linear relationships only.
Lee assumed r captures every kind of relationship, the mistake of reading a linear measure as a measure of any link.
Answer:Anxiety and score are strongly related along an arch that peaks at level 4 with 84 points; r=0 means only that there is no straight-line trend.
Takeaway:A correlation near zero rules out a linear relationship, not a relationship; plot the data to see curves.
Where You'll See It
Ice cream sales and pool visits
Across summer days, ice cream sales and pool visits both rise together, giving a strong positive r near +0.8 — but the real driver is temperature, so high r does not mean ice cream causes swimming.
Phone screen time and sleep
If more nightly screen time tends to go with fewer hours of sleep, the correlation is negative (maybe r=−0.5): as one goes up, the other tends to go down.
Shoe size and reading level in kids
These correlate strongly across ages because older kids have bigger feet AND read better — a near-zero relationship once you fix age, showing a correlation can be driven by a lurking variable.
Common Mistakes
The slip:An r near 0 means there is no relationship between the variables.
Why it's tempting:Students learn r=0 as 'no pattern,' so they assume the variables are unrelated.
Instead:r measures only the LINEAR relationship. A perfect U-shape (like y=x2) can have r≈0 while having a strong non-linear relationship — always look at the scatterplot too.
The slip:A strong correlation proves one variable causes the other.
Why it's tempting:A tight, clear pattern feels like cause-and-effect.
Instead:Correlation is not causation; a high ∣r∣ can come from a confounding variable or coincidence. Only a randomized experiment can establish causation.
The slip:The sign of r tells you how steep the line is.
Why it's tempting:Students confuse r with the slope because both can be positive or negative.
Instead:r measures strength and direction, not steepness. A nearly flat line and a steep line can both have r=1; the slope depends on the units, but r is unitless and bounded between −1 and 1.
Mini Practice
Try these on your own. Tap Reveal when you want to check.
1.
Order these from weakest to strongest linear relationship: r=0.45, r=−0.92, r=0.10, r=−0.60.
Hint:Strength depends on how close r is to 1 or −1.
2.
What is r for the points (1,10), (2,8), (3,6), (4,4)? Try to answer without the full formula.
Hint:Check whether the points all lie on one straight line.
3.
Find r for the points (1,3), (2,5), (3,4), (4,8), (5,10).
Hint:Find xˉ and yˉ, then the three sums in the formula.
4.
The points (1,1), (2,2), (3,3), (4,4) have r=1. The point (10,0) is added. Find the new r.
Hint:Recompute xˉ and yˉ with all five points.
5.
The points (−2,4), (−1,1), (0,0), (1,1), (2,4) lie exactly on y=x2. Is r a good measure of this relationship?
Hint:What kind of pattern does r measure?
6.
Across 50 countries, r=0.85 between TV sets per person and life expectancy. Ken writes, "Sending more TVs to a country would raise its life expectancy." Correct him.
Hint:Is there something that could raise both numbers at once?
Want the full set?
50 practice questions for this concept — free to try, every one with a complete worked
solution showing the why, not just the answer.
Does r=0.5 mean the relationship is half as strong as r=1?
Not in any simple sense. r is not on a scale where doubling means twice as strong: r=0.5 gives R2=0.25, so the line accounts for a quarter of the variation, while r=1 accounts for all of it. Labels like weak (below about 0.3), moderate and strong (above about 0.7) are rough conventions, and different fields draw the lines in different places.
Why doesn't r change when I switch from inches to centimeters?
Because r is built from z-scores: r=n−11∑zxzy, where each z-score says how many standard deviations a value is from its mean. Converting inches to centimeters multiplies every value, the mean and the standard deviation by 2.54, so the z-scores stay the same. Flipping a variable's direction, such as recording minutes early instead of minutes late, does change one thing: the sign of r.
Why is a correlation between averages often much stronger than one between individuals?
Averaging wipes out the scatter between individuals. Across U.S. states, average years of schooling and average income line up closely, but across individual people the same two variables are much more scattered, because each person's income depends on far more than schooling. Using a correlation of group averages to describe individuals overstates how predictable people are, a mistake called the ecological fallacy.
Why can r be weak inside one college even when the link is strong overall?
Looking at a narrow slice of x hides the trend. Across all applicants, entrance-test scores and first-year grades may show a clear positive correlation. But a selective college admits only high scorers, so among its students the test scores barely differ, and the ordinary scatter of grades swamps the small differences that remain. This is called restriction of range, and it makes r look smaller than the relationship really is.
Know Correlation (direction and strength in words) and Line of Best Fit (the trend line through a scatter) first. The correlation coefficient turns that description into one unitless number from −1 to 1, built from products of deviations. Next, Linear Regression puts it to work: the least-squares slope is rsxsy, and r2 becomes the fraction of variation the line explains.