Optimization for media channels with reach and frequency data

For media channels with reach and frequency data, there is an opportunity to optimize the target average ad frequency, in addition to optimizing the budget allocation across channels. However, just because reach and frequency data is available for a channel does not necessarily mean that an advertiser has a high degree of control over the average frequency. Meridian provides the option to perform budget optimization either the optimal average frequency or the historical average frequency for each channel.

  • For each channel where historical average frequency is used, it is assumed that the average frequency within each region and time period remains constant, regardless of the budget allocation.

  • For each channel where frequency optimization is preferred, Meridian first solves for the optimal frequency value. This optimization constrains the optimal frequency to be equal for all regions and time periods. This restriction serves two purposes: first, to obtain a target frequency strategy that is more practical to implement, and second, to make the optimization routine more tractable. Based on the Meridian model specification, it turns out that the optimal frequency does not depend on the budget allocation.

In either case, the assumption for any given budget level that impressions are allocated according to the historical flighting pattern across geographic regions and time periods. Suppose that you want to compute a budget optimization for a set of regions $G$ and time interval \([t_0,t_1]\). Let \(c_n^{(rf)}= \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t,n}^{(rf)} \cdot \ddot r_{g,t,n} \cdot f_{g,t,n}\) be the actual historical budget for each channel $n$ over the optimization regions and time periods. Denoted is a proposed budget allocation across all channels as a pair of vectors \(b=(b_1,\ldots b_M)\) and \(b^{(rf)}=(b_1^{(rf)}, \ldots b_N^{(rf)})\), and a proposed set of average frequency targets as \(f=\{f_{g,t,n}^{\ast}\}\), where \(f_{g,t,n}^* \geq 1\ \forall g,t,n\). The asterisk distinguishes the proposed frequency from the historical frequency.

Using the historical flighting pattern, the reach for each geo and time period is defined as:

\(\ddot r_{g,t,n}^{\left( b^{(rf)},f \right)} = \dfrac{ \ddot r_{g,t,n} f_{g,t,n} b_n^{(rf)} }{ f_{g,t,n}^*c_n^{(rf)} }\) for \(t \in [t_0-L,t_1]\)

and the corresponding transformed media units as:

\(r_{g,t,n}^{(b^{(rf)},f)} = L_{g,n}^{(rf)}\left(\ddot r_{g,t,n}^{(b,f)}\right) = \dfrac{ r_{g,t,n} f_{g,t,n} b_n^{(rf)} }{ f_{g,t,n}^*c_n^{(rf)} }\)

Optimal frequency

The expected revenue is now a function of the budget vectors \(b\) and \(b^{(rf)}\) as well as the target frequencies \(f\):

