Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

From MATLAB to Maple . You are offered the following game. A fair coin will be tossed until the first time it comes up heads.

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!

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'); 

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

Step: 3

blur-text-image

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

What is management growth? What are its factors

Answered: 1 week ago

Question

8. How would you explain your decisions to the city council?

Answered: 1 week ago