Heads or tails?


 

Consider the following game.  Start with N cents.  Toss a coin. Heads you win 1¢, tails you lose 1¢. What are your prospects in the long run?

The first question is. "Is the coin fair?"  If the coin is biased against you, the probability that you eventually get bankrupt is 100%, and the mean time of waiting for it depends on the bias of the coin and your initial capital.  If the coin is biased in your favor, there is a positive probability that you will never go bankrupt but you will proceed to increase your capital.  This again depends on the bias of the coin and on your initial investment, which helps you to last through periods of bad luck.

 

But what if the coin is just fair, and the chances of winning and losing are both exactly 50%?  This is the topic of this unit.

 

Each student should simulate this game on a TI-83/84 Plus, making his/her random choices interactively.

An example of a program.

PROGRAM:HEADTAIL

:Input T                                              Asks for your initial amount.

:0→N                                                  N keeps track of the number of tosses.

:While 1

:2(randInt(0,1)-.5)→C                       The random number generator keeps going.

:If getKey≠0                                       If a key that is different from "ON" is pressed,

:Then                                                  then

:N+1→N                                            the count is updated,

:C+T→T                                             and the new total is computed,

:Disp  T                                              and displayed.

:If  0≥T                                                When you get bankrupt,

:Then                                                  then

:Disp  N                                             the number of tosses is shown,

:Stop                                                   and the game ends.

:End                                                    End of second "if."

:End                                                    End of first "if."

:End                                                    End of "while."

 

You "toss a coin" by pressing any key except "ON."  To stop the game, press

ON ENTER

N ENTER

and see the number of tosses.

 

 

Gathering the data

 

All students start with the same amount, for example, 4¢.  If a student gets bankrupt, he/she records the number of tosses in one column of a data card, and starts playing again.

After 5 minutes, the teacher gives a signal, and after that, students record their finished games in the second column of their data sheet.  After 10 minutes they start recording results in the third column. Finally, after 15 minutes they stop and record all interrupted games.

 

 

What is the average length of the games that are recorded:

1. in the first column?

2. in the first and second columns?

3. in the first, second, and third columns?

4. in all games (including those that were interrupted)?

 

What conclusions can you derive?

 

            An example of a data sheet.

 

            Column 1.      Column 2.      Column 3.      Interrupted:

            22                    424                  none               644

                                     34

 

Some theory.

           

In this game, the probability that a player eventually goes bankrupt is 100%, but the mean time until it happens is infinite.  This means that the average that is computed from samples will increase with the sample size.  Bigger samples yield bigger averages.

 

When you have some amount of capital T at a given time, the probabilities of doubling it and losing it are the same.  But for large T the expected time until it happens is very big.


Webpage Maintained by Owen Ramsey
Lesson Index