Media Mix Modeling: How to Measure the Effectiveness of Advertising in Python


Media Mix Modeling, also called Marketing Mix Modeling (MMM), is a technique that helps advertisers to quantify the impact of several marketing investments on sales. If a company advertises in multiple media (TV, digital ads, magazines, etc.), how can we measure the effectiveness and make future budget allocation decisions? Traditionally, regression modeling has been used, but obtaining actionable insights with that approach has been challenging.

Recently, many researchers and data scientists have tackled this problem using Bayesian statistical approaches. For example, Google has published multiple papers. LightweightMMM is a python library for MMM considering Media Saturation and Ad-stock.

However, if you are not careful with the data preparation and modeling, you will often lead to incorrect results and interpretations in real business. Therefore, it is essential to understand how to avoid the pitfalls.

In this talk, I will show the key concepts of a Bayesian approach to MMM, its implementation using Python & R, and practical tips.

Session outline :

- Introduction
- What is Media Mix Modeling?
- Data Preparation
- Modeling
- Useful Libraries
- Demo with LightweightMMM & Robyn
- Practical Tips
- Conclusion
- Q&A

Key Takeaways :
- You will understand the key concepts and approaches of Media Mix Modeling.
- You will learn how to build MMM models using Python/R for media spend optimization.

Target Audience :
- Data analysts and data scientists who are interested in marketing and advertising.
- Data analysts, data scientists, data engineers, software developers, or other IT specialists who want to collaborate with marketing teams more effectively.
- Marketers or executives who want to improve media spending efficiency.

Background Knowledge:

The following knowledge is preferred to get the most out of this talk :
- A basic understanding of Python or R
- A basic understanding of Bayesian modeling


Hajime is a data professional with five years of expertise in marketing, retail, and eCommerce, working across Japan and the United States.

As a Data Analyst at Procter and Gamble and MIKI HOUSE Americas, Hajime has led data-driven strategy formulation and implemented technology initiatives such as e-commerce expansion, advertising optimization, and the identification of growth opportunities.

As an organizer of PyData NYC, Hajime is dedicated to fostering a vibrant community centered around the exchange of knowledge on open-source technologies in New York. Additionally, Hajime lends his expertise as a contributing technical writer for Towards Data Science.

Open Data Science




Open Data Science
One Broadway
Cambridge, MA 02142

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Consent to display content from - Youtube
Consent to display content from - Vimeo
Google Maps
Consent to display content from - Google