Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use matlab help me do this. Fill in the code that missing. The problem is Monty Hall problem. (d) Your job now is to

Please use matlab help me do this. Fill in the code that missing. The problem is Monty Hall problem.

image text in transcribed

(d) Your job now is to carry out the simulation by filling in the ...s in the following for loop that plays the game 1000 times prizes..init = [1, 0, 0] runs 1000; wins. wins-stay = zeros (1, runs); for i 1: runs switch = zeros (1, runs); prizes -.... % randomly put prizes behind 3 doors door = prize -... ; % you get this prize if you stick to % select a door at ra ndom % the chosen door (stay-strategy) wins. Stay(1) -.... % store this prize in the % 'stay-strategy. array prizes (door)=[]; % this is what's left behind % the other doors % the sum of what's behind the other doors % is exactly what you get if you pursue the % the 'switch-st rategy". Why? wins-switch(1) = sum(prizes); % store the prize in the %'switch-strategy, array end (d) Your job now is to carry out the simulation by filling in the ...s in the following for loop that plays the game 1000 times prizes..init = [1, 0, 0] runs 1000; wins. wins-stay = zeros (1, runs); for i 1: runs switch = zeros (1, runs); prizes -.... % randomly put prizes behind 3 doors door = prize -... ; % you get this prize if you stick to % select a door at ra ndom % the chosen door (stay-strategy) wins. Stay(1) -.... % store this prize in the % 'stay-strategy. array prizes (door)=[]; % this is what's left behind % the other doors % the sum of what's behind the other doors % is exactly what you get if you pursue the % the 'switch-st rategy". Why? wins-switch(1) = sum(prizes); % store the prize in the %'switch-strategy, array end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions