Here is a simulation of a gambler's ruin process. (Updated: see the new scalable version.)

[Oops, your browser will not display java applets.]

This applet simulates a gambler who repeatedly bets $10, until he either loses by going broke, or wins by doubling his initial fortune.

The applet accepts the following keyboard inputs. (You may need to "click" on the applet first.)

The probability of victory in this "gambler's ruin" game is known to be

[((1-p)/p)^(Init/10) - 1] / [((1-p)/p)^(Init/5) - 1]
(where p is the win probability of each individual bet, and Init is the initial fortune), which is very small if p < 0.5 and Init is large. [If p = 0.5 then this formula does not apply; in that case the probability is of course 0.5.]

Applet by Jeffrey S. Rosenthal (contact me).

[Return to my Applets Page / Home Page]