{"id":10135,"date":"2017-06-20T11:06:29","date_gmt":"2017-06-20T05:36:29","guid":{"rendered":"http:\/\/ucanalytics.com\/blogs\/?p=10135"},"modified":"2018-08-11T13:22:22","modified_gmt":"2018-08-11T07:52:22","slug":"thompson-sampling-for-artificial-intelligence-digital-marketing-case","status":"publish","type":"post","link":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/","title":{"rendered":"Thompson Sampling for Artificial Intelligence &#8211; Digital Marketing Case Study Example (Part 4)"},"content":{"rendered":"<hr \/>\n<p><a href=\"http:\/\/ucanalytics.com\/blogs\/category\/digital-marketing-case-study\/\" target=\"_blank\" rel=\"noopener\"><img data-attachment-id=\"10096\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/navigation\/digital-marketing-case-study\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2013\/09\/Digital-Marketing-Case-Study-e1493543452154.jpg?fit=220%2C137&amp;ssl=1\" data-orig-size=\"220,137\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1493562106&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"Digital Marketing Case Study\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2013\/09\/Digital-Marketing-Case-Study-e1493543452154.jpg?fit=300%2C187&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2013\/09\/Digital-Marketing-Case-Study-e1493543452154.jpg?fit=220%2C137&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\"alignright wp-image-10096 \" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2013\/09\/Digital-Marketing-Case-Study-e1493543452154.jpg?resize=260%2C162\" alt=\"\" width=\"260\" height=\"162\" data-recalc-dims=\"1\" \/><\/a>This is the final part of the<strong> <a href=\"http:\/\/ucanalytics.com\/blogs\/category\/digital-marketing-case-study\/\" target=\"_blank\" rel=\"noopener\">digital marketing case study example<\/a><\/strong>. In this case study, you are a digital analytics consultant. Here, you are working with your client Helping Hand, an NGO, to extract the maximum value out of their marketing campaign. For this, you are using principles of\u00a0<a href=\"http:\/\/ucanalytics.com\/blogs\/reinforcement-learning-and-artificial-intelligence-digital-marketing-case-study-example-part-1\/\" target=\"_blank\" rel=\"noopener\">reinforcement learning<\/a>\u00a0to get the maximum donation from the recipients of the emails. Notably, reinforcement\u00a0learning helps in the development of intelligent systems and artificial intelligence. In the\u00a0previous two parts, you had compared the performance of three different ads using <a href=\"http:\/\/ucanalytics.com\/blogs\/ab-testing-explained-challenged-digital-marketing-case-study-example-part-2\/\" target=\"_blank\" rel=\"noopener\">A\/B testing<\/a>. Moreover, you had improved the performance of <a href=\"http:\/\/ucanalytics.com\/blogs\/bayesian-statistics-to-improve-ab-testing-digital-marketing-case-study-example-part-3\/\" target=\"_blank\" rel=\"noopener\">A\/B testing through Bayesian statistics<\/a>. In this part, we will use Bayesian statistics and reinforcement learning to develop an intelligent marketing campaign design.<\/p>\n<h2><span style=\"color: #3366ff;\">Thompson Sampling and Reinforcement Learning<\/span><\/h2>\n<p>In the previous part, your client noticed that you had set an uneven sample design for the three ads sent out for the email campaign.<\/p>\n<table style=\"border-color: #000000;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"background-color: #2d6ecf;\"><strong><span style=\"color: #ffffff;\">Advertisement<\/span><\/strong><\/td>\n<td style=\"background-color: #2d6ecf;\"><strong><span style=\"color: #ffffff;\">Number of Recipients<\/span><\/strong><\/td>\n<td style=\"background-color: #2d6ecf;\"><strong><span style=\"color: #ffffff;\">% Recipients<\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"background-color: #e8e3b7;\"><strong>A<\/strong><\/td>\n<td>5500<\/td>\n<td>\u00a020.4%<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color: #e8e3b7;\"><strong>B<\/strong><\/td>\n<td>9000<\/td>\n<td>\u00a033.3%<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color: #e8e3b7;\"><strong>C<\/strong><\/td>\n<td>12500<\/td>\n<td>\u00a046.3%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The email recipients received these three ads.<br \/>\n<a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg\"><img data-attachment-id=\"9891\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/reinforcement-learning-and-artificial-intelligence-digital-marketing-case-study-example-part-1\/digital-marketing-campaign\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?fit=1297%2C707&amp;ssl=1\" data-orig-size=\"1297,707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Digital Marketing Campaign\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?fit=300%2C164&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?fit=640%2C349&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-9891\" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?resize=640%2C349\" alt=\"\" width=\"640\" height=\"349\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?w=1297&amp;ssl=1 1297w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?resize=250%2C136&amp;ssl=1 250w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?resize=300%2C164&amp;ssl=1 300w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?resize=768%2C419&amp;ssl=1 768w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?resize=1024%2C558&amp;ssl=1 1024w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?resize=30%2C16&amp;ssl=1 30w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Now, let us try to understand the basis of this uneven sampling. In the process, we will also explore how Thompson Sampling and reinforcement learning are used for development of intelligent systems. For the same, let&#8217;s first delve a bit into some sociological and psychological studies that had formed the basis of our uneven sample design. We will learn more about&#8230;<\/p>\n<h2><span style=\"color: #3366ff;\">Empathy and Emotions<\/span><\/h2>\n<p>Mother Teresa and Joseph\u00a0Stalin are two completely different personalities. Mother Teresa was declared\u00a0a saint in 2016 for her work with the unprivileged in Calcutta. Stalin, on the other hand, is widely accused\u00a0of human rights abuse.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg\"><img data-attachment-id=\"10136\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/mother-teresa-and-stalin\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&amp;ssl=1\" data-orig-size=\"1015,475\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Mother Teresa and Stalin\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=300%2C140&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=640%2C300&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-10136\" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?resize=640%2C300\" alt=\"Thompson Sampling and Artificial Intelligence - by Roopam\" width=\"640\" height=\"300\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?w=1015&amp;ssl=1 1015w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?resize=250%2C117&amp;ssl=1 250w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?resize=768%2C359&amp;ssl=1 768w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?resize=30%2C14&amp;ssl=1 30w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>These two, however, agree on one issue i.e. empathy towards a single human being\u00a0vs. a lack of empathy towards large groups of humans.<\/p>\n<blockquote><p>If I look at the mass, I will never act. If I look at the one, I will.<\/p>\n<p style=\"text-align: right;\">&#8211; Mother Teresa<\/p>\n<\/blockquote>\n<p>Mother Teresa, in this quote, is highlighting her reasons for helping the poor in Calcutta. Joseph Stalin mentions the same idea in a somewhat more stern and aggressive way but he was not trying to help anyone!<\/p>\n<blockquote><p>A single death is a tragedy; a million deaths is a statistic.<\/p>\n<p style=\"text-align: right;\">&#8211; Joseph Stalin<\/p>\n<\/blockquote>\n<p>Incidentally, both Mother Teresa and Stalin are pointing towards the phenomenon psychologists describe as the identifiable victim effect. The identifiable victim effect is described\u00a0by Dan Ariely in his fascinating book <em>The Upside of Irrationality.<\/em><\/p>\n<h2><span style=\"color: #3366ff;\">Identifiable Victim Effect<\/span><\/h2>\n<p>Dan Ariely, in his book, discussed an experiment to quantify this effect. \u00a0In this experiment, the experimenter gave a group of students $5 each. Additionally, the\u00a0experimenters asked each student to voluntarily donate a portion of their money. One set of students read a message like this before making the donation.<\/p>\n<blockquote><p>Food Shortages in Malawi are affecting more than 3 million children&#8230;More than 11 million people in Ethiopia need immediate food assistance [you could contribute for that]<\/p><\/blockquote>\n<p>In contrast, the second set of students read a more personal message:<\/p>\n<blockquote><p>Her life would be changed for the better as a result of your financial gift. With you support, Save the Children will work with Rokia&#8217;s family to feed her&#8230;<\/p><\/blockquote>\n<p>The experimenters observed that Rokia received more than twice the share of $5 from students than 3 million children in Malawi. Let&#8217;s park this idea about how people donate more for an\u00a0individual and relatable victim than for a mass of victims. We will use it soon for our digital marketing case study example. For now, look at this data from Dr. Ariely&#8217;s book which demonstrates the identifiable victim effect at a large scale.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg\"><img data-attachment-id=\"10325\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/identifiable-victim-effect\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?fit=800%2C416&amp;ssl=1\" data-orig-size=\"800,416\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Identifiable Victim Effect\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?fit=300%2C156&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?fit=640%2C333&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-10325\" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?resize=640%2C333\" alt=\"\" width=\"640\" height=\"333\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?resize=250%2C130&amp;ssl=1 250w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?resize=300%2C156&amp;ssl=1 300w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?resize=768%2C399&amp;ssl=1 768w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Identifiable-Victim-Effect.jpg?resize=30%2C16&amp;ssl=1 30w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>People are donating more money to a smaller set of affected victims than for a large set. This could be for multiple reasons including advertising, news time, etc. But still, the correlation is just too startling and one of the reasons for this could very well be the identifiable victim effect. It is sad but true.<\/p>\n<p>Let us make our transition back to some useful concepts that will help us derive the maximum value out of our email marketing campaign. For the same, let&#8217;s visit a casino in Las Vegas and gamble a bit.<\/p>\n<h2><span style=\"color: #3366ff;\">Multi-Armed Bandits and Thompson Sampling<\/span><\/h2>\n<p>If you have ever been to a casino you would know of slot machines. The idea with a slot machine is that you insert your money in it, and pull the lever or buttons. If you hit a jackpot or get the right combinations on the screen you will make money on your initial bet. Otherwise, you will lose all your money. A slot machine is also, for a good reason,\u00a0called a one-armed bandit\u00a0since you are more likely to lose your money than to\u00a0make a profit.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg\"><img data-attachment-id=\"9798\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/reinforcement-learning-and-artificial-intelligence-digital-marketing-case-study-example-part-1\/bandit\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg?fit=467%2C290&amp;ssl=1\" data-orig-size=\"467,290\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bandit\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg?fit=300%2C186&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg?fit=467%2C290&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-9798 aligncenter\" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg?resize=467%2C290\" alt=\"\" width=\"467\" height=\"290\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg?w=467&amp;ssl=1 467w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg?resize=250%2C155&amp;ssl=1 250w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg?resize=300%2C186&amp;ssl=1 300w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/03\/Bandit.jpg?resize=30%2C19&amp;ssl=1 30w\" sizes=\"(max-width: 467px) 100vw, 467px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Now imagine you entered a casino with multiple slot machines and want to figure out which of these machines is going to make you the most profit. This is a famous problem in optimization called &#8220;multi-armed bandits&#8221;. Each slot machine in the casino has a different probability of success i.e. the chance of making a profit for you. At first, you don&#8217;t know the probabilities of success for these machines. Hence, you need to explore to learn about these probabilities. At the same time, you also want to make money. This is essentially an example of the\u00a0explore and exploit optimization we discussed at length with <strong><a href=\"http:\/\/ucanalytics.com\/blogs\/reinforcement-learning-and-artificial-intelligence-digital-marketing-case-study-example-part-1\/\" target=\"_blank\" rel=\"noopener\">reinforcement learning<\/a><\/strong>.<\/p>\n<p>I am sure you could make the link between the &#8220;multi-armed bandits&#8221; problem and our marketing campaign. Our three ads are no different than the slot machines. It&#8217;s all about making the maximum profit while exploring to find the probability of success. There are multiple strategies to solve the &#8220;multi-armed bandits&#8221; problem. However, one strategy that usually does better than others is Thompson Sampling. This <a href=\"https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2016\/02\/thompson.pdf\" target=\"_blank\" rel=\"noopener\">paper<\/a>\u00a0from Yahoo\/Microsoft Inc. illustrates the same point.<\/p>\n<h2><span style=\"color: #3366ff;\">Thompson Sampling and Bayesian Priors<\/span><\/h2>\n<p><a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg\"><img data-attachment-id=\"10357\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/syringe\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg?fit=487%2C750&amp;ssl=1\" data-orig-size=\"487,750\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Syringe\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg?fit=195%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg?fit=487%2C750&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-10357 alignright\" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg?resize=261%2C403\" alt=\"\" width=\"261\" height=\"403\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg?w=487&amp;ssl=1 487w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg?resize=162%2C250&amp;ssl=1 162w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg?resize=195%2C300&amp;ssl=1 195w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Syringe.jpg?resize=19%2C30&amp;ssl=1 19w\" sizes=\"(max-width: 261px) 100vw, 261px\" data-recalc-dims=\"1\" \/><\/a>William R. Thompson proposed a sampling method that exploits Bayesian priors in <a href=\"http:\/\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thompson-Sampling-Paper.pdf\" target=\"_blank\" rel=\"noopener\">his research paper<\/a>\u00a0published in 1933. In the paper, Thompson was trying to design an effective sampling strategy for clinical trials to save as many patients while exploring new drugs and methods of treatment. The loss of a patient to a trial drug despite the availability of better drug is called regret. A clinical trial is essentially an explore\/exploit optimization where one is trying to minimize regret while finding new and effective ways to treat the patients.<\/p>\n<p>Thompson pointed that when the sampling design exploits the Bayesian methods to constantly update sample distribution based on new knowledge the regret can be minimized. This may sound complicated but actually is a reasonably simple method as we will soon see. Remember, in the last post we discussed how knowledge is an incremental process. Moreover, <strong><a href=\"http:\/\/ucanalytics.com\/blogs\/bayesian-statistics-to-improve-ab-testing-digital-marketing-case-study-example-part-3\/\" target=\"_blank\" rel=\"noopener\">Bayesian statistics<\/a><\/strong> captures this essence of scientific growth better than the traditional frequentist\u00a0approach to statistics. Thompson, essentially, was pointing towards\u00a0<a href=\"http:\/\/ucanalytics.com\/blogs\/bayesian-statistics-to-improve-ab-testing-digital-marketing-case-study-example-part-3\/\" target=\"_blank\" rel=\"noopener\"><strong>Beta prior distribution for Bernoulli trials<\/strong><\/a> that we discussed at great length in the previous article.<\/p>\n<h2><span style=\"color: #3366ff;\">Example for Thompson Sampling<\/span><\/h2>\n<p>In his paper, Thompson suggested that clinical researchers must design the clinical trial samples using the existing knowledge about the effectiveness of medicines. This strategy will save most number of patients while exploring new and better drugs. For instance, let&#8217;s assume that you are testing two different drugs A and B. You have a prior belief that drug A is slightly better at treating most patients. Let&#8217;s assume you have quantified this belief i.e. for every 100 patients treated with drug A, 53 will show signs of improvement vs. 47 for drug B. According to this, when a patient walks in for a treatment you will toss a biased coin which has 53% chances of the head vs. 47% of the tail. If it&#8217;s a head\u00a0the patient will get the treatment from drug A otherwise drug B.<\/p>\n<p>One of the questions could be why not treat every patient with drug A since it is more effective? The answer is the that the effectiveness is based on your belief. However, this belief needs to be validated by hardcore evidence or data. The important aspect of Bayesian thinking is that belief could be made a part of the research and the belief gets updated with evidence.<\/p>\n<p>This 53\/47 sample of drug A and B is just the initial sample design. This design is constantly updated with new evidence through\u00a0<a href=\"http:\/\/ucanalytics.com\/blogs\/bayesian-statistics-to-improve-ab-testing-digital-marketing-case-study-example-part-3\/\" target=\"_blank\" rel=\"noopener\"><strong>Beta prior distribution for Bernoulli trials<\/strong><\/a>. Let&#8217;s assume you found drug B to be more effective for 70% patients vs 30% patients for drug A. Clearly, this is against your initial belief. Now, the next patient walked in will receive\u00a0treatment from drug B with 70% probability.<\/p>\n<p>Now, Let&#8217;s head back to our case study example:<\/p>\n<h2><span style=\"color: #3366ff;\">Digital Case Study Example &#8211; Thompson Sampling<\/span><\/h2>\n<p>You are in a meeting with your client that she had set up last week. She is keen to learn about your reasons for uneven sample design for the three ads. Moreover, she is curious to know how this design will help her maximize the donation money. You tell her about the identifiable victim effect experiment. You also tell her how\u00a0Rokia, or in her case Elisa, will make people donate almost twice as much money than the less-identifiable map of Africa. At this point, she asks if the ad with Elisa was going to get more money then why did you test\u00a0the map of Africa at all.\u00a0You think that this woman is clever and asking all the right questions.<\/p>\n<p>To answer her question, you tell her that you were not sure about the click-rate for Elisa vs. the map of Africa. Moreover, the experiment described by Dr. Ariely was for a group of students and you wanted to test the concepts for a larger population of email recipients. She seems satisfied with your answer and asks you to tell her how you used Thompson Sampling to create the sample design. You tell her that had you divided the sample evenly i.e. in 33% you would not have exploited the knowledge shared by Dr. Ariely in his book. You also tell her how the job of a data scientist also includes awareness of research work going on in many different fields including psychology, computer science, sociology, marketing, operations research etc. and use\u00a0this knowledge to improve results for the clients.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg\"><img data-attachment-id=\"10355\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/thinking-machine\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg?fit=278%2C317&amp;ssl=1\" data-orig-size=\"278,317\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Thinking Machine\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg?fit=263%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg?fit=278%2C317&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-10355 alignright\" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg?resize=278%2C317\" alt=\"\" width=\"278\" height=\"317\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg?w=278&amp;ssl=1 278w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg?resize=219%2C250&amp;ssl=1 219w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg?resize=263%2C300&amp;ssl=1 263w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/06\/Thinking-Machine.jpg?resize=26%2C30&amp;ssl=1 26w\" sizes=\"(max-width: 278px) 100vw, 278px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<h2><span style=\"color: #3366ff;\">Artificial Intelligence<\/span><\/h2>\n<p>Since you knew &#8216;the map of Africa&#8217; will have a little over twice as high regret than &#8216;Elisa&#8217;. This knowledge is reflected in the sample design i.e. 46.3% recipients get Elisa ad vs. 20.4% for the map of Africa. Moreover, the mixed group i.e. ad B was sent to the 33% recipients.<\/p>\n<p>The interesting part, as you explain to your client, is that this is an evolutionary design. With each level of experiment and evidence, the sample design will get optimized to generate more profit. Moreover, this design is highly flexible. Here, new ads (say D, and E) can be added and while removing underperforming ads (e.g. ad A) with reasonable ease.<\/p>\n<p>You tell your client that her organization\u00a0has taken its baby-step towards artificial intelligence driven\u00a0marketing campaign design, a design that modifies itself based on evidence and experience. This is somewhat similar to the human brain that learns from experience. This design is highly effective in a real-time digital marketing effort where banners are used to test the click-through rate and associated conversion rate.<\/p>\n<h4><span style=\"color: #3366ff;\">Sign-off Note<\/span><\/h4>\n<p>The loss of the patient to an inferior drug and treatment in Thompson Sampling is defined as regret. Regret, as defined in the dictionary, is the feeling of sadness, repentance, or disappointment about an action. It&#8217;s possible, a collective scientific intelligence is giving us a message to make artificial intelligence more human.\u00a0The day artificial intelligence will feel the sorrow of losing a patient and the joy of donation\/giving back to others is the day when artificial intelligence and machines will feel alive. It is possibly a good message for humans to feel somewhat more alive.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the final part of the digital marketing case study example. In this case study, you are a digital analytics consultant. Here, you are working with your client Helping Hand, an NGO, to extract the maximum value out of their marketing campaign. For this, you are using principles of\u00a0reinforcement learning\u00a0to get the maximum donation<\/p>\n<p><a class=\"excerpt-more blog-excerpt\" href=\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":10136,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[82,1],"tags":[],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Thompson Sampling &amp; Artificial Intelligence - Digital Marketing Case Study<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Thompson Sampling &amp; Artificial Intelligence - Digital Marketing Case Study\" \/>\n<meta property=\"og:description\" content=\"This is the final part of the digital marketing case study example. In this case study, you are a digital analytics consultant. Here, you are working with your client Helping Hand, an NGO, to extract the maximum value out of their marketing campaign. For this, you are using principles of\u00a0reinforcement learning\u00a0to get the maximum donationRead More...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/\" \/>\n<meta property=\"og:site_name\" content=\"YOU CANalytics |\" \/>\n<meta property=\"article:author\" content=\"roopam\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-20T05:36:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-08-11T07:52:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&#038;ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1015\" \/>\n\t<meta property=\"og:image:height\" content=\"475\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roopam Upadhyay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#organization\",\"name\":\"YOU CANalytics\",\"url\":\"https:\/\/ucanalytics.com\/blogs\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2015\/11\/YOU-CANalytics-Logo.jpg?fit=607%2C120\",\"contentUrl\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2015\/11\/YOU-CANalytics-Logo.jpg?fit=607%2C120\",\"width\":607,\"height\":120,\"caption\":\"YOU CANalytics\"},\"image\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#website\",\"url\":\"https:\/\/ucanalytics.com\/blogs\/\",\"name\":\"YOU CANalytics |\",\"description\":\"Explore the Power of Data Science\",\"publisher\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ucanalytics.com\/blogs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&ssl=1\",\"width\":1015,\"height\":475,\"caption\":\"Thompson Sampling and Artificial Intelligence - by Roopam\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#webpage\",\"url\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/\",\"name\":\"Thompson Sampling & Artificial Intelligence - Digital Marketing Case Study\",\"isPartOf\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#primaryimage\"},\"datePublished\":\"2017-06-20T05:36:29+00:00\",\"dateModified\":\"2018-08-11T07:52:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ucanalytics.com\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Thompson Sampling for Artificial Intelligence &#8211; Digital Marketing Case Study Example (Part 4)\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#webpage\"},\"author\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#\/schema\/person\/55961a1cea272ecdf290cb387be069b6\"},\"headline\":\"Thompson Sampling for Artificial Intelligence &#8211; Digital Marketing Case Study Example (Part 4)\",\"datePublished\":\"2017-06-20T05:36:29+00:00\",\"dateModified\":\"2018-08-11T07:52:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#webpage\"},\"wordCount\":1990,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#organization\"},\"image\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&ssl=1\",\"articleSection\":[\"Digital Marketing - Case Study\",\"Marketing Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#\/schema\/person\/55961a1cea272ecdf290cb387be069b6\",\"name\":\"Roopam Upadhyay\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dd1aa0b0e813f7639800bcfad6a554f1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dd1aa0b0e813f7639800bcfad6a554f1?s=96&d=mm&r=g\",\"caption\":\"Roopam Upadhyay\"},\"description\":\"This blog contains my personal views and thoughts on predictive Analytics and big data. - Roopam Upadhyay\",\"sameAs\":[\"roopam\"],\"url\":\"https:\/\/ucanalytics.com\/blogs\/author\/roopam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Thompson Sampling & Artificial Intelligence - Digital Marketing Case Study","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/","og_locale":"en_US","og_type":"article","og_title":"Thompson Sampling & Artificial Intelligence - Digital Marketing Case Study","og_description":"This is the final part of the digital marketing case study example. In this case study, you are a digital analytics consultant. Here, you are working with your client Helping Hand, an NGO, to extract the maximum value out of their marketing campaign. For this, you are using principles of\u00a0reinforcement learning\u00a0to get the maximum donationRead More...","og_url":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/","og_site_name":"YOU CANalytics |","article_author":"roopam","article_published_time":"2017-06-20T05:36:29+00:00","article_modified_time":"2018-08-11T07:52:22+00:00","og_image":[{"width":1015,"height":475,"url":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&ssl=1","type":"image\/jpeg"}],"twitter_misc":{"Written by":"Roopam Upadhyay","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/ucanalytics.com\/blogs\/#organization","name":"YOU CANalytics","url":"https:\/\/ucanalytics.com\/blogs\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/ucanalytics.com\/blogs\/#logo","inLanguage":"en-US","url":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2015\/11\/YOU-CANalytics-Logo.jpg?fit=607%2C120","contentUrl":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2015\/11\/YOU-CANalytics-Logo.jpg?fit=607%2C120","width":607,"height":120,"caption":"YOU CANalytics"},"image":{"@id":"https:\/\/ucanalytics.com\/blogs\/#logo"}},{"@type":"WebSite","@id":"https:\/\/ucanalytics.com\/blogs\/#website","url":"https:\/\/ucanalytics.com\/blogs\/","name":"YOU CANalytics |","description":"Explore the Power of Data Science","publisher":{"@id":"https:\/\/ucanalytics.com\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ucanalytics.com\/blogs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#primaryimage","inLanguage":"en-US","url":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&ssl=1","width":1015,"height":475,"caption":"Thompson Sampling and Artificial Intelligence - by Roopam"},{"@type":"WebPage","@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#webpage","url":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/","name":"Thompson Sampling & Artificial Intelligence - Digital Marketing Case Study","isPartOf":{"@id":"https:\/\/ucanalytics.com\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#primaryimage"},"datePublished":"2017-06-20T05:36:29+00:00","dateModified":"2018-08-11T07:52:22+00:00","breadcrumb":{"@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ucanalytics.com\/blogs\/"},{"@type":"ListItem","position":2,"name":"Thompson Sampling for Artificial Intelligence &#8211; Digital Marketing Case Study Example (Part 4)"}]},{"@type":"Article","@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#article","isPartOf":{"@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#webpage"},"author":{"@id":"https:\/\/ucanalytics.com\/blogs\/#\/schema\/person\/55961a1cea272ecdf290cb387be069b6"},"headline":"Thompson Sampling for Artificial Intelligence &#8211; Digital Marketing Case Study Example (Part 4)","datePublished":"2017-06-20T05:36:29+00:00","dateModified":"2018-08-11T07:52:22+00:00","mainEntityOfPage":{"@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#webpage"},"wordCount":1990,"commentCount":3,"publisher":{"@id":"https:\/\/ucanalytics.com\/blogs\/#organization"},"image":{"@id":"https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&ssl=1","articleSection":["Digital Marketing - Case Study","Marketing Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ucanalytics.com\/blogs\/thompson-sampling-for-artificial-intelligence-digital-marketing-case\/#respond"]}]},{"@type":"Person","@id":"https:\/\/ucanalytics.com\/blogs\/#\/schema\/person\/55961a1cea272ecdf290cb387be069b6","name":"Roopam Upadhyay","image":{"@type":"ImageObject","@id":"https:\/\/ucanalytics.com\/blogs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/dd1aa0b0e813f7639800bcfad6a554f1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd1aa0b0e813f7639800bcfad6a554f1?s=96&d=mm&r=g","caption":"Roopam Upadhyay"},"description":"This blog contains my personal views and thoughts on predictive Analytics and big data. - Roopam Upadhyay","sameAs":["roopam"],"url":"https:\/\/ucanalytics.com\/blogs\/author\/roopam\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/05\/Mother-Teresa-and-Stalin.jpg?fit=1015%2C475&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3L0jT-2Dt","jetpack-related-posts":[{"id":9797,"url":"https:\/\/ucanalytics.com\/blogs\/reinforcement-learning-and-artificial-intelligence-digital-marketing-case-study-example-part-1\/","url_meta":{"origin":10135,"position":0},"title":"Reinforcement Learning and Artificial Intelligence &#8211; Digital Marketing Case Study Example (Part 1)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"How to make machines learn on their own similar to humans? This is the pivotal question for the development of artificial intelligence. To develop intelligent machines and systems (artificial intelligence), we need to understand how human intelligence and learning work. For this, we will explore the ideas behind reinforcement learning.\u2026","rel":"","context":"In &quot;Digital Marketing - Case Study&quot;","block_context":{"text":"Digital Marketing - Case Study","link":"https:\/\/ucanalytics.com\/blogs\/category\/digital-marketing-case-study\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?fit=1200%2C654&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?fit=1200%2C654&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?fit=1200%2C654&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?fit=1200%2C654&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Digital-Marketing-Campaign.jpg?fit=1200%2C654&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":9910,"url":"https:\/\/ucanalytics.com\/blogs\/ab-testing-explained-challenged-digital-marketing-case-study-example-part-2\/","url_meta":{"origin":10135,"position":1},"title":"A\/B Testing Explained and Challenged &#8211; Digital Marketing Case Study Example (Part 2)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"Welcome back to our digital marketing case study example. In the previous part, you had initiated an email donation campaign for your client Helping Hand, an NGO, with three different ads for the same cause to support the needy in Africa. The idea is to identify the ad that generates\u2026","rel":"","context":"In &quot;Digital Marketing - Case Study&quot;","block_context":{"text":"Digital Marketing - Case Study","link":"https:\/\/ucanalytics.com\/blogs\/category\/digital-marketing-case-study\/"},"img":{"alt_text":"A\/B Testing and Photo Finish - by Roopam","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Race.jpg?fit=626%2C421&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Race.jpg?fit=626%2C421&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Race.jpg?fit=626%2C421&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3973,"url":"https:\/\/ucanalytics.com\/blogs\/model-selection-retail-case-study-example-part-7\/","url_meta":{"origin":10135,"position":2},"title":"Model Selection &#8211; Retail Case Study Example (Part 7)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"Model Selection This is a continuation of our retail case study example for campaign and marketing analytics. In the previous two parts, we discussed a couple of decision tree algorithms (CART and C4.5)\u00a0for classification. Recall a previous case study example on\u00a0banking and risk management where we discussed logistic regression\u00a0which is\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3129,"url":"https:\/\/ucanalytics.com\/blogs\/marketing-analytics-retail-case-study-part-1\/","url_meta":{"origin":10135,"position":3},"title":"Marketing Analytics &#8211; Retail Case Study Example (Part 1)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"Today we are going to start a new case study example on YOU CANalytics. In this case study example, we will examine different facets of marketing analytics and customer relationship management (CRM). We will use the example of online retail to explore more about marketing analytics - an area of\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"Marketing Analytics Modeling","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/06\/Marketing-Analytics-Modeling-Blog.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/06\/Marketing-Analytics-Modeling-Blog.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/06\/Marketing-Analytics-Modeling-Blog.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/06\/Marketing-Analytics-Modeling-Blog.jpg?resize=700%2C400 2x"},"classes":[]},{"id":4054,"url":"https:\/\/ucanalytics.com\/blogs\/artificial-neural-networks-retail-case-study-example-part-8\/","url_meta":{"origin":10135,"position":4},"title":"Artificial Neural Networks, Made Easy &#8211; Retail Case Study Example (Part 8)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"Welcome back to\u00a0our retail case study example\u00a0for campaign and marketing analytics. So far in this case study, we were working on a\u00a0classification problem to identify customers with a higher likelihood to purchase products from\u00a0the campaign catalogues. In the last article on\u00a0model selection, we noticed that artificial neural networks performed better\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/Artificial-Neural-Networks.jpg?fit=346%2C336&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9951,"url":"https:\/\/ucanalytics.com\/blogs\/bayesian-statistics-to-improve-ab-testing-digital-marketing-case-study-example-part-3\/","url_meta":{"origin":10135,"position":5},"title":"Bayesian Statistics to Improve A\/B Testing &#8211; Digital Marketing Case Study Example (Part 3)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"Welcome back to the\u00a0digital marketing case study example. In this case study, you are helping your client to identify an ad that will generate them the maximum return on marketing investment (ROMI). In the previous part, we discussed A\/B testing which is the\u00a0prevalent method used to compare the effectiveness of\u2026","rel":"","context":"In &quot;Digital Marketing - Case Study&quot;","block_context":{"text":"Digital Marketing - Case Study","link":"https:\/\/ucanalytics.com\/blogs\/category\/digital-marketing-case-study\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Bayesian-Statistics-and-Knowledge.jpg?fit=920%2C574&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Bayesian-Statistics-and-Knowledge.jpg?fit=920%2C574&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Bayesian-Statistics-and-Knowledge.jpg?fit=920%2C574&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2017\/04\/Bayesian-Statistics-and-Knowledge.jpg?fit=920%2C574&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/posts\/10135"}],"collection":[{"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/comments?post=10135"}],"version-history":[{"count":0,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/posts\/10135\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/media\/10136"}],"wp:attachment":[{"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/media?parent=10135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/categories?post=10135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/tags?post=10135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}