PyCon DE & PyData 2025

Using Causal thinking to make Media Mix Modeling
2025-04-25 , Platinum3

In today's data-driven landscape, understanding causal relationships is essential for effective marketing strategies. This talk will explore the link between Bayesian causal thinking and media mix modeling, utilizing Directed Acyclic Graphs (DAGs), Structural Causal Models (SCMs), and the Data Generation Process (DGP).

We will examine how DAGs represent causal assumptions, how SCMs define relationships in media mix models, and how to implement these models within a Bayesian framework. By using media mix models as causal inference tools, we can estimate counterfactuals and causal effects, offering insights into the effectiveness of media investments.


In the era of data-driven decision-making, understanding causal relationships is crucial for effective marketing strategies. This talk delves into the underexplored connection between Bayesian causal thinking and media mix modeling, linking Directed Acyclic Graphs (DAGs), Structural Causal Models (SCMs), and the Data Generation Process (DGP). By navigating through these key concepts, we will demonstrate how we can build models that not only predict outcomes but also represent causal mechanisms within the marketing ecosystem.

Starting from foundational principles, we will explore how DAGs serve as a formal language for encoding causal assumptions, how Structural Causal Modeling define relationships in media mix models, and how we implement those in the Bayesian framework through the famous DGP. We will further illustrate how media mix models can be employed as causal inference tools to estimate counterfactuals and causal effects, providing actionable insights into the effectiveness of media investments.

Finally, we’ll show how Bayesian inference enables us to update these causal beliefs in light of data. This synthesis of causal reasoning and probabilistic modeling is not only theoretically rich but practically powerful—offering a robust framework for constructing media mix models that more accurately reflect the complexities of real-world marketing dynamics.

Attendees will leave with an understanding of how to apply Bayesian causal discovery (guided by an example in an IPython notebook) to develop causally valid models that can be applied to real-world marketing data. They will learn how to use Media Mix Models as causal inference tools to estimate counterfactual scenarios and causal effects, unlocking deeper insights into the effectiveness of media investments. This presentation aims to reveal a new pathway for marketers, data scientists, and researchers to harness the potential of these powerful methodologies together, empowering them to drive more informed, causally grounded decisions.


Expected audience expertise: Domain:

Intermediate

Expected audience expertise: Python:

Advanced

Six years ago, I discovered that my passion was in the field of data and artificial intelligence. I decided to move from Venezuela to Chile in search of new challenges and currently found one of them in Estonia, where I have had the opportunity to work on teams in Latin America, Europe and Africa.

I have been able to work on projects related to artificial intelligence, machine learning and deep learning, especially in the field of marketing, which has allowed me to help traditional companies adopt a data-driven approach. However, my latest challenge has been working at the fastest mobility company in Europe, where I have been able to apply all my knowledge and skills in a highly dynamic and constantly evolving environment.

I have had to develop different programs in Python, using SQL and No-SQL to build cloud structures that can handle large volumes of information. I have learned to work with DataBricks and DBT, and I am familiar with Google Cloud and AWS. I have also explored tools such as Airflow, CloudRun, App Engine, BigQuery, S3, DynamoDB, MongoDB, among others.

My focus has always been on the areas of statistics and mathematics, seeking to solve recurrent problems in business through techniques of computer vision, natural language processing, regression or classification algorithms, and neural networks. I have generated dashboards in Looker, Looker Studio, Tableau and Power BI, also custom reports, alerts and complex artificial intelligence models, leading teams of four to ten people, being the bridge between marketers and technical teams.

I still have a long way to go to become the "Marketing Scientist" I want to be, but I am grateful for all the opportunities and challenges I have faced so far. I am certainly eager to continue learning and growing in my career, looking for new challenges that will take me to spaces that I have not yet explored.