Member-only story
Causal Python — 3 Simple Techniques to Jump-Start Your Causal Inference Journey Today
Learn 3 techniques for causal effect identification and implement them in Python without losing months, weeks or days for research

If you’re reading this you’ve probably been in data science for some 2–5 years now. You have most likely heard about causality before, maybe even read a book or two on the topic, yet if you don’t feel confident or you’re missing some clarity on how to grab these concepts and make them work for you in practice without losing weeks or even months on research this post is for you.
I’ve been in a similar place! At some point I read more almost 1000 pages on causality including books and research papers and I still didn’t have clarity on how to apply some of these concepts in practice without devoting weeks to implementation!
This blog post is here to help you jump-start your causal inference journey tonight.
Let’s start!
[Links to the notebook and the conda environment file are below]
Causal Inference 101
In this post we focus on causal inference. For the purpose of this article, we’ll understand causal inference as a process of estimating the causal effect of one variable on another variable from observational data.
Causal effect estimate aims at capturing the strength of (expected) change in the outcome variable when we modify the value of the treatment by one unit.
In practice, almost any machine learning algorithm can be used for this purpose, yet in most cases we need to use these algorithms in a way that differs from the classical machine learning flow.

Confounding & Co.
The main challenge (yet not the only one) in estimating causal effects from observational data comes from confounding. Confounder is a variable in the system of interest that produces a spurious relationship between the treatment and the outcome. Spurious…