Phase 3: Data & Statistical Literacy · ~30 minutes · Python · uv
Correlation, Causation, and Lying with Charts
Ice cream sales and drowning deaths correlate at 0.99. Ice cream doesn't cause drowning. Summer causes both.
Hiring signal: Never claims causation from a correlation alone, and can name what evidence would actually be needed
What you will learn
- Compute a correlation between two variables and interpret its strength
- Explain why a strong correlation is not evidence of a causal mechanism
- Identify a plausible confounding variable behind a correlation
- Recognize how axis truncation and cherry-picked ranges make charts visually misleading
Introduction
Type: Learn Languages: Python Prerequisites: Lesson 03 (Distributions — Why Shape Matters) Time: ~30 minutes
Objective
Learning objectives
- Compute a correlation between two variables and interpret its strength
- Explain why a strong correlation is not evidence of a causal mechanism
- Identify a plausible confounding variable behind a correlation
- Recognize how axis truncation and cherry-picked ranges make charts visually misleading
What you're building
A script (correlation_check.py) that:
- Defines two real lists of at least 8 paired values each, representing two variables you'd expect to correlate (invented is fine — e.g., study hours and exam scores, temperature and energy usage)
- Computes their correlation using the function from this lesson
- Prints a plausible, named confounding variable that could explain the correlation without either variable directly causing the other — even if you believe there might be a real, direct causal relationship, name the confounder-based alternative explanation anyway
- Contains a comment computing what a chart of your two values would look like with a truncated vs. zero-based axis, and states in words which one would visually exaggerate the difference
A news headline reads: "Cities with more coffee shops have lower crime rates — coffee shops reduce crime!" What's the most accurate response, using this lesson's ideas?
This is structurally identical to the ice cream/drowning example, just with a more plausible-sounding causal story attached — which is exactly what makes real-world confounded correlations dangerous; a believable mechanism doesn't make a correlation into causation. Area wealth/development is a strong, realistic confounder here: it plausibly drives both more coffee shop openings (more disposable income, more foot traffic supporting a business) AND lower crime rates (more resources, different socioeconomic conditions), independent of any direct causal link between coffee and crime. The correct response is never "definitely true" or "definitely false" from correlation alone — it's identifying what would actually need to be checked (confounders ruled out, plausible mechanism, correct time order) before believing the causal claim.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The Problem, Check Yourself, Key Terms & Next — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy