Problem
A marketing team splits a daily budget across channels such as TV, radio and web banners and wants to know which channel earns its money. The usual approach treats saturation and carryover as hyperparameters and tunes them on a test set. The estimates are unstable: very different settings give the same or MAPE (mean absolute percentage error) on test data, yet they extrapolate differently. Budget optimization needs extrapolation: you must know what 5,000 or 10,000 euros per day on TV would do when history only covers 0 to 1,000.
Example from the article: a TV model with carryover strength 0.4 and saturation 0.8 and another with carryover 0.9 and saturation 0.5 score the same on the test set but predict different sales at higher spend.
Solution in brief
Treat saturation and carryover as ordinary model parameters with priors and fit all of them together by MCMC (Markov chain Monte Carlo) in PyMC. The posterior shows which parameter combinations the data supports and how they trade off, instead of hiding that in one "best" hyperparameter set. Channel contributions are then read from posterior means.
Questions this case answers
- How to estimate the effect of each spend channel on an outcome from aggregate time series when the effect saturates and carries over in time, and the usual hyperparameter search gives unstable estimates
- How to extrapolate a response curve beyond the observed spend range when equally accurate models disagree outside it
- How to estimate how much each paid media channel contributes to sales from spend history alone?
- How to get stable saturation and carryover estimates when many hyperparameter sets fit the test set equally well?
Tools and methods
- Bayesian regression — one model with priors on coefficients, saturation, carryover, baseline and noise
- Adstock (carryover) — spend effect that fades over the following days
- Saturation curve — diminishing returns of spend:
- PyMC — builds the model and samples the posterior
Google or a one-time email code. No password.