Question: computer science major, data sci and applied mach learn class. please need help, answer questions 1, 2, and 3. using python. Originating from the American

 computer science major, data sci and applied mach learn class. please

need help, answer questions 1, 2, and 3. using python. Originating from

the American TV program, "Let's Make a Deal," the Monty Hall problem

gives a contestant a chance to win a car. There are three

computer science major, data sci and applied mach learn class. please need help, answer questions 1, 2, and 3. using python.

Originating from the American TV program, "Let's Make a Deal," the Monty Hall problem gives a contestant a chance to win a car. There are three doors and behind one is a brand new car. The other two doors are hiding goats. The contestant chooses a door: the first, second, or third. Then the host Monty Hall opens up one of the other two doors remaining to reveal a goat. There are now two unopened doors, the one the contestant originally chose and the other un-opened door. Behind one is a goat and behind the other is a car. The contestant is given the option to stay with their originally-chosen door or to switch to the other door. Which should they do? Or does it not matter? Create a python simulation to answer this question. You may use the following seven steps as a guide, or you may develop your own. What matters is that you - Create a computer simulation that follows the Monty Hall problem, - Generate a Monte Carlo probability of winning a car for each of the choices of staying and switching doors, and - Provide a recommendation of whether the contestant should stay or switch doors. Step 1. (5 Points) Create a numpy array doors with the three possibiliites: goat one, goat two, and car. The contestant randomly chooses a door; simulate this by randomly choosing one of these three using np.random.choice () and calling it original_choice. [ ] Step 2. (5 Points) Now the host reveals a goat behind one of the two un-chosen doors. If the contestant had chosen a door with a goat behind it, then there is only one other door with a goat and that one will be opened by the host. If the contestant had chosen the door with the car behind it, then both un-chosen doors contain goats and the host will randomly decide which one to open. Simulate this. Call the goat-door the host reveals revealed_door. Hint: Use if statements. Step 3. (5 Points) Copy your code from Step 2 and modify it to assign what is left behind the third (un-chosen and un-revealed) door within the if statements, so as to be more computationally concise. Call this door the other_door

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!