Virtual Laboratories > Red and Black > 1 [2] 3 4 5
Recall that with timid play, the gambler makes a small constant bet, say $1, on each trial until he stops. Thus, on each trial, the gambler's fortune either increases by 1 or decreases by 1, until the fortune reaches either 0 or the target a (a positive integer). Thus, the fortune process is a random walk with 0 and a as absorbing barriers. Recall that we denote this process by
Xi, i = 0, 1, 2, ...
As usual, we are interested in the probability of winning and the expected number of trials. The key idea in the analysis is that after each trial, the fortune process simply starts over again, but with a different initial value. This is an example of the Markov property and is fundamentally important in probability theory. Our analysis based on the Markov property suggests that we treat the initial fortune as a variable.
We will denote the probability that the gambler reaches the target a, starting with an initial fortune x by
f(x) = P(XN = a | X0 = x) for x = 0, 1, ..., a.
1. By conditioning
on the outcome of the first trial, show that f satisfies
The difference equation in Exercise 1 is linear, homogeneous and second order.
2. Show that the
characteristic equation of the difference equation in Exercise 1 is
pr2 - r + q = 0
and that the roots are r = 1 and r = q / p.
3. Show that if p
is not 1/2 then the roots in Exercise 2 are distinct. Show that, in this case, the
probability that the gambler reaches his target is
f(x) = [(q / p)x - 1] / [(q / p)a - 1] for x = 0, 1, ..., a.
4. Show that if p
= 1/2, the characteristic equation has a single root 1 that has multiplicity 2. Show that,
in this case, the probability that the gambler reaches his target is simply the ratio of
the initial fortune to the target fortune:
f(x) = x / a for x = 0, 1, ..., a.
From Exercises 3 and 4, we have the distribution of the final fortune XN in all cases:
P(XN = 0 | X0 = x) = 1 - f(x), P(XN = a | X0 = x) = f(x).
5. In the
red
and black experiment, choose Timid Play and set a = 32 and p =
0.45. Vary x form 0 to 32 with the scroll bar and note how the distribution of the
final fortune changes. Now with x = 24, run the experiment 1000 times with an
update frequency of 100 and note the apparent convergence of the relative frequency function to the true density.
6. Show that as a
function of x, for fixed p and a, f(x) increases from 0
to 1 as x increases from 0 to a.
7. In the
red
and black experiment choose Timid Play and set a = 64 and x = 16.
Vary p from 0 to 1 with the scroll bar and note how the distribution of the final
fortune changes. Now with p = 0.55, run the experiment 1000 times with an update
frequency of 100 and note the apparent convergence of the relative frequency function to
the true density.
8. Show that f(x)
is continuous as a function of p, for fixed x and a. Specifically,
use L'Hospital's Rule to show that the expression in Exercise 3 converges to the
expression in Exercise 4, as p converges to 1/2.
9. In the
red
and black experiment, choose Timid Play and set a = 64 and x = 32.
Vary p from 0 to 1 with the scroll bar and note how the distribution of the final
fortune changes. Now with p = 0.45, run the experiment 1000 times with an update
frequency of 100 and note the apparent convergence of the relative frequency function to
the true density.
10. Show that for
fixed x and a, f(x) increases from 0 to 1 as p
increases form 0 to 1.
What happens if the gambler makes constant bets, but with an amount higher than 1? The answer to this question may give insight into what will happen with bold play.
11. In the
red
and black game, set the target fortune to 16, the initial fortune to 8, and the win
probability to 0.45. Play 10 games with each of the following strategies. Which seems to
work best?
We will need to embellish our notation to indicate the dependence on the target fortune:
f(x; a) = P(XN = a | X0 = x).
Now fix p and suppose that the target fortune is 2a and the initial fortune is 2x. If the gambler plays timidly, then of course, his probability of reaching the target is f(2x; 2a). On the other hand:
12. Suppose that
the gambler bets 2 on each trial. Argue that
Xi / 2, i = 0, 1, 2, ...
corresponds to timid play with initial fortune x and target fortune a and that therefore the probability that the gambler reaches the target is f(x; a)
Thus, we need to compare the probabilities f(2x; 2a) and f(x; a).
13. Show that
Thus, it appears that increasing the bets is a good idea if the trials are unfair, a bad idea if the trials are favorable, and makes no difference if the trials are fair.
14. Generalize
Exercises 12 and 13 to compare timid play with the strategy of betting $k on each
trial (let the initial fortune be kx and the target fortune ka).
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.
15. By
conditioning on the outcome of the first trial, show that g satisfies the
difference equation
The difference equation in the last exercise is linear, second order, but non-homogeneous. The corresponding homogeneous equation is the equation satisfied by the win probability function f. Thus, only a little additional work is needed here.
16. Show that if p
is not 1/2 then
g(x) = x / (q - p) - [a / (q - p)][(q / p)x - 1] / [(q / p)a - 1] for x = 0, 1, ..., a.
17. 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.
18. 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.
19. 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.