Question: 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.

(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
Get step-by-step solutions from verified subject matter experts
