Three self-contained Jupyter notebooks covering the full marketing measurement stack — MMM, MTA, and Triangulation — from theory to implementation, designed for data scientists.
1. MMM_Complete_Guide.ipynb — Marketing Mix Modeling (4–6 hrs)
- Foundational Theory — History, key concepts, and the science behind MMM
- Mathematical Framework — Adstock, saturation curves, and the complete MMM equation
- Implementation — Frequentist and Bayesian MMM built from scratch
- Advanced Topics — Time-varying effects, hierarchical models, and two-sided marketplace considerations
- Business Applications — ROI calculation, budget optimization, and scenario planning
2. MTA_Complete_Guide.ipynb — Multi-Touch Attribution (4–6 hrs)
- Rule-Based Models — Last-click, first-click, linear, time-decay, and position-based attribution
- Algorithmic Models — Markov chains, Shapley values, and logistic regression-based attribution
- Survival Analysis — Time-to-conversion modeling and hazard-based attribution
- Incrementality & Causal Inference — PSM, geo-lift, ghost ads, and conversion lift studies
- Privacy & Production — Cookie deprecation, iOS 14.5+, cross-device tracking, building pipelines
3. Triangulation_Guide.ipynb — Measurement Triangulation (3–4 hrs)
- Why Triangulation — The limits of any single measurement method
- MMM vs. MTA — Mapping their complementary strengths and blind spots
- Unified Measurement Framework — Combining all three methodologies
- Calibrating MMM with Experiments — Using incrementality results to set Bayesian priors
- Reconciliation Playbook — Diagnosing and resolving model vs. platform disagreements
Recommended order: MMM → MTA → Triangulation.
- Python 3.10+
- Basic statistics (regression, probability distributions)
- Familiarity with marketing concepts (helpful but not required)
# 1. Clone the repo
git clone https://github.com/mpabon10/A_Full_MMM_Guide.git
cd A_Full_MMM_Guide
# 2. Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Launch a notebook
jupyter notebook MMM_Complete_Guide.ipynb| Package | Purpose |
|---|---|
| numpy / pandas | Data manipulation |
| scipy / statsmodels | Statistical modeling |
| scikit-learn | Machine learning utilities |
| matplotlib / seaborn | Visualization |
| networkx | Graph-based attribution (Markov chains) |
| tqdm | Progress bars |
| pymc / arviz (optional) | Bayesian modeling |
See requirements.txt for pinned versions.