Back to courseLesson 13 of 14

Correlation

What you'll learn

Measure how tightly two variables move together with the correlation coefficient r.

So far, one variable at a time. But the interesting questions are about relationships: do taller people weigh more? Does study time raise grades? Correlation measures how tightly two variables move together.

The correlation coefficient r

Plot the pairs as a scatter and the pattern jumps out. The correlation coefficient r puts a number on it, always between −1 and +1:

r ≈ +0.9r ≈ 0r ≈ −0.8
The correlation coefficient r runs from −1 to +1: near +1 the points hug a rising line, near 0 there’s no linear pattern, near −1 they hug a falling line. r measures linear association only.
  • r near +1 — a tight rising line: as one goes up, so does the other.
  • r near 0 — no linear pattern; a shapeless cloud.
  • r near −1 — a tight falling line: as one goes up, the other goes down.

The sign gives the direction; the magnitude (how close to 1) gives the strength. r = 0.9 is a strong positive relationship; r = −0.3 a weak negative one.

What r misses

r only sees straight-line association. A perfect U-shaped relationship — very real — can have r ≈ 0, because it isn't linear. And a single outlier can inflate or hide a correlation. So r is never a substitute for actually looking at the scatter plot.

Correlation is not causation

The one rule everyone quotes and still forgets. Ice-cream sales correlate with drownings — because both rise in summer, not because one causes the other. A lurking third variable (here, hot weather) can drive two things together with no causal link between them. Correlation is a clue to investigate, never a verdict.

Why this matters

Correlation is the first step in almost every data investigation — spotting which variables travel together before asking why. It also sets up the next tool: once two variables are linearly related, regression draws the line that lets you predict one from the other.

Check your understanding

Question 1 of 2

A correlation of r ≈ −0.9 indicates:

Next lesson