Bayesian MMM explained: The algorithm behind Recast

A walkthrough of how Recast's marketing mix modeling algorithm works. It uses Bayesian statistics to simulate different marketing scenarios and estimate which channels drive ROI, explained for both general audiences and statisticians.
So how does the algorithm that underlies Recast actually work? We get this question a lot. There are a couple of different ways to explain it. We have a bunch of documentation for the data scientists or the statisticians who want to get really into the weeds on the math. But today I'm going to try to give a simplified explanation of one way that we like to think about how the algorithm works. The first thing to know about Recast is that it's a fully Bayesian statistical model. But today I'll try to give some intuition for how this works. So the way that we like to talk about this is we like to say that Recast is a simulation engine. The first part of building a simulation engine is building a simulated world. And this is where we've actually invested most of the time that we've spent building Recast is building a. A really high fidelity simulated world. This simulated world takes into account all of the things that marketers and marketing scientists believe to be true about how marketing works. We code into this world the idea of diminishing marginal returns. As you spend more into a channel, you get less and less additional returns or additional conversions. For each additional dollar that you spend, we include time shifts or ad stocking. When you spend dollars today on some marketing channel, you get some of the effect of that marketing today and some tomorrow and some the day after that. And that stretches out into the future. And so the time shift will be different for each different marketing channel. And that's part of the simulated world. The timeshift exists. We also build into the world that marketing performance can change over time. So if Facebook performance is, you know, really high today, maybe it's 5x, it could have been 2 1/2x 6 months ago. So this idea is baked into the world. The idea of upper funnel channels and lower funnel channels, the way that TV spin can drive branded search activity, is baked into the simulation and a bunch of other things. All of these factors are baked into this simulated world. And then what Recast is doing when it's running and it's taking your data and it's running millions and millions, hundreds of millions of different simulations, different versions of this simulated world. And so you might have Simulated World 1 where it says, okay, Facebook performance is really high and TV performance is really low, and Facebook has a really short time shift, and TV has a long time shift, and the diminishing returns curve looks like that or like that. And we call that world one. And then say, okay, if world one was triggered, what would the revenue or the conversions look like in world one. And so you take the marketing spin data and you multiply it through by all of those different parameters and you'll get some curve for revenue or conversions. And then you'll repeat that process and you'll do it for world two and say, okay, in world two, TV is really performant, but Facebook isn't that performant. And the TV time shift is short and the Facebook timeshift is long, et cetera, et cetera. And then you'll say, what would the conversions or the revenue look like in that world? And you do it for world three and world four, effectively hundreds of millions of times. So we have all of these different possible worlds that cover all of the different ways that marketing could be working. And then we also have the implied revenue or conversions from all of those different worlds. And then what the algorithm is doing is it's going to look at the implied revenue or conversions from each of those different worlds and compare that to the actual revenue or conversions. And in the vast majority of those simulated worlds, the implied revenue or conversions won't match reality. Right? It'll be way far off. Actual revenue goes like this, but the simulated world goes like that. And so the algorithm will say, well, that world isn't possible, right? That world isn't consistent with the data, and so it'll throw that world out. And so it throws out the vast majority of these worlds. But what we're left with, the ones that are consistent, that shows us the range of possible values that marketing performance could take that are compatible with the data. And so it might be the case that the only worlds, the only simulated worlds that are compatible with the Data show that TV has an ROI between 5x and 6x and Facebook has an ROI between 2 and 2 1/2x, for example. Those are the only worlds that are consistent with the data. They all have those parameters within that range. And so when Recast runs, it's doing this simulation process and subsetting down all of those results and telling us, hey, what worlds are compatible with the data and what are the range of parameters from those worlds? And that's what we're actually seeing when we're looking at the Recast dashboard. Hopefully that makes sense. And for the statisticians who are watching this, hopefully this description of the Bayesian model fitting process wasn't too offensive.
More from Michael

The Continuous Testing Loop That Separates Great Marketing Teams From Average Ones









