A Deep dive into Attribution Maths — Part 2
In our previous article we explored four examples of Heuristic Attribution Models. Heuristic Models use an established rule to attribute conversions among different channels.
In this article we will deep dive into two Algorithmic models - Markov and Shapley. Markov and Shapley take attribution a step further by capturing the dynamic and collaborative nature of multiple touch points, providing nuanced insights that can guide more effective, data-driven marketing strategies.
Let’s dive deeper into the math behind marketing!
Markov Chain Attribution
The Logic
Markov chains use probability theory to model the likelihood of each touchpoint leading to conversions. By considering the sequential order of interactions, this model maps out all customer journeys as a graph with different paths from Start to an End Outcome. Every touchpoint with the customer is a node on the graph and the sequential order of interactions dictates the paths taken.
Markov attribution is calculated by evaluating the removal effect of a touchpoint. When we remove a node from the graph, it impacts the conversion giving us a measure of that nodes impact on the conversions.
The Maths
As an example, let’s consider 10 different customer journeys with 3 possible channels — SEO, Google Ads and Instagram. All customer journeys have 2 possible outcomes — Buy and Exit
The first step is to calculate the total probability of conversion. In our scenario this is 5/10 = 0.50
The next step is to calculate the removal effect of each touchpoint. The removal effect is calculated by removing one touchpoint at a time and seeing how the conversion probability changes.
We can use the reduced conversion graphs to calculate the conversion probability in the absence of a touchpoint.
The logic is that if Instagram was removed from the conversion graph, all paths which had Instagram as a touchpoint on the customer journey will result in an Exit. Hence impacting the conversion probability.
We can then calculate the attribution of each touchpoint using these impacted conversion probabilities.
Using these formulae we get these attribution values for each channel.
Markov models are great to calculate the attribution in complicated multi channel setups. However they also have their own shortcomings.
As the number of customers and touch points increases, the conversion graph can become increasingly large and convoluted. With just 6 touch points there are over 1400 possible paths. Evaluating this manually is plain impossible and the only way to do it is to rely on machines.
We need to ensure that similar touch points are clubbed together to reduce the number of nodes. This makes it impossible to deal with granular nuances of content, campaign, keyword and others as this information cannot be added to nodes in the graph.
Shapley Value Attribution
The Logic
Having its origins in cooperative game theory, Shapley attribution assigns credit based on each channel’s marginal contribution across all possible combinations of touch points. It is particularly effective in multi-channel marketing environments where each channel’s value may differ based on the presence of others.
The Maths
The Shapley value for a channel in a multi channel setup is calculated as:
This equation evaluates attribution based on the marginal contribution of each touchpoint to the overall outcome.
I know.
Unless you are a mathematician, this looks terrifying.
Let’s demystify this with an example.
Let’s consider our marketing setup with 3 channels — SEO, Google Ads and Instagram. We have calculated the conversion values for all 8 coalitions.
Let’s start with Instagram. There are four coalitions (combinations) without Instagram.
- None
- SEO
- Google Ads
- SEO, Google Ads
Let’s look at the coalition of SEO, Google Ads when Instagram is added to it.
We can calculate the marginal contribution as the difference of the two conversion values.
To calculate the weight, we need to calculate three values
- Number of ways to sequentially setup the Coalition.
Here this is 2! = 2.
These 2 ways are Ads-SEO and SEO-Ads. - Number of ways to add the remaining channels after SEO, Ads and Insta.
Here this is (3–2–1)! = 1.
As there are no more channels to add. - The total number of ways to setup the entire multi channel.
Here this is 3! = 6
The calculated weight is a measure of the number of ways a particular coalition can be sequentially setup out of the total possible sequences.
For our example we can evaluate both as follows.
Repeating the same calculation for all possible coalitions and channels gives us the individual Shapley values of each channel.
Shapley attribution is a core principal of game theory where multiple actors are contributing to the same measurable impact. In contrast to the Markov Chain model which was measuring the removal effect, Shapley measures the marginal contribution.
Both the Shapley and Markov models offer robust algorithmic frameworks for understanding the contribution of different touch points in customer journeys.
Shapley model provides a fair, game-theory-based approach that considers all possible combinations of touch points, allowing for accurate attribution of value even in complex, multi-channel interactions.
On the other hand, the Markov model excels at mapping sequential paths and understanding the likelihood of transitions between steps, making it particularly useful for analysing customer paths and removing less impactful steps from analysis.
Each model has its strengths, choosing the right approach — or a combination of both — depends on the specific goals and data complexity of your marketing attribution efforts.
Algorithmic models rely on well defined touch points within a customer journey, to simulate a precise attribution. However more complicated marketing processes might have other variables such as alternate media and seasonality. These factors are taken care of by Data Driven Models.
In our next article we will focus on Data Driven models specifically Media Mix Models. We will also explore how Controlled Experimentation can help improve Media Mix Models.