Roadmap
The book is a single ascent: each part assumes the ones before it and exists to support the ones after, and one application — marketing mix modeling — runs through all of them. By the end you will be able to derive, build, calibrate, and optimize a full Bayesian MMM. Each part contributes one layer, and each ends with a concrete payoff.
- Part I · Mathematical Foundations. The linear algebra, calculus, and probability the rest of the book stands on — least squares and the normal equations, the eigenstructure that governs conditioning and collinearity, convex curvature read through the gradient and Hessian, and the Gaussian / covariance toolkit. The conditioning of the Gram matrix already previews the identification problem that recurs throughout.
- Part II · Regression & Bayesian Inference. OLS sampling theory and the Gauss–Markov optimality of least squares; the bias–variance trade that motivates ridge — and the recognition that a penalty is a prior, making ridge exactly the Gaussian-prior MAP estimate. From there the full Bayesian posterior (credible intervals, posterior-predictive uncertainty), hierarchical partial pooling and shrinkage, and the autocorrelation and seasonality structure of time series.
- Part III · Computation: Sampling. Why MCMC works and when to trust it: stationarity from detailed balance, convergence governed by the spectral gap, and the ergodic theorem that licenses estimating posterior expectations from a single chain. You build Metropolis–Hastings, Gibbs, and gradient-driven HMC / NUTS, and learn the diagnostics — \hat{R}, effective sample size, PIT, and simulation-based calibration — that certify a fit.
- Part IV · Optimization. Convexity as the property that turns local search into a global guarantee; the KKT conditions; and their payoff for MMM — the equal-marginal-returns (water-filling) rule for splitting a budget, linear-program duality and shadow prices, and SLSQP as Newton’s method on the KKT system.
- Part V · Marketing Mix Modeling. The synthesis: the data-generating process (adstock carryover, saturation, and a trend-and-seasonality baseline), building and fitting the Bayesian MMM, dynamic / state-space formulations, and budget optimization over the fitted response curves — with parameter uncertainty carried all the way through to the allocation decision.
- Part VI · Causal Grounding & Calibration. Why a good fit is not the same as a correct answer: potential outcomes and confounding, quasi-experimental designs (difference-in-differences, instrumental variables, geo tests), and calibrating the model against experiments through a prior store and a calibration–optimization loop. This is where the identification through-line is confronted head-on.
- Part VII · Software Engineering & Computer Science. Turning the model into a system that runs: computer-science foundations, software architecture, data engineering, and the testing and reliability practices that make an MMM reproducible and safe to operate.
- Part VIII · Capstone. The whole pipeline assembled end to end — simulate, fit, check, calibrate, optimize, test — into a single MMM you can run and trust.
A worked-solutions answer key to the exercises is available on request (see How to use this book in the preface). The full chapter list lives in the navigation sidebar.