Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

From MATLAB to Maple . You are offered the following game. A fair coin will be t

ID: 3842210 • Letter: F

Question

From MATLAB to Maple.

You are offered the following game. A fair coin will be tossed until the first time it comes up heads. If this occurs on the jth toss you are paid 2j dollars. You are sure to win at least 2 dollars so you should be willing to pay to play this game, but how much? Few people would pay as much as 10 dollars to play this game. See if you can decide, by simulation, a reasonable amount that you would be willing to pay, per game, if you will be allowed to make a large number of plays of the game. Does the amount that you would be willing to pay per game depend upon the number of plays that you will be allowed?

I allready have this solution, but is written in MATLAB. Any help to write that in Maple? Thanks!

Explanation / Answer

clc;clear all;close all; games=1000; pay=3;%payment per game for i=1:games j=1;%toss count while rand>0.5 %a tail turns up j=j+1; end win(i)=2^j-10; end plot(1:games,cumsum(win));grid; xlabel('games');ylabel('Cumulative winnings, 3 dollars paid for each game'); disp('very unpredictable game. pure chance');

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote