gamblers_ruin_simulation_test
gamblers_ruin_simulation_test,
a MATLAB program which
calls gamblers_ruin_simulation() to simulate the game of gambler's ruin.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Related Data and Programs:
gamblers_ruin_simulation,
a MATLAB program which
simulates the game of gambler's ruin.
Source Code:
-
flips_70_70_hist.png,
a histogram of the number of times the lead changes when A and B
both start the game with $70. The game was run 1,000 times.
-
game_5_7_plot.png,
a plot of A's winnings in a single game in which A began with
$5 and B with $7.
-
steps_70_70_hist.png,
a histogram of the number of coin tosses required to complete then
game when A and B
both start the game with $70. The game was run 1,000 times.
Last revised on 23 January 2019.