]>
In the game of red and black,a player starts with an initial fortune and bets (at even stakes) on independent trials for which the probability of winning is . The player must continue until she is either ruined or reaches a fixed target fortune .
The first graph shows the initial, current, and target fortunes at each stage. The trial table shows the sequence of trial outcomes and fortunes. Random variable indicates the event that the player wins the game (reaches her target) and gives the number of trials. These variables are recorded in the data table. The relative frequency function of is shown in the distribution graph and recorded in the distribution table. The average value of is given in the moment table. The parameters , and can be varied with scroll bars and various values of can be selected with the list box. The bet on each trial can be varied with a scroll bar.