Problem
Marketing teams spend on TV, print, outdoor, social and search at once and need to know what each channel adds to revenue. Marketing mix modeling (MMM) answers this from historical weekly time series with a regression. Two effects complicate it: an ad keeps working for days or weeks after it runs (carryover), and past some spend each extra euro adds nothing (saturation). Media coefficients must also stay positive to make marketing sense.
Example from the article: Robyn's public demo data holds 208 weeks of revenue, five media channels, a newsletter and control variables. The task is to fit a Bayesian marketing mix model on a 92-week window and compare each channel's share of effect with its share of spend.
Solution in brief
Fit one additive regression of revenue on adstocked and saturated media variables plus controls, with PyMC3 priors that keep media effects positive. Scale inputs to 0–1 so the same priors work for every channel.
Questions this case answers
- How to attribute an aggregate outcome to several spend channels from weekly time series when randomized holdouts are unavailable and each channel has lagged, saturating effects
- How to estimate how much revenue each advertising channel drives when no experiment is possible?
- How to model carryover and diminishing returns of ad spend in a Bayesian marketing mix model?
- How to choose priors and scale the data so a Bayesian marketing mix model fits and converges?
Tools and methods
- Bayesian additive regression — baseline plus media plus controls
- Geometric adstock — carryover with one decay parameter
- Hill saturation function — diminishing returns
- PyMC — priors and MCMC sampling (PyMC3 with Theano in the article)
- Prophet — trend, seasonality, holidays and events as controls
- Robyn — Meta's open-source MMM (Ridge regression plus gradient-free hyperparameter search), the benchmark
Google or a one-time email code. No password.