{"id":1554,"date":"2019-01-10T06:30:38","date_gmt":"2019-01-10T06:30:38","guid":{"rendered":"https:\/\/www.aiproblog.com\/index.php\/2019\/01\/10\/marketing-analytics-through-markov-chain\/"},"modified":"2019-01-10T06:30:38","modified_gmt":"2019-01-10T06:30:38","slug":"marketing-analytics-through-markov-chain","status":"publish","type":"post","link":"https:\/\/www.aiproblog.com\/index.php\/2019\/01\/10\/marketing-analytics-through-markov-chain\/","title":{"rendered":"Marketing Analytics through Markov Chain"},"content":{"rendered":"<p>Author: Ridhima Kumar<\/p>\n<div>\n<p>Imagine you are a company selling a fast-moving consumer good in the market.<\/p>\n<p>Let\u2019s assume that the customer would follow the given journey to make the final purchase:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0<a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692354402?profile=original\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692354402?profile=original\" width=\"313\" height=\"144\" class=\"align-center\"><\/a>\u00a0These are the states at which the customer would be at any point in the purchase journey.<\/p>\n<p>Now, how to find out in which state the customers would be after 6 months?<\/p>\n<p>Markov Chain comes to the rescue!!<\/p>\n<p>\u00a0Let\u2019s first understand what Markov Chain is.<\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-size: 14pt;\"><strong>Markov Chains:<\/strong><\/span><\/p>\n<p>A\u00a0<strong>Markov chain<\/strong>\u00a0is a\u00a0stochastic model\u00a0describing a\u00a0sequence of possible events in which the probability of each event depends only on the state attained in the previous event<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<ul>\n<li>Markov Chains are sequential events that are probabilistically related to each other.<\/li>\n<li>These events are also known as states<\/li>\n<li>These states together form what is known as State Space.<\/li>\n<li>The probability of next event or next state depends only on the present state and not on the previous states. This property of Markov Chain is called Memoryless property. It doesn\u2019t care what happened in the past event and focuses only on the present information to predict what happens in the next state<\/li>\n<\/ul>\n<p><strong>Markov Chain \u2013 States, Probabilities and Transition Matrix<\/strong><\/p>\n<p>Let\u2019s delve a little deeper.<\/p>\n<p>A Markov Chain provides:<\/p>\n<ul>\n<li>Information about the current state<\/li>\n<\/ul>\n<p>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#038;\u00a0<\/p>\n<ul>\n<li>Transition probabilities of moving from one state to another<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>Using the above two information, we can predict the next state.<\/p>\n<p>\u00a0<\/p>\n<p>In mathematical terms, the current state is called Initial State Vector.<\/p>\n<p>\u00a0<\/p>\n<p>So, what we get is:<\/p>\n<p><strong>Final State = Initial State *Transition Matrix<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Classic Example<\/strong><\/p>\n<p>A classic example of Markov Chain is predicting the weather. We have two different weather conditions: Sunny and Rainy. Let\u2019s assume today it is sunny. We have the following probabilities:<\/p>\n<ul>\n<li>Probability of being sunny tomorrow (Probability of being in the same state) given that it is sunny today: 0.9<\/li>\n<li>Probability of raining tomorrow given that it is sunny today: 0.1<\/li>\n<li>Probability of being sunny tomorrow (Probability of being in the same state) given that it is rainy today: 0.5<\/li>\n<li>Probability of raining tomorrow (Probability of being in the same state) given that it is raining today: 0.5<\/li>\n<\/ul>\n<p>\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Examples_of_Markov_chains\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692391077?profile=original\" class=\"align-center\"><\/a><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Source: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Examples_of_Markov_chains\" target=\"_blank\" rel=\"noopener\">Wikipedia<\/a><\/p>\n<\/p>\n<p>Here the initial vector is =\u00a0<\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692387585?profile=original\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692387585?profile=original\" class=\"align-center\"><\/a><\/p>\n<p>Transition Matrix = \u00a0\u00a0\u00a0\u00a0<\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692400403?profile=original\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692400403?profile=original\" class=\"align-center\"><\/a>Weather on Day 2 =<\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692417644?profile=original\" target=\"_blank\" rel=\"noopener\"><\/a><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692428961?profile=original\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692428961?profile=original\" class=\"align-center\"><\/a><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692417644?profile=original\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>Recollect the\u00a0<strong>Final State = Initial State *Transition Matrix?\u00a0<\/strong>The above represents the same.<\/p>\n<p>So, what is the inference?<\/p>\n<p>There is a 90% chance that the weather will be sunny on Day 2 and 10% chance that it will rain.<\/p>\n<p>\u00a0<\/p>\n<p><strong>Back to the Problem<\/strong><\/p>\n<p>Coming back to the problem where we need to know what the state the customer is after 6 months of launching the product.<\/p>\n<p>We can assume there are 4 states in which the customer can be at any point in time.<\/p>\n<\/p>\n<ol>\n<li>Awareness<\/li>\n<li>Consideration<\/li>\n<li>Purchase<\/li>\n<li>No Purchase<\/li>\n<\/ol>\n<p>We have the following information:<\/p>\n<ul>\n<li>Total no. of customers = 200,000<\/li>\n<li>The no of customers in each state\/category<\/li>\n<li>The transition probabilities of moving from one state to another state<\/li>\n<li>Information about running some campaign in these months (The aim of the campaign is to increase no. of customers purchasing the product)<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p><strong>The Marketing Analytics objective:<\/strong><\/p>\n<ul>\n<li><strong>\u00a0<\/strong>To get no. of customers in all 4 states after 6 months<\/li>\n<li>To assess whether the campaign was effective in increasing the no. of customers purchasing the product<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>So, lets dive into the math part.<\/p>\n<p>Note:\u00a0 A \u2013 Awareness, C \u2013 Consideration, P \u2013 Purchase, NP \u2013 No Purchase<\/p>\n<p>\u00a0<\/p>\n<p>Initial State Vector =<\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692484538?profile=original\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692484538?profile=original\" class=\"align-center\"><\/a><\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692387585?profile=original\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n<p>Transition Matrix =\u00a0<a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692498294?profile=original\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692498294?profile=original\" class=\"align-center\"><\/a><\/p>\n<\/p>\n<p>It would be clearer to see the movements among all 4 states diagrammatically.<\/p>\n<\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692507180?profile=original\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692507180?profile=original\" width=\"554\" height=\"459\" class=\"align-center\"><\/a><\/p>\n<\/p>\n<p>Final States of Customers = Initial State Vector * Transition Matrix<\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692493588?profile=original\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692493588?profile=original\" class=\"align-center\"><\/a><\/p>\n<p><strong>Evaluation of the Result<\/strong><\/p>\n<p>Now let\u2019s evaluate our results.<\/p>\n<p><strong>Initial Vector<\/strong><\/p>\n<\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692527887?profile=original\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692527887?profile=original\" class=\"align-center\"><\/a><\/p>\n<p><strong>Final Vector<\/strong><\/p>\n<p><strong><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692534200?profile=original\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692534200?profile=original\" class=\"align-center\"><\/a><\/strong><span style=\"letter-spacing: -.05pt;\">We can notice that the number of people under \u2018Awareness\u2019 and \u2018Consideration\u2019 have decreased. This is a good thing because, the people actually shifted from the state of \u2018Awareness\u2019 and \u2018Consideration\u2019 to the state of \u2018Purchase\u2019 (an increase of nearly 34%\u00a0!!) Also notice that the number of people in \u2018No Purchase\u2019 states decreased (a decrease of 11%).<\/span><\/p>\n<p class=\"graf\" style=\"background: white; --baseline-multiplier: 0.17; color: rgba(0, 0, 0, 0.84); font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 21.75pt 0cm .0001pt 0cm;\" id=\"d691\"><strong><span style=\"letter-spacing: -.05pt;\">Overall our analysis goes to show that the campaign\/ads has worked!!<\/span><\/strong><\/p>\n<p class=\"graf\" style=\"background: white; --baseline-multiplier: 0.17; color: rgba(0, 0, 0, 0.84); font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 21.75pt 0cm .0001pt 0cm;\" id=\"cb89\"><span style=\"letter-spacing: -.05pt;\">Markov Chain has many other applications in Marketing Analytics and other fields such as NLP.<\/span><\/p>\n<p class=\"graf\" style=\"background: white; --baseline-multiplier: 0.17; color: rgba(0, 0, 0, 0.84); font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 21.75pt 0cm .0001pt 0cm;\" id=\"4f9b\"><span style=\"letter-spacing: -.05pt;\">Stay tuned for more articles\u2026.<\/span><\/p>\n<p><strong><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692534200?profile=original\" target=\"_blank\" rel=\"noopener\"><\/a><\/strong><\/p>\n<p><a href=\"https:\/\/storage.ning.com\/topology\/rest\/1.0\/file\/get\/692527887?profile=original\" target=\"_blank\" rel=\"noopener\"><\/a><\/p>\n<\/p>\n<\/div>\n<p><a href=\"https:\/\/www.datasciencecentral.com\/xn\/detail\/6448529:BlogPost:791619\">Go to Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Author: Ridhima Kumar Imagine you are a company selling a fast-moving consumer good in the market. Let\u2019s assume that the customer would follow the given [&hellip;] <span class=\"read-more-link\"><a class=\"read-more\" href=\"https:\/\/www.aiproblog.com\/index.php\/2019\/01\/10\/marketing-analytics-through-markov-chain\/\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":464,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/posts\/1554"}],"collection":[{"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/comments?post=1554"}],"version-history":[{"count":0,"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/posts\/1554\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/media\/463"}],"wp:attachment":[{"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/media?parent=1554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/categories?post=1554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aiproblog.com\/index.php\/wp-json\/wp\/v2\/tags?post=1554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}