Correlation
Two things vary together — taller people tend to weigh more, more study hours tend to mean higher grades. Correlation puts a single number on that co-movement: the correlation coefficient r, which runs from −1 to +1 and captures both the direction and the strength of a straight-line relationship.
Reading the number
- Sign = direction. Positive r: as one goes up, so does the other. Negative r: as one goes up, the other goes down.
- Size = strength. Near ±1 the points hug a straight line; near 0 they're a shapeless blob with no linear trend.
Numbers are abstract, though. The fastest way to build intuition is to see what an r of 0.3 versus 0.9 actually looks like — and to break a tidy relationship by dragging a single point.
🎮 Correlation Explorer
Set a target strength to generate a cloud, then drag any point. The coefficient r is computed live from whatever is on screen.
Three things people get wrong
1. Correlation only sees straight lines. A perfect U-shape (y = x²) can have r ≈ 0 even though the variables are perfectly related. Low r means "no linear trend," not "no relationship." Always look at the scatter.
2. Correlation is not causation. Ice-cream sales and drowning deaths rise together (both driven by hot weather). A strong r tells you two things move together — never why. If you can measure the lurking variable, a partial correlation asks the question again with that variable held constant, which is the same "holding the others constant" idea that multiple regression generalizes. Hold temperature constant and the ice-cream link collapses; the ones that survive are the interesting ones.
3. A single outlier can fake — or hide — a correlation. Drag one point far away in the playground and watch r lurch. Real analyses always check whether one stray point is doing all the work.
All three warnings collapse into one habit: plot your data. The classic proof is Anscombe's quartet — four datasets that share almost every summary number yet look nothing alike.
🎮 Same r, Four Different Stories
Four datasets with identical means, correlation (r = 0.82), and best-fit line. The statistics can't tell them apart — but your eyes can. Flip between them.
Every dataset above reports r = 0.82 and the exact same line — yet only the first is the tidy linear relationship that number implies. The second is a smooth curve, the third is a perfect line derailed by one outlier, and the fourth has no trend at all until a single far-flung point invents one. Summary statistics are a compression; the scatter is the truth.
Two reasons r comes out too small
A weak correlation sometimes means the relationship is weak. Two duller explanations come first, and both make an honest relationship look smaller than it is.
Restriction of range. Correlation feeds on spread, so looking at only part of the range starves it. Suppose an admissions test correlates .60 with later grades across all applicants. Compute that correlation inside the students you actually admitted, the top quarter of the test distribution, and .60 shows up as roughly .35; in the top 10% it falls to about .30. Nothing about the underlying relationship changed. You removed the variation that made it visible. This is why selective samples (admitted students, hired employees, patients sick enough to be referred) return correlations that look disappointing, and why a validity study run inside the selected group understates the very test that did the selecting.
Unreliable measures. Every measurement carries noise, and noise correlates with nothing. The shrinkage this causes has a name, attenuation. If your two variables have reliabilities rxx and ryy, the correlation you observe is the true one shrunk by a factor of √(rxx · ryy). Two questionnaires at a respectable α = .70 apiece turn a true correlation of .60 into an observed .42. The same arithmetic sets a ceiling: with those instruments, even a perfect underlying relationship could not report above .70.
Before writing "the variables were only weakly related," check both. Did you compute r inside a selected slice of the range, and how reliable were the measures? A .30 from a restricted sample with noisy instruments is compatible with a substantial relationship in the population.
Why it matters: correlation is the first measure of "do these two move together?" — and it's the direct stepping stone to regression, which turns that relationship into a predictive line.
Got two columns of your own? Paste them into the Correlation & Regression Calculator for a live scatterplot, r with its p-value and 95% CI, Spearman's ρ, and an outlier-robustness check.
Want a real cloud to try this on? screen-time.csv holds 60 people, one influential point, and the worked answer for what r does when you drop it.
Problem 20 of the practice problems computes r from six pairs of numbers by hand, then asks what besides causation could have produced it.
Common questions
What counts as a strong correlation?
Common benchmarks: |r| ≈ .10 small, .30 medium, .50+ large — psychology rarely sees field correlations above .5, while physics laughs at anything below .95. Context is everything: r = .3 between a cheap screening question and job performance is valuable; r = .8 between two versions of the same questionnaire is unremarkable. Always interpret r against what's typical for your domain.
What is the difference between Pearson and Spearman correlation?
Pearson's r measures linear association using the actual values; Spearman's ρ replaces values with ranks first, so it measures monotonic association ("consistently increasing, straight or not"). Spearman is robust to outliers and fine for ordinal data — if the two disagree sharply, that's a clue your relationship is curved or an outlier is steering Pearson.
What sample size do I need for a reliable correlation?
Correlations are noisy in small samples — with n = 25, a true r of .3 easily shows up anywhere between .0 and .6. Detecting r = .3 with 80% power needs about n = 84; and estimates only start stabilizing to a tight interval around n ≈ 150–250. Be suspicious of dramatic correlations from tiny samples.