Skip to content
Grad Coach

Diagram · CC BY 4.0

Correlation vs causation example: ice cream and drownings

Hot weather drives both ice cream sales and drownings; the two are correlated, and neither causes the other.

A causal diagram of a confounder, using the standard example that ice cream sales and drownings rise together. Hot weather, the confounder (Z), causes both: solid arrows run from it to ice cream sales (X) and to drownings (Y), the arrows labeled "More people buy ice cream" and "More people go swimming". There is no causal arrow between ice cream sales and drownings; they are joined only by a dotted orange line, labeled "Correlated but neither causes the other", for the correlation that appears in the data. A key names the two line types: solid arrow, causes; dotted line, correlation with no causal link.

Swipe sideways to see the whole diagram, or download the PNG.

Confounding variable - hot weather, ice cream sales and drownings. Derek Jansen, Grad Coach, CC BY 4.0.

What it shows

A causal diagram of a confounder, using the familiar example that ice cream sales and drownings rise together. Hot weather (Z) causes both: more people buy ice cream (X), and more people go swimming, so drownings (Y) rise.

There is no causal arrow between ice cream sales and drownings. They are joined only by a dotted line for the correlation that appears in the data.

How to read it

  1. Solid arrows mean “causes”; follow them out from hot weather.

  2. The dotted line between X and Y marks a correlation only, with no causal link, as the key states.

The variables

  • Z, the confounder: hot weather.
  • X: ice cream sales.
  • Y: drownings.
  • Z → X arrow: “More people buy ice cream”.
  • Z → Y arrow: “More people go swimming”, the route by which hot weather raises drownings.
  • X and Y: “Correlated but neither causes the other”.

Ways to use it in teaching

  • Students propose a confounder for a correlation reported in the news, then draw its diagram.

  • Introduce controlling for Z: what would the X–Y correlation look like on days of the same temperature?

  • In a research design session, it sets up the difference between observational studies and experiments.

For how studies name and control their variables, see our guide to research variables.

Sources

  • Confounding. (n.d.). In Wikipedia. Retrieved October 18, 2026, from https://en.wikipedia.org/wiki/Confounding
  • Correlation does not imply causation. (n.d.). In Wikipedia. Retrieved October 18, 2026, from https://en.wikipedia.org/wiki/Correlation_does_not_imply_causation
  • Spurious relationship. (n.d.). In Wikipedia. Retrieved October 18, 2026, from https://en.wikipedia.org/wiki/Spurious_relationship

Inference and evidence

Related diagrams

All open educational resources

Need something else?

Tell us which diagram, template or worked examples would help your teaching, and we’ll do our best to add it to the collection.