{"id":314,"date":"2022-03-30T15:50:40","date_gmt":"2022-03-30T15:50:40","guid":{"rendered":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/?p=314"},"modified":"2022-04-04T08:43:08","modified_gmt":"2022-04-04T08:43:08","slug":"the-monty-hall-problem-and-its-generalisations-part-1","status":"publish","type":"post","link":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/2022\/03\/the-monty-hall-problem-and-its-generalisations-part-1\/","title":{"rendered":"The Monty Hall problem and its generalisations: Part 1"},"content":{"rendered":"\n<p>In this two part series of blog posts, we will explore how a simple game of seemingly random choice, inspired by an innocuous 60\u2019s TV show can result in an intriguing investigation into both the simplicity and deceitful nature of probability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Pick a door, any door<\/h2>\n\n\n\n<p>In a 1975 letter to the American Statistician, Steve Selvin posed a problem loosely based off the 1960\u2019s American TV show Let\u2019s Make a Deal. The game consisted of three doors, two of which had goats behind them, and a third door containing a dream car. The host of the show, Monty Hall, asks the contestant to select a door. Monty then chooses a remaining door to reveal a goat. He then asks the contestant if they would like to switch to the one remaining unrevealed door, or stay with their initial choice.  <\/p>\n\n\n\n<p>Years later in 1990, Marilyn vos Savant, who rose to fame for her supposedly <a rel=\"noreferrer noopener\" href=\"https:\/\/www.ft.com\/content\/4add9230-23d5-11de-996a-00144feabdc0#axzz2h4SGOygh\" target=\"_blank\">record high IQ<\/a>, was posed a similar question in her &#8220;Ask Marilyn&#8221; column for Parade magazine (<a rel=\"noreferrer noopener\" href=\"https:\/\/parade.com\/tag\/ask-marilyn\/\" target=\"_blank\">which is still running today<\/a>!).  The responses of both Selvin and vos Savant respectively, postulated that it will be in the best interest for<br>the contestant to switch doors. <\/p>\n\n\n\n<p>This came as a rather counterintuitive conclusion to many as it may be initially thought that there is no difference in staying or switching, there is a still a 50% chance the car lies behind either remaining door.  This idea was widely shared amongst the public, with Vos Savant<a href=\"https:\/\/www.nytimes.com\/1991\/07\/21\/us\/behind-monty-hall-s-doors-puzzle-debate-and-answer.htm\" target=\"_blank\" rel=\"noreferrer noopener\"> receiving 10,000 complaints for her statistical heresy<\/a>. How could it be a better option to switch doors? The criticism ranged from soccer moms, to amateur Mathematicians, and even those possessing PhD\u2019s in Maths based disciplines.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/c.tenor.com\/7YQC7xzuzcAAAAAd\/hannibal-buress.gif\" alt=\"\" width=\"540\" height=\"412\" \/><figcaption>Historical re-enactment of Marilyn Vos Savant response to critics.<\/figcaption><\/figure><\/div>\n\n\n\n<p>However the two savvy protagonists of this story were correct in their rational&#8230; and more importantly, had the maths to prove it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The host knows all<\/h2>\n\n\n\n<p>To understand why it is in our best interest to switch,  let\u2019s pose the problem in a more formal sense by having a run through. We have three doors that can be labelled 1,2,3. Our esteemed host, Monty Hall, asks the contestant to pick a door. Say they pick door 1. Monty, who knows what\u2019s behind each door, opens door 2 and reveals a goat. He then poses the question \u201dwould you like to stick with your choice or switch to door three?\u201d. To help quell the contestants dilemma, we can first think about the odds of initially picking the correct door.  With three doors, the contestant has a 1\/3 chance of picking correct straight away. Then if we remove a door, does that change our odds when switching?<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/3\/3f\/Monty_open_door.svg\/1200px-Monty_open_door.svg.png\" alt=\"\" \/><figcaption>A highly detailed drawing of the monty hall problem. <\/figcaption><\/figure><\/div>\n\n\n\n<p>One naive way to think about it is that, if each door has equal probability, surely switching makes no difference? Since removing a door will leave us with two options, we must have a 1\/2 chance of winning either way? The problem with this approach is we do not account for the host knowing what is behind each door. Given that the first door possesses a probability of 1\/3 of containing our Car. The other two doors must attain a 2\/3 probability it lies behind either one; and behind one of these doors, must lie a<br>goat. Since Monty knows that, in this scenario, door 2 has a goat, this door is revealed and we are left with the option of switching to door 3. Yet we still have a 2\/3 probability that the Car doesn\u2019t lie behind the first door, so this probability carries over to represent just door 3. Hence we have probabilities of 1\/ 3 for door 1, 0 for door 2, and 2\/3 for door 3. Concluding that switching will be the correct decision to this dilemma.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Our newest contestant, Thomas Bayes <\/h2>\n\n\n\n<p>Wordy anecdotes are all well and good, but can we consolidate our understanding with mathematical rigour? Using some Bayesian statistics this is indeed possible (an excellent book on the topic for newcomers to the area can be <a rel=\"noreferrer noopener\" href=\"https:\/\/www.amazon.co.uk\/Bayes-Rule-Tutorial-Introduction-Bayesian\/dp\/0956372848\" target=\"_blank\">found here<\/a>). <\/p>\n\n\n\n<p>We start with the idea that, given two events (<span class=\"wp-katex-eq\" data-display=\"false\">A <\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">B<\/span>), we know that if we are given information for one of these events, <span class=\"wp-katex-eq\" data-display=\"false\">A <\/span> say, then we can calculate the probability of event <span class=\"wp-katex-eq\" data-display=\"false\">B<\/span> happening given the information of <span class=\"wp-katex-eq\" data-display=\"false\">A<\/span>. We denote this <span class=\"wp-katex-eq\" data-display=\"false\">\\mathbb{P}[B|A] <\/span>. A special formula, known as Bayes\u2019 theorem, then states the following with this information:<\/p>\n\n\n\n<span class=\"wp-katex-eq katex-display\" data-display=\"true\">\\mathbb{P}[B|A]=\\frac{\\mathbb{P}[B]\\mathbb{P}[A|B]}{\\mathbb{P}[A]}<\/span>\n\n\n\n<p>We apply this to Monty Hall problem as follows. In this problem we have three doors 1,2,3 and we have the events that the prize lies between each respective door, denoted <span class=\"wp-katex-eq\" data-display=\"false\">D_1, D_2, D_3<\/span>.  Lets suppose we select door 1 initially, and our host Monty opens door 3 to show a goat. So it follows that <span class=\"wp-katex-eq\" data-display=\"false\">\\mathbb{P}[D_3] =0<\/span>. <\/p>\n\n\n\n<p>Now let <span class=\"wp-katex-eq\" data-display=\"false\">G<\/span> be the information that there is a goat behind door 3. We can use Bayes\u2019 Theorem to formulate the following probabilities for finding the Car behind doors 1 or 2, given the information of  <span class=\"wp-katex-eq\" data-display=\"false\">G<\/span>, as:<\/p>\n\n\n\n<span class=\"wp-katex-eq katex-display\" data-display=\"true\">\\mathbb{P}[D_1|G]=\\frac{\\mathbb{P}[D_1]\\mathbb{P}[G|D_1]}{\\mathbb{P}[G]}, \\\\ \\\\ \\mathbb{P}[D_2|G]=\\frac{\\mathbb{P}[D_2]\\mathbb{P}[G|D_2]}{\\mathbb{P}[G]} <\/span>\n\n\n\n<p>We can calculate the probabilities of each quantity of the Right hand side intuitively as:<\/p>\n\n\n\n<span class=\"wp-katex-eq katex-display\" data-display=\"true\"> \\mathbb{P}[D_1]=\\mathbb{P}[D_2]=1\/3 \\\\ \\mathbb{P}[G|D_1]=1\/2  \\\\ \\textrm{(As, if the prize was behind door 1, we can choose either 2 or 3 to open)} \\\\ \\mathbb{P}[G|D_2]=1 \\\\ \\textrm{(As we are just restricted to opening door 3 if the prize is behind 2)}\\\\  \\mathbb{P}[G|D_3]=0 \\\\ \\textrm{(If the prize lies here, we can\u2019t open it)} <\/span>\n\n\n\n<p>Since <span class=\"wp-katex-eq\" data-display=\"false\">D_1, D_2, D_3<\/span> cannot occur simultaneously, then, we can use some more simple statistical properties, specifically mutually exclusivity to express the probability of a goat behind door 3 as:<\/p>\n\n\n\n<span class=\"wp-katex-eq katex-display\" data-display=\"true\"> \\mathbb{P}[G]=\\sum_{i=1}^3 \\mathbb{P}[D_i]\\mathbb{P}[G|D_i]=(1\/3)(1\/2)+(1\/3)(1)+(1\/3)(0)=1\/2 <\/span>\n\n\n\n<p>Placing all these values back into our Bayes equations yields:<\/p>\n\n\n\n<span class=\"wp-katex-eq katex-display\" data-display=\"true\">\\mathbb{P}[D_1|G]=\\frac{\\mathbb{P}[D_1]\\mathbb{P}[G|D_1]}{\\mathbb{P}[G]}=\\frac{(1\/3)(1\/2)}{1\/2}=1\/3, \\\\ \\\\ \\mathbb{P}[D_2|G]=\\frac{\\mathbb{P}[D_2]\\mathbb{P}[G|D_2]}{\\mathbb{P}[G]}=\\frac{(1\/3)(1)}{1\/2}=2\/3. <\/span>\n\n\n\n<p>Hence, if we switch to door 2, it gives us a 2\/3 chance of winning and staying with door 1 produces a 1\/3 chance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Numerical Simulation<\/h2>\n\n\n\n<p>Unfortunately I couldn&#8217;t think of a witty title for this section, but nevertheless it would still be interesting to explore a simulation and see if we can back up these theoretical results. To do this, we run the monty hall problem 1000 times, randomly generating where the car lies, which door we open and the probability of winning if we stay or switch.  We should see that switching means we win about 66.6% of the time and the plot below, showing the aggregated probabilities as we run the simulation more times, support our Bayes based theory.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"402\" src=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-content\/uploads\/sites\/36\/2022\/03\/MHS.png\" alt=\"\" class=\"wp-image-327\" srcset=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-content\/uploads\/sites\/36\/2022\/03\/MHS.png 549w, https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-content\/uploads\/sites\/36\/2022\/03\/MHS-300x220.png 300w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><figcaption>Graph showing the likelihood of winning if you stayed or switched in the Original Monty Hall Problem. With the graph showing how the probability of success from each option changes with more simulations of the scenario, leading to final probabilities of winning as 0.691 and 0.309 for switching and staying respectively.<\/figcaption><\/figure><\/div>\n\n\n\n<p>And with this, we close our first show. In the next blog post we explore some extensions to this problem, and answering the burning question: what if Monty Hall had access to more doors, more goats, and more contestants? <\/p>\n\n\n\n<p>Further Reading<\/p>\n\n\n\n<p>For another take on the Monty Hall problem, <a rel=\"noreferrer noopener\" href=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/nikos-tsikouras\/2022\/03\/10\/the-monty-hall-problem\/\" target=\"_blank\">see this<\/a> by a fellow STOR-i student. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this two part series of blog posts, we will explore how a simple game of seemingly random choice, inspired by an innocuous 60\u2019s TV show can result in an intriguing investigation into both the simplicity and deceitful nature of probability. Pick a door, any door In a 1975 letter to the American Statistician, Steve&hellip;&nbsp;<a href=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/2022\/03\/the-monty-hall-problem-and-its-generalisations-part-1\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">The Monty Hall problem and its generalisations: Part 1<\/span><\/a><\/p>\n","protected":false},"author":39,"featured_media":329,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","slim_seo":{"title":"The Monty Hall problem and its generalisations: Part 1 - Ben Lowery @ STOR-i","description":"In this two part series of blog posts, we will explore how a simple game of seemingly random choice, inspired by an innocuous 60\u2019s TV show can result in an intr"},"footnotes":""},"categories":[4],"tags":[32,37,33,35,31,36],"class_list":["post-314","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-statistics","tag-bayes","tag-bayesian-inference","tag-doors","tag-goat","tag-monty-hall","tag-stats"],"_links":{"self":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/posts\/314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/comments?post=314"}],"version-history":[{"count":14,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/posts\/314\/revisions"}],"predecessor-version":[{"id":368,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/posts\/314\/revisions\/368"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/media\/329"}],"wp:attachment":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/media?parent=314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/categories?post=314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/ben-lowery\/wp-json\/wp\/v2\/tags?post=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}