← All MathIsland labs
rCorrelation Lab

The real culprit isn't the ice cream.

Days with more ice cream sales have more drownings. Would banning ice cream reduce accidents?

'Moves together' is not 'because of'.

Experiment

Hands-on experiment

Predict first — ice cream sales and drownings move strongly together (r≈0.98). Would banning ice cream reduce drownings?

Monthly data scatter — ice cream vs drownings

x: Ice cream sales index · y: Drowning incidents

Read more — why it exists · insights · common mistakes · formulasExpand ▾

Why

Why does this exist?

In an age of abundant data, pairs of variables that 'move together' are everywhere — and most of them are not each other's cause.

The strength of moving-together, compressed into one number between −1 and +1, is the correlation coefficient r. A powerful summary — that says nothing about WHY they move together.

Ice cream and drownings (common cause: summer), fire trucks and fire damage (reading the arrow backwards) — the moment you leap from correlation to causation, policies, investments, and health judgments go wrong. This distinction is the heart of data literacy.

Insight

Insights from the video

Correlation is a fact; causation is a story.

r=0.9 is a fact the data states. 'Because of' is a story humans attach — and whether the story is true cannot be checked from the data alone.

The hidden-variable question: 'is there a third thing moving both?'

Behind ice cream and drownings stood the temperature. Asking this question reflexively whenever you meet a correlation — that is statistical thinking.

Misconception

Common misconceptions

A high correlation means causation.

Correlation is only a record that two things moved together. It could be A→B, B→A, a hidden C moving both, or pure coincidence. Causation requires work beyond the data — experiments and controls.

r = 0 means no relationship at all.

r measures only straight-line relationships. A perfect U-shape can score r=0. r=0 means 'no linear relationship', not 'no relationship' — which is why you must look at the scatter plot.

Formula

Writing it as math

The strength of moving-together you saw in the scatter, summarized as a number:

The correlation coefficient

When both variables stray from their means in the same direction, +; opposite directions, −. Always between −1 and +1.

Reading r

The sign is the direction; the magnitude is how tightly the dots hug a line. Even large |r| reveals no 'why'.

Correlation ≠ causation

A→B, B→A, C→(A,B), coincidence — four candidate explanations, always. Separating them takes controlled experiments or outside knowledge.

In Real Life

Where you meet it in real life

Reading health news

'Wine drinkers live longer' — income and lifestyle are the usual third-variable culprits. This is the difference between observational studies and clinical trials.

Diversification in investing

Mixing low-correlation assets calms a portfolio's wobble — correlation is a core input of asset allocation.

Recommendation algorithms

'People who bought this also bought…' — recommendations are built on correlation. Even without causation, it can predict.

The spurious-correlation gallery

'Nicolas Cage films per year vs pool drownings' (r=0.66) — with enough data, coincidental correlations are guaranteed to appear.

Try Yourself

Test yourself

Q1'Fires with more fire trucks have higher damages — cut the fire trucks!' Which trap is this?Show answer ▾

A third variable (the fire's size). Big fires bring both more trucks and more damage. You can also read it as reverse causation. Either way, 'cut the trucks' is a misreading.

Q2What's the correlation of a perfect U-shape (say, stress vs performance)?Show answer ▾

Near 0 — the rising left half and falling right half cancel. Why you can't conclude 'no relationship' from r alone: draw the scatter.

Q3What's the most powerful way to establish causation?Show answer ▾

A randomized controlled trial (RCT) — split people randomly and treat only one group, and third variables get evenly mixed into both, making correlation equal causation. Drug trials are built this way.

Try answering yourself before revealing it — getting it wrong is where learning starts.

Connection

Concepts connect

Previous concept

95%

Sampling & Estimation

Having learned to estimate single values, it's time to read relationships between two variables.

← Sampling & Estimation lab

Leads to next

Gradient Descent

You've read relationships from data — now see how a machine finds them by itself: the heart of AI learning.

Go to the Gradient Descent lab →

Related

Labs worth exploring together

Related lab

95%

Sampling & Estimation

Correlations are computed from samples too — remember that small-data correlations can be luck.

Go to the Sampling & Estimation lab →