Black Friday in MMM: The Attribution Trap
Accounting for how customers change when they buy
Black Friday is one of the easiest events to spot in a sales chart. Orders rise sharply, then settle back. It is tempting to give the whole spike its own holiday effect in a marketing mix model (MMM).
The attribution trap is crediting Black Friday for the entire spike when some of those sales were simply moved from nearby days. A customer who was going to buy next week may buy on Black Friday instead. Someone planning to buy this week may wait for the offer. If we model only the spike, we risk treating a change in when people purchase as a change in how much they purchase.
This is especially relevant to e-commerce, where a shopper can wait for a discount and complete the purchase as soon as it appears. A sharp rise in orders may therefore include sales pulled from the days on either side of the offer.
This post moves through three ways to represent Black Friday: a simple indicator, a smooth Gaussian basis, and a suggested basis that can also express lower sales on either side of the event. The last is a proposal to test, not a claim that every Black Friday has the same shape.
The question behind the spike
Imagine a product that usually sells steadily. Its Black Friday discount brings in new purchases, but it also persuades some existing customers to wait and others to buy earlier than planned. The event-day spike now contains both genuinely additional sales and sales shifted from nearby periods.
Purchase timing responses to promotions are well established, although an aggregate dip is not guaranteed to be visible in every category or dataset. Van Heerde, Leeflang and Wittink examine pre- and postpromotion dips in store data, while Hendel and Nevo show why ignoring consumer inventory behaviour can distort the interpretation of temporary price reductions. Those studies motivate looking beyond the peak; they do not establish the particular function proposed below.
Option 1: a holiday indicator
The simplest choice is a dummy variable:
Set \(h_t=1\) during the Black Friday offer and \(h_t=0\) otherwise. The outcome model then includes
\[ y_t = \text{other MMM terms} + \beta h_t + \varepsilon_t. \]
Here, \(\beta\) adjusts the outcome in the flagged period. There is no build-up or decay. If the offer runs across several days, the indicator should reflect the actual offer window rather than an arbitrary Friday date.
This is often a sensible starting point. It asks little of the data and is easy to explain. It cannot, however, give the event a smooth lead-in or account for a dip in sales just before or after it.
Option 2: a Gaussian basis
A Gaussian gives the event a smooth shape. Written with a height of one on Black Friday, the familiar curve is
\[ g(x;\sigma)=\exp\!\left(-\frac{x^2}{2\sigma^2}\right), \]
where \(x\) is time from Black Friday and \(\sigma>0\) controls the width. The model estimates an effect size and multiplies it by the basis. A wider curve spreads the modelled holiday effect across more days or weeks.
This width flexibility is already available in PyMC-Marketing. Its GaussianBasis uses a density-normalised Gaussian, and its AsymmetricGaussianBasis allows different widths before and after the event. The equation above rescales the symmetric shape to make the comparison easier to read; the effect-size prior must reflect whichever scaling is used.
A positive Gaussian can model a gradual build-up and decay. It still assigns a non-negative holiday contribution throughout the window. If sales were displaced from the surrounding periods, that contribution alone cannot represent both the spike and those offsets.
The figure below illustrates the accounting issue. Both curves have the same Black Friday height, but one allows negative contributions around it. Across this constructed window, the positive-only allocation is indexed to 100 and the signed allocation totals 65. These are not fitted estimates or evidence that a Gaussian will always over-credit Black Friday. They show what can happen if the peak receives holiday credit while nearby shortfalls are assigned elsewhere in the model.
A suggested basis for purchase timing shifts
The extension I would test keeps the positive event bump and adds two optional negative components. One sits before Black Friday, where customers may postpone a purchase to get the offer. The other sits after it, where customers may have bought earlier than they otherwise would.
Let \(x=0\) on Black Friday, with negative \(x\) before it and positive \(x\) after it. Define the positive bump as
\[ P(x)=\exp\!\left(-\frac{x^2}{2\sigma(x)^2}\right), \]
with
\[ \sigma(x)= \begin{cases} \sigma_{\mathrm{before}}, & x<0,\\ \sigma_{\mathrm{after}}, & x\geq 0. \end{cases} \]
Then centre a potential dip on each side of the event:
\[ D_{\mathrm{before}}(x) =\exp\!\left[-\frac{(x+\delta_{\mathrm{before}})^2} {2\tau_{\mathrm{before}}^2}\right], \]
\[ D_{\mathrm{after}}(x) =\exp\!\left[-\frac{(x-\delta_{\mathrm{after}})^2} {2\tau_{\mathrm{after}}^2}\right]. \]
Subtract the two dips from the positive bump, then normalise the result at Black Friday:
\[ \begin{aligned} A(x)={}&P(x)-\lambda\rho D_{\mathrm{before}}(x)\\ &-\lambda(1-\rho)D_{\mathrm{after}}(x), \end{aligned} \]
\[ \boxed{f(x)=\frac{A(x)}{A(0)}}. \]
The MMM’s holiday contribution is \(\beta f(x)\). The denominator ensures \(f(0)=1\), so \(\beta\) is the modelled contribution on Black Friday itself. When \(\lambda=0\), the negative components disappear and the basis reduces to a positive Gaussian shape with separate before and after widths.
- Event-day effect, \(\beta\): The holiday contribution on Black Friday, in the model’s outcome units.
- Positive widths, \(\sigma_{\mathrm{before}},\sigma_{\mathrm{after}}>0\): How broadly the positive effect builds and decays. Different widths are existing PyMC-Marketing functionality.
- Dip strength, \(0\leq\lambda<1\): The negative components’ strength relative to the positive bump. It is not the proportion of customers who shifted purchases.
- Dip split, \(0\leq\rho\leq1\): How the negative strength is shared: \(\rho\) before Black Friday and \(1-\rho\) after.
- Dip locations, \(\delta_{\mathrm{before}},\delta_{\mathrm{after}}>0\): How far from Black Friday each potential dip is centred.
- Dip durations, \(\tau_{\mathrm{before}},\tau_{\mathrm{after}}>0\): How long each potential dip lasts.
Every time parameter must use the same unit as \(x\). The plots use weeks for readability; a daily model could use days. The first figure separates the positive and negative components. The second varies the parameters to show how each changes the combined curve.
What would make this useful in practice?
I would start with the simpler models and add the signed basis only when the sales pattern and business context make purchase shifting plausible. Black Friday arrives once a year, so a model may have very few event windows from which to estimate eight shape parameters. The dip strength, timing and duration would need informative priors, and sharing a shape across years may be more defensible than estimating a separate shape for each year.
I would also check the actual promotion calendar, price changes and media activity. A broad November campaign, an early offer or a Cyber Monday extension can overlap the Black Friday window. Daily data can show timing shifts that weekly aggregation may hide. Posterior predictive checks around the event, sensitivity to the simpler bases and the implied net contribution across the window are more useful than judging the Friday peak alone.
Most importantly, a dip in an aggregate sales series does not by itself prove that specific customers delayed or advanced purchases. This function gives the MMM a way to represent that pattern when it is plausible. Whether it improves the model’s explanation and decisions has to be checked against the data.
What comes next
This post treats Black Friday as an event with a shape over time. The next post will continue the Black Friday modelling question by looking at how media and Black Friday interact: whether media effectiveness changes around the offer, and how to separate that interaction from the holiday effect and the media channels’ usual contributions.