2026-06-07

Statistics: Correlation vs Causation

What is the difference?

  • Correlation → measures how two variables move together, but does not prove one causes the other.

  • Causation → one variable directly causes changes in another.

Graph 1: Data with Correlation

Example

This graph shows a correlation between practice attendance and performance levels. As shown, the data does not prove higher performance levels are achieved by attending more practices.

Graph 2: Data with Causation

Example

For swimming, the longer you are underwater, less energy is used to complete the lap. This graph shows how underwater time directly changes energy output in swimmers.

Graph 3

Example: Hidden Third Variable

In this graph, a hidden third variable called “Swim Speed” is taken into account. Swim speed can affect both energy output and underwater time alike.

R code

Example code for graph 2

set.seed(123)

underwater_time = sample(5:40, 25, replace = TRUE)

energy_output = underwater_time * 4 + rnorm(25, mean = 0, sd = 10)

plot( underwater_time, energy_output, main = “Underwater Time vs Energy Output”, xlab = “Underwater Time (seconds)”, ylab = “Energy Output (calories)”, col = “gold”, pch = 19)

LaTeX Syntax

Ways to write “Correlation Does Not Equal Causation”

\[\text{Correlation}(X,Y)\neq\text{Causation}(X,Y)\]

\(X\not\Rightarrow Y\)

Correlation Coefficient & Statistical Relationship

\(r = \frac{sum (x_i - \bar{x})(y_i - \bar{y})} {\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}\)

\(P(Y \mid X) \neq P(Y \mid do(X))\)

- Observing X is NOT the same as intervening to change X.