The Expected Number of Trials with Timid Play

Home

Java Applet Interactive red and black game

Java Applet Simulation of the red and black experiment


Now let us consider the expected number of trials needed with timid play, when the initial fortune is x:

g(x) = E(N | X0 = x) for x = 0, 1, ..., a.

Mathematical Exercise 1. By conditioning on the outcome of the first trial, show that g satisfies the difference equation

g(x) = qg(x - 1) + pg(x + 1) + 1 for x = 1, 2, ..., a - 1

and show that g satisfies the boundary conditions g(0) = 0, g(a) = 0.

The difference equation in Exercise 1 is linear, second order, but non-homogeneous. The corresponding homogeneous equation occurred in the analysis of the probability of winning with timid play. Thus, only a little additional work is needed here.

Mathematical Exercise 2. Show that if p is not 1/2 then

Mathematical Exercise 3. Show that if p = 1/2 then

g(x) = x (a - x) for x = 0, 1, ..., a.

For many parameter settings, the expected number of trials is surprisingly large. For example, suppose that p = 1/2 and the target fortune is 100. If the gambler's initial fortune is 1, then the expected number of trials is 99, even though half of the time, the gambler will be ruined on the first trial. If the initial fortune is 50, the expected number of trials is 2500.

Simulation Exercise 4. In the red and black experiment, select Timid Play. Vary the initial fortune, the target fortune and the win probability and notice how the expected number of trials changes. Now with x = 16, a = 32, and p = 0.5, run the experiment 1000 times with an update frequency of 100. Note the apparent convergence of the sample mean number of trials to the expect value.

Simulation Exercise 5. In the red and black experiment, select Timid Play. Set the target fortune to 128, the initial fortune to 64 and the trial win probability to 0.5. Run the experiment 100 times and note the large size and large variation of the number of trials.


Red and Black

PreviousNext