Markov Chain first order applied to attribution modelling
$begingroup$
Based on this article I'm using within R the Channel Attribution package to leverage on the Markov Chain in order to attribute conversion between several marketing channels. However, the computation made by hand the outcome of the program are not corresponding, so I'm wondering what of the markov chain manual computation is not performing as it should be.
On one point the author suggested:
"When using one-order Markov chains, a subsequence of the same channels in a path (duplicates) can be reduced to one channel (for example C2 in the path C1 → C2 → C2 → C2 → C3 can be reduced to C1 → C2 → C3). Because, mathematically, it doesn’t matter how many times each C2 goes through the loop with itself in the transition matrix, it will be in the C3 state finally. Therefore, we will obtain different transition matrices but the same Removal Effect for channels with or without subsequent duplicates ".
Now, I utilized another data set to validate the package result. Specifically:
If I take the example in the picture, where I simulated an hypothetical set of paths, with both number of conversions and not conversions represented in the coloured cells (in the green and red cells respectively)
Doing the math by hand I get the following transition probabilities for the 1st order Markov chain (I also compute looping probability for google channel as in the article it is stated that mathematically the removal effect should be the same):
However, when I do the calculation by hand to get the removal_effect and the total_conversions, I do not get the same results of the package for each channel.
According to the theory and the example in the article, the total probability of conversion of the model should be = $(1times 0.1008times 0.5455times 0.1261) + (0.1765times 0.2605times0.0323) +(0.2605times0.3226times0.1818) + 0.1261=0.1498$
Then the removal effects:
$text{google}= 1-(0/0.1498)=1$
$text{facebook}=1- ( (0.0015+0.1261)/0.1498)=0.1482$
$text{instagram}=1-((0.0069+0.1261)/0.1498)=0.1121$
Then to compute the share of conversion, let's say of google
$text{share of google}=frac{1}{1+0.1482+0.1121}=0.7935 times 20 text{conversions} =15.87$
However, the attribution channel package in R give me different results as per below
I think I'm missing something in my calculation respect to what the code does or maybe it is expected in computing the Removal effects.
Could anyone with some experience with Markov chains help in identifying what is not right in the manual computation?
Many thanks D
markov-chains matrix-calculus markov-process
$endgroup$
add a comment |
$begingroup$
Based on this article I'm using within R the Channel Attribution package to leverage on the Markov Chain in order to attribute conversion between several marketing channels. However, the computation made by hand the outcome of the program are not corresponding, so I'm wondering what of the markov chain manual computation is not performing as it should be.
On one point the author suggested:
"When using one-order Markov chains, a subsequence of the same channels in a path (duplicates) can be reduced to one channel (for example C2 in the path C1 → C2 → C2 → C2 → C3 can be reduced to C1 → C2 → C3). Because, mathematically, it doesn’t matter how many times each C2 goes through the loop with itself in the transition matrix, it will be in the C3 state finally. Therefore, we will obtain different transition matrices but the same Removal Effect for channels with or without subsequent duplicates ".
Now, I utilized another data set to validate the package result. Specifically:
If I take the example in the picture, where I simulated an hypothetical set of paths, with both number of conversions and not conversions represented in the coloured cells (in the green and red cells respectively)
Doing the math by hand I get the following transition probabilities for the 1st order Markov chain (I also compute looping probability for google channel as in the article it is stated that mathematically the removal effect should be the same):
However, when I do the calculation by hand to get the removal_effect and the total_conversions, I do not get the same results of the package for each channel.
According to the theory and the example in the article, the total probability of conversion of the model should be = $(1times 0.1008times 0.5455times 0.1261) + (0.1765times 0.2605times0.0323) +(0.2605times0.3226times0.1818) + 0.1261=0.1498$
Then the removal effects:
$text{google}= 1-(0/0.1498)=1$
$text{facebook}=1- ( (0.0015+0.1261)/0.1498)=0.1482$
$text{instagram}=1-((0.0069+0.1261)/0.1498)=0.1121$
Then to compute the share of conversion, let's say of google
$text{share of google}=frac{1}{1+0.1482+0.1121}=0.7935 times 20 text{conversions} =15.87$
However, the attribution channel package in R give me different results as per below
I think I'm missing something in my calculation respect to what the code does or maybe it is expected in computing the Removal effects.
Could anyone with some experience with Markov chains help in identifying what is not right in the manual computation?
Many thanks D
markov-chains matrix-calculus markov-process
$endgroup$
add a comment |
$begingroup$
Based on this article I'm using within R the Channel Attribution package to leverage on the Markov Chain in order to attribute conversion between several marketing channels. However, the computation made by hand the outcome of the program are not corresponding, so I'm wondering what of the markov chain manual computation is not performing as it should be.
On one point the author suggested:
"When using one-order Markov chains, a subsequence of the same channels in a path (duplicates) can be reduced to one channel (for example C2 in the path C1 → C2 → C2 → C2 → C3 can be reduced to C1 → C2 → C3). Because, mathematically, it doesn’t matter how many times each C2 goes through the loop with itself in the transition matrix, it will be in the C3 state finally. Therefore, we will obtain different transition matrices but the same Removal Effect for channels with or without subsequent duplicates ".
Now, I utilized another data set to validate the package result. Specifically:
If I take the example in the picture, where I simulated an hypothetical set of paths, with both number of conversions and not conversions represented in the coloured cells (in the green and red cells respectively)
Doing the math by hand I get the following transition probabilities for the 1st order Markov chain (I also compute looping probability for google channel as in the article it is stated that mathematically the removal effect should be the same):
However, when I do the calculation by hand to get the removal_effect and the total_conversions, I do not get the same results of the package for each channel.
According to the theory and the example in the article, the total probability of conversion of the model should be = $(1times 0.1008times 0.5455times 0.1261) + (0.1765times 0.2605times0.0323) +(0.2605times0.3226times0.1818) + 0.1261=0.1498$
Then the removal effects:
$text{google}= 1-(0/0.1498)=1$
$text{facebook}=1- ( (0.0015+0.1261)/0.1498)=0.1482$
$text{instagram}=1-((0.0069+0.1261)/0.1498)=0.1121$
Then to compute the share of conversion, let's say of google
$text{share of google}=frac{1}{1+0.1482+0.1121}=0.7935 times 20 text{conversions} =15.87$
However, the attribution channel package in R give me different results as per below
I think I'm missing something in my calculation respect to what the code does or maybe it is expected in computing the Removal effects.
Could anyone with some experience with Markov chains help in identifying what is not right in the manual computation?
Many thanks D
markov-chains matrix-calculus markov-process
$endgroup$
Based on this article I'm using within R the Channel Attribution package to leverage on the Markov Chain in order to attribute conversion between several marketing channels. However, the computation made by hand the outcome of the program are not corresponding, so I'm wondering what of the markov chain manual computation is not performing as it should be.
On one point the author suggested:
"When using one-order Markov chains, a subsequence of the same channels in a path (duplicates) can be reduced to one channel (for example C2 in the path C1 → C2 → C2 → C2 → C3 can be reduced to C1 → C2 → C3). Because, mathematically, it doesn’t matter how many times each C2 goes through the loop with itself in the transition matrix, it will be in the C3 state finally. Therefore, we will obtain different transition matrices but the same Removal Effect for channels with or without subsequent duplicates ".
Now, I utilized another data set to validate the package result. Specifically:
If I take the example in the picture, where I simulated an hypothetical set of paths, with both number of conversions and not conversions represented in the coloured cells (in the green and red cells respectively)
Doing the math by hand I get the following transition probabilities for the 1st order Markov chain (I also compute looping probability for google channel as in the article it is stated that mathematically the removal effect should be the same):
However, when I do the calculation by hand to get the removal_effect and the total_conversions, I do not get the same results of the package for each channel.
According to the theory and the example in the article, the total probability of conversion of the model should be = $(1times 0.1008times 0.5455times 0.1261) + (0.1765times 0.2605times0.0323) +(0.2605times0.3226times0.1818) + 0.1261=0.1498$
Then the removal effects:
$text{google}= 1-(0/0.1498)=1$
$text{facebook}=1- ( (0.0015+0.1261)/0.1498)=0.1482$
$text{instagram}=1-((0.0069+0.1261)/0.1498)=0.1121$
Then to compute the share of conversion, let's say of google
$text{share of google}=frac{1}{1+0.1482+0.1121}=0.7935 times 20 text{conversions} =15.87$
However, the attribution channel package in R give me different results as per below
I think I'm missing something in my calculation respect to what the code does or maybe it is expected in computing the Removal effects.
Could anyone with some experience with Markov chains help in identifying what is not right in the manual computation?
Many thanks D
markov-chains matrix-calculus markov-process
markov-chains matrix-calculus markov-process
edited Dec 13 '18 at 10:59
Vee Hua Zhi
759224
759224
asked Dec 13 '18 at 10:35
davide cortellinodavide cortellino
11
11
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3037851%2fmarkov-chain-first-order-applied-to-attribution-modelling%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3037851%2fmarkov-chain-first-order-applied-to-attribution-modelling%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown