Sitemap
Data Science Collective

Advice, insights, and ideas from the Medium data science community

Follow publication

Member-only story

A Detailed Introduction to Causal Inference

15 min readMay 10, 2025

--

Introducing Causal Inference concepts with DoWhy code in Python.

Advertising Causing Purchase | Image generated by AI. Meta Llama, 2025. https://meta.ai

Introduction

When learning about Data Science, we learn that correlation does not imply causation very early. Think about it: can we tell that coffee improves productivity if we observe that the “coffee drinkers” are among the top-rated in a company? Or could we say that the number of bugs in a code is caused by the number of developers working on a project?

Of course not. Those variables might be correlated, but we can’t say one is causing the other.

As a Data Scientist, though, you will possibly face the question “what is causing that outcome” at some point in your career. And a good way to start going after the answer is by trying Causal Inference using machine learning algorithms.

To find causal responses, we will have to make assumptions about the causal structure of the event we are examining. Simply relying on the raw data will not be enough.

In this article, we will learn the essentials about Causal Inference and how to apply it using the DoWhy package in Python.

What is Causal Inference?

Causal inference is the process of determining whether one thing causes another. In other words, it’s about…

--

--

Data Science Collective
Data Science Collective

Published in Data Science Collective

Advice, insights, and ideas from the Medium data science community

Gustavo R Santos
Gustavo R Santos

Written by Gustavo R Santos

Data Scientist | I solve business challenges through the power of data. | Visit my site: https://gustavorsantos.me

Responses (3)