$$ \begin{multline*} E(\text{ExpectedSales}(b,b^{(rf)},f)| \text{Data}) = \\ \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \tau_g^{(j)} + \mu_t^{(j)} + \sum\limits_{c=1}^C \gamma_{g,c}^{(j)}z_{g,t,c} + \sum\limits_{m=1}^M \beta_{g,m}^{(j)} \text{HillAdstock} \biggl( \Bigl\{ x_{g,t-s,m}^{(b)} \Bigr\}_{s=0}^L; \alpha_m^{(j)}, ec_m^{(j)}, \text{slope}_m^{(j)} \biggr) \\ + \sum\limits_{n=1}^N \beta_{g,n}^{(rf,j)} \text{Adstock} \biggl( \Bigl\{ r_{g,t-s,n}^{\left(b^{(rf)},f\right)} \text{Hill} \Bigl( f_{g,t-s,n}^*; ec_m^{(rf,j)}, \text{slope}_m^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \end{multline*} $$

For any given budget allocation and set of target frequencies, the optimal frequency of the \(n^{th}\) channel is defined as follows:

$$ \begin{align*} f_{optimal,n} &= \underset{f_n}{\text{argmax}}\ E \left( \text{ExpectedSales} \left( b, b^{(rf)}, f \right) \Big| \text{Data} \right) \\ &= \underset{f_n}{\text{argmax}}\ \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \beta_{g,n}^{(rj,j)} \text{Adstock} \biggl( \Bigl\{ \dfrac{ r_{g,t-s,n} f_{g,t-s,n} b_n ^{(rf)} }{ f_n c_n^{(rf)} } \text{Hill} \Bigl( f_n; ec_n^{(rf,j)}, \text{slope}_n^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \\ &= \underset{f_n}{\text{argmax}}\ \frac{b_n^{(rf)}}{c_n^{(rf)}} \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \beta_{g,n}^{(rf,j)} \text{Adstock} \biggl( \Bigl\{ \dfrac{ r_{g,t-s,n} f_{g,t-s,n} }{ f_n } \text{Hill} \Bigl( f_n; ec_n^{(rf,j)}, \text{slope}_n^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \end{align*} $$

\(b_n^{(rf)}\) and \(c_n^{(rf)}\) factor out of the objective function completely, so the optimal frequency does not depend on the budget allocation. As a result, it is possible to solve for the optimal frequencies first, and then plug in these values to the expected revenue function to optimize the budget allocation.

Fixed budget optimization

Consider a fixed budget optimization with total budget \(C\). Define the set of all budget vectors with this total budget as \(B_C = \left\{b, b^{(rf)}: \sum\limits_{m=1}^M b_m + \sum\limits_{n=1}^Nb_n^{(rf)}=C \right\}\). Meridian provides the option to perform budget optimization based on either the optimal average frequency or the historical average frequency for each channel. The quantity being optimized is expected revenue assuming that the frequency is either optimal or historical frequency, defined as follows:

Expected revenue for optimal frequency:

\(ES_ \text{optimalfreq}\left(b,b^{(rf)}\right) = \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} E\left( \overset \sim Y_{g,t}^{\left(\left\{ x_{g,t,m}^{(b)}, r_{g,t,m}^{(b(rf),\text{optimal})}, f_{\text{optimal},n} \right\}\right)} \Bigg| \left\{ z_{g,t,c} \right\}\right)\)

Expected revenue for historical frequency:

\(ES_ \text{historialfreq}\left(b,b^{(rf)}\right) = \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} E\left( \overset \sim Y_{g,t}^{\left(\left\{ x_{g,t,m}^{(b)}, r_{g,t,m}^{(b(rf),f)}, f_{g,t,n} \right\}\right)} \Bigg| \left\{ z_{g,t,c} \right\}\right)\)

Where \(f_{\text{optimal},n}\) and \(f_{g,t,n}\) are predefined properties representing the optimal frequency and the historical frequency for the \(n\)th channel, and therefore there are two parameters, \(b\) and \(b^{(rf)}\).

The actual parameter values are unknown. Meridian estimates the expected revenue using a posterior distribution. To optimize the budget, the posterior mean of the expected revenue is utilized as the objective function. The optimal budget vector is defined as follows.

Optimal budget allocation when optimal frequency is used:

$$ \begin{align*} b_ \text{optimal}, b_ \text{optimal}^{(rf)} = \underset{b \in B_C,b^{(rf)} \in B_C}{\text{argmax}}\ & E \left[ ES_ \text{optimalfreq}\left( b,b^{(rf)} \right) \Big| \text{Data} \right] \\ = \underset{b \in B_C,b^{(rf)} \in B_C}{\text{argmax}}\ & \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \sum\limits_{m=1}^M \beta_{g,m}^{(j)} \text{HillAdstock} \biggl( \Bigl\{ x_{g,t-s,m}^{(b)} \Bigr\}_{s=0}^L; \alpha_m^{(j)}, ec_m^{(j)}, \text{slope}_m^{(j)} \biggr) \\ & + \sum\limits_{n=1}^N \beta_{g,n}^{(rf,j)} \text{Adstock} \biggl( \Bigl\{ r_{g,t-s,n}^{\left(b^{(rf)},f_ \text{optimal} \right)} \text{Hill} \Bigl( f_{\text{optimal},n}; ec_m^{(rf,j)}, \text{slope}_m^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \end{align*} $$

Optimal budget allocation when historical frequency is used:

$$ \begin{align*} b_ \text{optimal}, b_ \text{optimal}^{(rf)} = \underset{b \in B_C,b^{(rf)} \in B_C}{\text{argmax}}\ & E \left[ ES_{historicalfreq}\left( b,b^{(rf)} \right) \Big| Data \right] \\ = \underset{b \in B_C,b^{(rf)} \in B_C}{\text{argmax}}\ & \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \sum\limits_{m=1}^M \beta_{g,m}^{(j)} \text{HillAdstock} \biggl( \Bigl\{ x_{g,t-s,m}^{(b)} \Bigr\}_{s=0}^L; \alpha_m^{(j)}, ec_m^{(j)}, \text{slope}_m^{(j)} \biggr) \\ & + \sum\limits_{n=1}^N \beta_{g,n}^{(rf,j)} \text{Adstock} \biggl( \Bigl\{ r_{g,t-s,n}^{\left( b^{(rf)},f \right)} \text{Hill} \Bigl( f_{g,t-s,n}; ec_m^{(rf,j)}, \text{slope}_m^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \end{align*} $$

Where:

  • \(J\) is defined to be the total number of MCMC posterior draws.
  • The \(j\)th posterior draw of each parameter is denoted with the superscript \(^{(j)}\).

Flexible budget optimization

For flexible budget optimization, the expected revenue is optimized while allowing the total budget to vary. The optimization process is subject to constraints imposed by either the minimal marginal return on investment (ROI) or the target ROI constraints. Additionally, the optimization considers either the optimal average frequency or the historical average frequency for each channel.

Target ROI constraint

When the target ROI is specified. It means Meridian searches over all budget vectors \(b=(b_1,\ldots,b_M)\) such that the total ROI \(ROI \geq ROI_{target}\ \forall m\), while allowing the total budget \(\sum\limits_{m=1}^M b_m\) to vary. The optimal budget vector is defined as follows.

Optimal budget allocation when optimal frequency is used:

$$ \begin{align*} b_ \text{optimal}, b_ \text{optimal}^{(rf)} = \underset{b, b^{(rf)}}{\text{argmax}}\ & E \left[ ES_ \text{optimalfreq}\left( b, b^{(rf)} \right) \Big| \text{Data} \right] \\ = \underset{b, b^{(rf)}}{\text{argmax}}\ & \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \sum\limits_{m=1}^M \beta_{g,m}^{(j)} \text{HillAdstock} \biggl( \Bigl\{ x_{g,t-s,m}^{(b)} \Bigr\}_{s=0}^L; \alpha_m^{(j)}, ec_m^{(j)}, \text{slope}_m^{(j)} \biggr) \\ & + \sum\limits_{n=1}^N \beta_{g,n}^{(rf,j)} \text{Adstock} \biggl( \Bigl\{ r_{g,t-s,n}^{\left(b^{(rf)},f_ \text{optimal}\right)} Hill \Bigl( f_{\text{optimal},n}; ec_m^{(rf,j)}, \text{slope}_m^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \end{align*} $$

\( s.t.\ \dfrac{ \sum\limits_{m=1}^M \text{IncrementalSales}_m }{ \sum\limits_{m=1}^M b_m } > \text{ROI}_{target} \)

Optimal budget allocation when historical frequency is used:

$$ \begin{align*} b_ \text{optimal}, b_{\text{optimal}}^{(rf)} = \underset{b, b^{(rf)}}{\text{argmax}}\ & E \left[ ES_ \text{historicalfreq}\left( b, b^{(rf)} \right) \Big| \text{Data} \right] \\ = \underset{b, b^{(rf)}}{\text{argmax}}\ & \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \sum\limits_{m=1}^M \beta_{g,m}^{(j)} \text{HillAdstock} \biggl( \Bigl\{ x_{g,t-s,m}^{(b)} \Bigr\}_{s=0}^L; \alpha_m^{(j)}, ec_m^{(j)}, \text{slope}_m^{(j)} \biggr) \\ & + \sum\limits_{n=1}^N \beta_{g,n}^{(rf,j)} \text{Adstock} \biggl( \Bigl\{ r_{g,t-s,n}^{\left(b^{(rf)},f\right)} \text{Hill} \Bigl( f_{g,t-s,n}; ec_m^{(rf,j)}, \text{slope}_m^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \end{align*} $$

\( s.t.\ \dfrac{ \sum\limits_{m=1}^M \text{IncrementalSales}_m }{ \sum\limits_{m=1}^M b_m } > \text{ROI}_{target} \)

Where the target ROI constraint is applied at the total marketing ROI level, and not at channel level.

Minimal mROI constraint

When the minimal marginal ROI is specified, Meridian searches over all budget vectors \(b=(b_1, \ldots, b_M)\) such that the marginal ROI \(mROI_m \geq mROI_{minimal}\ \forall m\), while allowing the total budget \(\sum\limits_{m=1}^M b_m\) to vary. The optimal budget vector is defined as follows:

Optimal budget allocation when optimal frequency is used:

$$ \begin{align*} b_ \text{optimal}, b_ \text{optimal}^{(rf)} = \underset{b, b^{(rf)}}{\text{argmax}}\ & E \left[ ES_ \text{optimalfreq}\left( b, b^{(rf)} \right) \Big| \text{Data} \right] \\ = \underset{b,b^{(rf)}}{\text{argmax}}\ & \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \sum\limits_{m=1}^M \beta_{g,m}^{(j)} \text{HillAdstock} \biggl( \Bigl\{ x_{g,t-s,m}^{(b)} \Bigr\}_{s=0}^L; \alpha_m^{(j)}, ec_m^{(j)}, \text{slope}_m^{(j)} \biggr) \\ & + \sum\limits_{n=1}^N \beta_{g,n}^{(rf,j)} \text{Adstock} \biggl( \Bigl\{ r_{g,t-s,n}^{\left(b^{(rf)},f_ \text{optimal}\right)} \text{Hill} \Bigl( f_{\text{optimal},n}; ec_m^{(rf,j)}, \text{slope}_m^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \end{align*} $$

\( s.t.\ \text{mROI}_m(b_m) > \text{mROI}_\text{minimal}\ \forall m \)

Optimal budget allocation when historical frequency is used:

$$ \begin{align*} b_\text{optimal}, b_\text{optimal}^{(rf)} = \underset{b, b^{(rf)}}{\text{argmax}}\ & E \left[ ES_\text{historicalfreq}\left(b, b^{(rf)} \right) \Big| \text{Data} \right] \\ = \underset{b, b^{(rf)}}{\text{argmax}}\ & \frac{1}{J} \sum\limits_{j=1}^J \sum\limits_{g \in G} \sum\limits_{t=t_0}^{t_1} u_{g,t}^{(y)} L_g^{(y)-1} \Biggl( \sum\limits_{m=1}^M \beta_{g,m}^{(j)} \text{HillAdstock} \biggl( \Bigl\{ x_{g,t-s,m}^{(b)} \Bigr\}_{s=0}^L; \alpha_m^{(j)}, ec_m^{(j)}, \text{slope}_m^{(j)} \biggr) \\ & + \sum\limits_{n=1}^N \beta_{g,n}^{(rf,j)} \text{Adstock} \biggl( \Bigl\{ r_{g,t-s,n}^{\left( b^{(rf)},f \right)} \text{Hill} \Bigl( f_{g,t-s,n}; ec_m^{(rf,j)}, \text{slope}_m^{(rf,j)} \Bigr) \Bigr\}_{s=0}^L \biggr) \Biggr) \end{align*} $$

\( s.t.\ \text{mROI}_m(b_m) > \text{mROI}_{minimal}\ \forall m \)

Where the minimal mROI is applied at channel level and not at the total marketing level.

Channel-level spend constraints

Channel-level spend constraints are available for both fixed and flexible budget optimization to prevent unreasonable optimization outcomes such as putting all spend into one single channel. The channel-level spend constraint is defined as:

$$ (b_m^{'} \times LB_m) \leq b_m \leq (b_m^{'} \times UB_m) \space \forall m $$

Where:

  • \(b_m^{'}\) is the non-optimized spend for channel $m$.
  • \(LB_m\) is the user-specified lower bound with the value between \(0\) and \(1\).
  • \(UB_m\) is the user-specified upper bound with the value greater than \(1\).