Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 2 Problem 3: This problem is called the Monty Hall Problem, named after the original host of the game show Let's Make a Deal
1 2 Problem 3: This problem is called the Monty Hall Problem, named after the original host of the game show "Let's Make a Deal" It's a perplexing little problem about probability. The basic idea is that the game show host shows you three closed doors and asks you to pick one. Behind one door is a brand new car. The other two doors have goats behind them. Whatever you pick is your prize. After you choose a door, but before it is opened, Monty (who knows where the goats are) opens one of the other doors revealing a goat. Then he says, "Before opening your door, 'll give you a chance to change your mind and swap your door for the remaining closed door." The dilemma is ...should you do it? t turns out, somewhat surprisingly that you definitely should swap doors. Watch this You Tube videdo to get an explanation of the problem and the logic behind its (non-obvious) answer For this assignment, you are to write a program that simulates the Monty Hall Problem for 10,000 trials. In each trial, first randomly pick a door (1, 2 or 3) where the car is placed. Then, randomly pick a door as the players guess. Then pick a door for the host to reveal (not the same door the player chose, must have a goat behind it, chosen randomly if the remaining two doors both have goats). Then pick a strategy (either stay or swap) at random. Then increment appropriate counters. You'll need to count the number of times each of the two strategies was selected and also to count the number of wins for each strategy. After all trials are complete, print the counter values and the win percentage for each strategy
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started