Find a course

Module 3: Analyzing DataLesson 7 of 1012 min

Patterns, Correlation and Causation

Read trends and slopes on graphs, describe positive and negative correlations, and learn why a correlation alone never proves that one thing causes another.

Step 1 of 12Learn

Ice cream and sunburns

Here's a real pattern: on days when ice cream sales are high, more people get sunburned. Does ice cream cause sunburn? Of course not. Hot, sunny days cause both: more people buy ice cream and more people spend hours in the sun.

This is the most important idea in data analysis: correlation is not causation.

A correlation is a relationship in which two variables change together. In a positive correlation, both go up together (taller people tend to have bigger shoe sizes). In a negative correlation, one goes up as the other goes down (the more hours of screen time before bed, the fewer hours of sleep, on average). If there's no pattern at all, there's no correlation.

A correlation can happen for several reasons:

  1. A causes B. Exercising more improves fitness.
  2. B causes A. (Reverse causation.) Sick people take more medicine, but medicine doesn't cause the sickness.
  3. A third variable causes both. Hot weather drives ice cream sales and sunburns. This hidden factor is called a confounding variable.
  4. Coincidence. With enough data sets, some will line up by pure chance.

Step 2 of 12Practice · Diagram

One cause, two effects

Which node actually causes the other two?

Tap the shape that answers the question, then press Check.

One cause, two effectsHierarchy diagram: Hot, sunny day, More ice cream sold, More sunburns.Hot, sunny dayMore ice cream soldMore sunburns
Hot, sunny day

The third variable.

More ice cream sold
More sunburns

Step 3 of 12Practice · Sort into groups

Classify each relationship.

Tap an item, then tap its group (or drag it there).

Step 4 of 12Chart

Temperature and ice cream cones sold

Temperature and ice cream cones soldScatter plot with 8 points: Day 1: High temperature (°C) 18, Cones sold 120; Day 2: High temperature (°C) 20, Cones sold 135; Day 3: High temperature (°C) 22, Cones sold 150; Day 4: High temperature (°C) 24, Cones sold 170; Day 5: High temperature (°C) 26, Cones sold 180; Day 6: High temperature (°C) 28, Cones sold 205; Day 7: High temperature (°C) 30, Cones sold 220; Day 8: High temperature (°C) 32, Cones sold 240.1001251501752002252501520253035Cones soldHigh temperature (°C)Day 1Day 2Day 3Day 4Day 5Day 6Day 7Day 8
Illustrative data showing a strong positive correlation: dots rise from left to right.
Temperature and ice cream cones sold
PointHigh temperature (°C)Cones sold
Day 118120
Day 220135
Day 322150
Day 424170
Day 526180
Day 628205
Day 730220
Day 832240

Step 5 of 12Learn

How to show causation

If correlations can mislead, how do scientists ever conclude that one thing causes another? Mostly by doing what this course has taught: a controlled experiment. When you randomly assign subjects to groups and change only one variable, a confounding variable can't explain the difference, because the groups are alike in every other way on average.

Sometimes experiments are impossible or unethical. You can't randomly assign teens to smoke for 20 years. Then scientists rely on observational studies, collecting data without intervening, and build a case for causation from several lines of evidence:

  • The cause comes before the effect.
  • More of the cause produces more of the effect (a dose-response pattern: heavier smokers have higher lung cancer risk).
  • The link holds up in many studies, places and groups of people.
  • There's a plausible mechanism (chemicals in smoke damage DNA in lung cells).
  • Known confounders, such as age or income, have been measured and accounted for.

This is how the link between smoking and lung cancer was established without anyone running a smoking experiment on people. When you read a headline like "coffee drinkers live longer," ask: was this an experiment or an observation? And what third variable might explain it?

Step 6 of 12Practice · What would you do?

What would you do?

A news story says: "Students who eat breakfast get better grades." The data came from a survey, not an experiment. What is the most careful conclusion?

Step 7 of 12Explore

Trend lines and slope

A straight trend line has the form y = m·x + b. The slope m tells you how much y changes for each one-unit increase in x: positive slope means a positive correlation, negative slope a negative one. The intercept b is the predicted y when x = 0. Here x is hours of practice per week and y is a predicted score.

0255075100 0246810
Predicted score at 5 hours
65
Change from 2 to 6 hours
12

Step 8 of 12Practice · Work it out

A trend line for plant growth is y = 2.5x + 4, where x is weeks and y is height in cm. What height does it predict at 6 weeks?

Step 9 of 12Note

Step 10 of 12Practice · Match the pairs

Match each explanation of a correlation to its example.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. Third variable
  2. Reverse causation
  3. Direct cause
  4. Coincidence

Step 11 of 12Practice · True or false

A strong correlation between two variables proves that one causes the other.

Step 12 of 12Practice · Choose one

Researchers find that cities with more trees have lower rates of asthma. Which follow-up would best test whether trees reduce asthma?