Home

Site Map

Search

Random walk
                      Gambler's Ruin applet
GeoAstro
Applets

Astronomy
Random walk
                    Gambler's Ruin applet
Chaos Game
Random
                      walk Gambler's Ruin applet
Java
Random
                    walk Gambler's Ruin applet
Miscel-

laneous
Random
                      walk Gambler's Ruin applet
Physics Quiz
Random walk
                    Gambler's Ruin applet
Who is
Who ?

Gambler's Ruin Applet



A gambler starts with a stake of size S.
He
repeatedly plays a fair game, with 0.5 probability of winning or losing 1 dollar,  until his capital reaches the value M or until going broke (capital 0).

start


stop
button starting a single game,
the diagram is showing the current capital


button to stop the game

stake
select the value S of the initial stake
final
select the value M of the final capital the player tries to reach


Statistical analysis:


test
button starting a set of N games
games
the numbers N of games can be selected from the menu

The probability of winning a capital M starting 

expected duration of a fair gambling game

a stake of size S is:

P = S / M

probability win

expected duration of a fair gambling game

The expected duration of a game:

If the gambler starts with S dollars and  plays until he is broke (lost) or has a capital of M dollars,
he can expect n = S(M-S) steps

expected duration of a fair gambling gam

expected duration of a fair gambling 

steps Won Lost
The green line is computed from the blue and red one by:

n = Pwon
nwon + Plostnlost = (S/M)nwon + (1-S/M)nlost

which agrees with n= S(M-S)

Web Links
Random Walk--1-Dimensional (Wolfram MathWorld)

Random Walk--2-Dimensional (Wolfram MathWorld)

An Introduction to Random Walks (D. Johnston)

Gamblers ruin (Wikipedia)

Gamblers Ruin (Wolfram MathWorld)

The Gamblers Ruin (MathPages)

Updated: 2012 Sep 30