A key facet of a media agency is planning and with so many channels available to an advertiser, it has become critical to deliver the right advice. Econometrics can attribute return on investment specific to a channel and effectively propose optimisation for the future. I am not sure what optimisation techniques we use at Havas, but in my opinion, the big ‘Advertising Budget allocation problem’ can be solved using Linear Programming method. Simplex Algorithm is a technique in Linear Programming designed to tackle such optimisation problems (irrespective of whether it is a maximisation or minimisation task) given certain constraints. I shall not take the liberty to discuss Simplex Method in its entirety here, however I shall try and demonstrate the concept with an extremely simple planning problem.
Assume the Return on Investment for each channel is as follows:
| Channel | ROI | Avg.Impressions per Pound Spent |
|---|---|---|
| TV (\(x_1\)) | 25% | 29.41 |
| Print (\(x_2\)) | 18% | 40.00 |
| Radio (\(x_3\)) | 10% | 62.50 |
Now, most advertisers have an idea from preceding campaign experiences on how much they are willing to stretch in each channel (Often they are borne out of perception from the Top as opposed to being backed up by concrete numbers).
Let us accept the below constraints
The aim of the task is to maximise ROI and adequately allocate budget given the constraints.
Objective Function
Maximise ROI = maximise (0.25x1 + 0.18x2 + 0.10x3)
2/Constraints
2/1 Constraint One: Maximum budget of £0.5m
x1 + x2 + x3 <= 500,000
2/2 Constraint Two: TV advertisement not more than 55% of the total budget
x1 <= 0.55 * (x1 + x2 + x3 )
=> x1 - 0.55 * (x1 + x2 + x3) <=0
=> 0.45x1 – 0.55 x2 -0.55x3 <= 0
2/3 Constraint Three: TV advertisement no less than 45% of the total budget
x1 >= 0.45 * (x1 + x2 + x3)
=> x1 - 0.45 * (x1 + x2 + x3) >=0
=> -0.55x1 +0.45 x2 +0.45x3 <= 0
2/4 Constraint Four: Print Media budget not less than 50k
x2 >= 50,000
=> -x2 <= -50,000
2/5 Constraint Five: Radio budget not less than 25k
x3 >= 25,000
=> -x3 <= -25,000
2/6 Constraint Six: Campaign Should deliver at least 15m total impacts
29.41 x1 + 40x2 + 62.5x3 <= 15,000,000
Use the linearprog function in R or linprog(method = ‘simplex’) in Python to solve this.
ROI <-c(0.25, 0.18, 0.10) #Maximise ROI = maximise (0.25x1 + 0.18x2 + 0.10x3)
Constraints <- c(500000, 0, 0, -50000, -25000, 15000000)
#pick the coefficients of x1 to x3 from all the constraints
Decision_Factor <- rbind(
c(1,1,1), #1st Constraint: x1 + x2 + x3 <= 500,000
c(0.45, -0.55, -0.55), # 0.45x1 – 0.55 x2 -0.55x3 <= 0
c(-0.55, 0.45, 0.45), # -0.55x1 +0.45 x2 +0.45x3 <= 0
c(0, -1, 0), #-x2 <= -50,000
c(0, 0, -1), #-x3 <= -25,000
c(29.41, 40, 62.5) #29.41 x1 + 40x2 + 62.5x3 <= 15,000,000
)
# Import lpSolve package
library(lpSolve)
## Warning: package 'lpSolve' was built under R version 3.6.2
# Set coefficients of the objective function
f.objective <- c(0.25, 0.18, 0.10)
f.constraints <- matrix(c(1,1,1,
0.45, -0.55, -0.55,
-0.55, 0.45, 0.45,
0, -1, 0,
0, 0, -1,
29.41, 40, 62.5), nrow = 6, byrow = TRUE)
# Set unequality signs
f.logic_direction <- c("<=",
"<=",
"<=",
"<=",
"<=",
"<="
)
# Set right hand side coefficients
f.decision_factor <- c(500000,
0,
0,
-50000,
-25000,
15000000)
# Final value (z)
lp("max", f.objective, f.constraints, f.logic_direction, f.decision_factor)
## Success: the objective function is 90305.71
# Variables final values
lp("max", f.objective, f.constraints, f.logic_direction, f.decision_factor)$solution
## [1] 232348.5 165103.3 25000.0
Optimal Budget Allocation is given below: