Correlation vs Causation in Data Science

A short and sweet explanation using real-world examples.


Photo by correlation.html


Photo by Anthony Figueroa correlation is not causation

Correlation vs Causation Difference

Photo by Lionel Valdellon correlation vs causation

Why is this important in data science?

Correlation does not imply causation.

Correlation in R

library(ggcorrplot)#read mtcars, one of the built in dataset in R
#use cor function get correlation
corr <- cor(mtcars)
#build correlation plot
ggcorrplot(corr, hc.order = TRUE, type = "lower", lab = TRUE)
output from above code snippet

Causal Impact Methods

Photo by Analytics Vidya What’s the difference between Causality and Correlation?
source: Sundas YouTube Channel

Thanks for Reading!

I write about data science, diversity & lifestyle | currently at Google | more learning content at

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store