Optimizing Marketing Investment to Reach Communication Goals


The code and data for the marketing optimization found below can be found on my GitHub account by clicking here.

Useful books for understanding material: 


There are different ways to answer the question of how to optimize marketing budgets. The goal of this post is to explain how to minimize advertising investment, given a minimum communication goal for a given set of target populations. This post will leverage a constrained optimization framework to answer a common marketing problem, namely: how can we minimize the marketing investment required and still reach our communication goals? Linear Programming and the Simplex Algorithm will be used to answer these marketing questions.


ScreenHunter_95 Nov. 17 13.34

The data above represent the media channels available for the marketing campaign: Television and Magazines. The reach of each one unit of advertising per media channel (e.g., one unit of TV reaches 5 million Boys, 1 million women, and 3 million Men). The unit cost of each media channel (e.g., TV 600 and Magazine 500) and finally the marketing targets for the advertised product in millions of people (e.g., 24 million Boys).

R reads these data from a Google sheet.

Optimization Model

The following questions represent a standard linear programming model specification, which is similar to the specification we plan on using in the empirical calculations in this post:

Linear Function to be maximized

ScreenHunter_104 Nov. 17 15.23

The code is also in the Github repository. What follows is an explanation of this code, which solves the marketing problem described above.We are importing the data into R using the RCurl library and processing using the foreign library.

ScreenHunter_96 Nov. 17 13.59

Objective function and Constraints

ScreenHunter_97 Nov. 17 14.28

Solving the Linear Programming Problem

ScreenHunter_99 Nov. 17 14.31

Marketing Recommendations

The optimal solution is one that hits the target audience at the lowest costs. The algorithm recommends investing in 2.7 units of Television and 5.3 units of Magazine advertisement to hit the marketing goals of reaching at least 24 million Boys, 18 million women, and 24 million Men. The total cost of this marketing campaign is $4,266, note that this is the minimum costs associated with the cost-minimizing allocation.

ScreenHunter_100 Nov. 17 14.34


ScreenHunter_101 Nov. 17 14.36

How many people did this marketing campaign reach? Recall that the targets were a minimum requirement per target audience, so what is the real reach?

ScreenHunter_102 Nov. 17 14.38

The minimum communication goal of the campaign was reached precisely, 24 million Boys and 24 million Men. However, 34 million Women were reached, with this marketing plan, when the minimum communication goal was only 18 million Women reached. The reason is that the optimization has to simultaneously reach all the targets and do it at a minimum cost, having said that one can rest assured that this is the cheapest way of reaching the communication goals.

Ideas for Extending this Analysis

Many more women were reached by the campaign than the communication goal intended. Adding additional marketing tactics besides Television and Magazines, especially ones that are exceptionally efficient at targeting women, will most likely hit all the targets at a lower price.

Time is undoubtedly a factor in marketing effectiveness; here is a previous post on measuring marketing effectiveness. Understanding not only how many people were reached but also how effective Television and Magazines are at different time horizons would likely improve this analysis.

This optimization does not take into account the non-linear or synergistic effects of marketing, which again adds complexity but is undoubtedly worth exploring.

Expanding the marketing goals to include not only the reach but the frequency as one is likely to hit the same people multiple times via Television and Magazines. The rate of exposure to advertising has increased ad recall and brand awareness in several academic studies.

Despite all the limitations to this approach, it still provides a mathematically, precise way of creating a marketing budget that meets a set of specific goals. It is an excellent place to start introducing rigorous and proven algorithms to answer some fundamental marketing questions.

Useful Books: