### The Red and Black Game

State Space

#### Description

In the game of red and black, a player starts with an initial fortune $$x_0$$ and bets (at even stakes) on independent trials for which the probability of winning is $$p$$. The player must continue until she is either ruined or reaches a fixed target fortune $$a$$.

The state space graph shows the initial, current, and target fortunes at each stage. The trial table shows the sequence of trial outcomes and fortunes. Random variable $$J$$ indicates the event that the player wins the game (reaches her target) and $$N$$ gives the number of trials. These variables are recorded in the data table. The relative frequency function of $$J$$ is shown in the distribution graph and recorded in the distribution table. The average value of $$N$$ is given in the moment table. The parameters $$x$$ and $$p$$ can be varied with input controls and various values of $$a$$ can be selected with the list box. The bet on each trial can be varied with an input control.