# Monty Hall Problem

Monty Hall was mostly known for being the talk show host of the show called “Let’s Make a Deal”.

Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the other two are goats. You pick a door, say №1, and the host, who knows what’s behind the doors, opens another door, say №3, which has a goat. He then says to you, “Do you want to pick door №2?” Is it to your advantage to switch your choice?

Most people would say that once one door is revealed then you have only 2 choices left and therefore your chances of winning are 1/2 or 50%, and so it wouldn’t matter if you stay or switched doors.

**Spoiler Alert:** You are better off switching, although surprisingly most people choose to stay.

This problem was briefly talked about in the movie 21.

Let us think about the game show from the shows point of view, the show knows where there is a goat and where there isn’t a goat. So then let’s assume we are given three doors (Door #1, Door #2, and Door#3). Behind the first door is a goat, behind the second door is a car (our prize) and behind the third door is another goat.

**Suppose the contestant chooses Door #1**, then the host reveals Door #3 (the goat), since the host knows Door #2 contains the prize car. In this case it is good for the contestant to switch.

**Suppose the contestant chooses Door #2**, then the host reveals either Door #1 or Door #3. In this case it is bad to switch for the contestant.

**Suppose the contestant chooses Door #3**, then the host reveals Door #1. In this case it is good for the contestant to switch.

Let’s look at the probability of **NEVER** switching. There are three doors and 1 of the three doors contains the car, your desired prize, while 2 of the three doors contains the undesired prize (the goat). If the contestant chooses to stick with their gut feeling and choose to never switch then the probability of winning is 1/3 and their probability of losing is 2/3.

Probability( Winning) = P(W) = 1/3

Probability (Losing) = P(L) = 2/3

Now let’s take a look at the probability of **ALWAYS **switching. Let’s think about how you would win if you always switched. Going back to **Fig. 1. **The doors containing the goat, car, and goat in that order. If you picked door #1 the host will show you door #3 and you should switch, and if you picked door #3 the host will show you door #1 and you should switch. So if you picked a wrong door (a door containing a goat) and switch you always win.

1. If initial pick is wrong

2. You switch , the host shows you the other wrong door

3. Then you will always win

What is the probability of winning if you always switch, well it’s the probability that you initially picked wrong. What is that probability 2/3.

What’s the probability of losing ?

1. If initial pick is correct

2. You switch, The host shows you one of the two doors containing a goat

3. Then you switch into the other door with the goat, and always lose

So the probability of you losing is the probability of you picking the correct door the first time, which is 1/3.

In conclusion by switching doors in this case, your probability of winning is 2/3 and your probability of losing is 1/3 . Another way of thinking about it is, if you choose to switch you increase your chances of winning by 1/3 or about 33%.

If you would like to read more about this remarkable story I suggest you read the book “** The Monty Hall Problem: The Remarkable Story of Math’s Most Contentious Brain Teaser**”. In this book, the author Jason Rosenhouse explores the history of the Monty Hall puzzle. He shows how the problem has fascinated philosophers, psychologists, and many others, and examines the many variations that have appeared over the years using minimum mathematics.

Thanks for reading this article I hope its helpful to you all ! Keep up the learning, and if you would like math, computer science, programming and algorithm analysis videos please visit and subscribe to my YouTube channels (randerson112358 & compsci112358 )

# Check Out the following for content / videos on Computer Science, Algorithm Analysis, Programming and Logic:

**YouTube Channel:***randerson112358: *https://www.youtube.com/channel/UCaV_0qp2NZd319K4_K8Z5SQ

*compsci112358:*

https://www.youtube.com/channel/UCbmb5IoBtHZTpYZCDBOC1CA

**Website:**

http://everythingcomputerscience.com/

**Video Tutorials on Recurrence Relation:**

https://www.udemy.com/recurrence-relation-made-easy/

**Video Tutorial on Algorithm Analysis:**

https://www.udemy.com/algorithm-analysis/

**Twitter:**

https://twitter.com/CsEverything