Marketing Mix Modeling Lab
Upload data, validate, fit a model, read ROI with its uncertainty, optimize the budget, export the plan.
- Free
- Runs in your browser
- No sign-up
- Synthetic example included
One row per week: a date, the KPI you want to explain, spend per paid channel, and optional controls such as promotions or holidays.
No data yet
Upload a weekly CSV or use the synthetic example to walk through the whole workflow.
No model yet
Go back to Data and press Fit model.
How it works
What this model does
A marketing mix model explains a weekly KPI, such as revenue, as a baseline (trend, seasonality, promotions, holidays) plus the effect of each paid channel. Two transforms make the channel effects realistic. Adstock carries a share of each week's spend into the following weeks, because an ad seen today can sell next week. A Hill saturation curve makes each extra dollar return a little less than the one before.
How it is fitted
This lab follows the approach of Meta's open-source Robyn. Four independent searches each try 300 combinations of carryover and saturation settings per channel, fit each with ridge regression (channel effects cannot go negative), and score them on a validation window. A final test window of the last weeks is kept apart and only used to report the error on unseen weeks. A small penalty favours models whose split of credit is not wildly out of line with the split of spend, because fit alone cannot tell a saturated channel from extra baseline. That penalty is a nudge, not a rule.
How sure is it?
The ranges come from a bootstrap. Each search refits its best models on resampled data 40 times, searching the carryover and saturation settings again each time, and the four searches are pooled, so a rerun gives nearly the same answer. Raw bootstrap ranges proved too narrow, so they are widened by 1.5. On synthetic datasets with a known true answer, the 90% range then held the true ROI in 18 of 18 cases and the true next-dollar return for 21 of 25 channels whose spend stayed within their history (12 of 12 on data built to break its assumptions). A budget move is only recommended when the models and all four searches agree and even the cautious gain is positive. Across eleven test datasets, including five with a deliberately wrong budget, no Grow or Trim call contradicted the truth and no recommended move lost revenue; the lab held back on 8 of 23 clear cases rather than guess. On data built to break its assumptions (TV whose effect peaks weeks later, channels that move together, a promotion it cannot see) it made 4 calls, all right, and held back on 4 of 8 clear cases.
What it cannot do
It is not a Bayesian model like Google's Meridian or PyMC-Marketing, which need Python and minutes to hours of compute. Lift test results can calibrate it (under Data, Advanced): the search then prefers models that reproduce your test, which in synthetic tests narrowed that channel's next-dollar range on every seed. It does not separate geography, and it treats every channel's spend as one weekly number. Any MMM is correlational at heart: when two channels always move together, no model can split their credit. A geo or holdout test is how you settle that for one channel.
Learn the pieces first
The regression, correlation and confidence interval ideas behind this lab are covered in the free Analytics from Scratch course. To try them on their own, use the correlation calculator and the confidence interval calculator. To build the same model yourself, download the Python notebook and the synthetic data.
Marketing science is an analyst job
Marketing, data and business analyst roles, scraped daily from company career pages.
