HP3000-L Archives

February 2000, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Tue, 29 Feb 2000 22:30:42 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (126 lines)
Jeff asks:

> My wife just took a biology test where one of the questions was:
>     "What is the probability of tossing 6 heads in a row out of 20 coin
>  tosses?"

Someone suggested that I had given an answer earlier to this question.
Unfortunately, I had to do some real work this afternoon, so I couldn't
participate.

However, I have now had the luxury of reading over the answers given so far
-- and as I read the problem, Bruce has the closest answer (in the low 20%
range), but Ted has the prettiest diagram ;-).

Why then would Ted's, Stan's and Gavin's answer only be half of Bruce's?
Don't ever let anyone tell that probability calculations are easy.
Enumerating the event state space properly is the hardest part of these kinds
of questions; indeed, I don't see how this question could have been asked on
a test. It simply requires too much thought for an hour-long test.


Jeff writes:

>  I believe that the number of tosses (20) doesn't matter.

Actually, the number of tosses does matter. We only have a limited window in
which to accomplish this task (or, in the words to song from "Smoky and the
Bandit": "We have a long way to go and a short time to get there.")
Nonetheless, the probability of throwing six heads in a row is about 23%.

To get that number, I'm presuming once the requisite six heads have been
achieved, the tosser stops. That is a critical assumption.

The probability of throwing the next six coins as heads at any point in time
is (1/2)^6, which is 1/64th. The saving grace is that in this problem, we
have several tries as the "next point in time." That is, if we begin at the
first step (the first toss), we have a 1 in 64 chance of throwing six heads
in a row, starting with the first coin toss.

However, if we should fail on the first toss to throw a head, we get a chance
to restart the sequence on the next toss, on toss 2. As probablities in a
coin toss are presumed to occur without memory and are independent of all
prior events, we get a "clean" start on toss 2, where the probability is
again 1 in 64.

If we were to estimate a gross answer by merely adding up all these potential
restarts, the probability would be 15 times 1/64th for this particular
approach, which would be equal to 0.2344. However, this approach is clearly
philosophically wrong. If we were to allow a million coin tosses, the answer
can't be 1000000/64ths, as no probability can exceed 1.

This is where Ted's diagram (slightly modifed) comes in:

 1 - HHHHHH                 1
 2 - THHHHHH                1
 3 - xTHHHHHH               1
 4 - xxTHHHHHH              1
 5 - xxxTHHHHHH             1
 6 - xxxxTHHHHHH            1
 7 - xxxxxTHHHHHH           1
 8 - xxxxxxTHHHHHH          63/64   = 0.9844
 9 - xxxxxxxTHHHHHH         125/128 = 0.9766
10 - xxxxxxxxTHHHHHH        248/256 = 0.9688
11 - xxxxxxxxxTHHHHHH       492/512 = 0.9609
12 - xxxxxxxxxxTHHHHHH           .
13 - xxxxxxxxxxxTHHHHHH          .
14 - xxxxxxxxxxxxTHHHHHH         .
15 - xxxxxxxxxxxxxTHHHHHH        .

Consider each toss to be a "state" (actually, a Markovian state), where the
probability of arrival at that state is dependent on how we got there. The
units in the right-hand column are "weights" in units of 1/64th's, which is
the probability of starting at a particular state (a particular toss count)
and throwing the next six heads in a row.

For tosses 1 through 7, the weights are all equal. The "x"'s represent "don't
cares". By the seventh toss, there has been no possibility among the don't
cares that we could have thrown six heads in a row for a reason no more
prosaic than we've only had five chances to do so.

But that isn't true for state 8. Six x's give us 64 different possibilites,
one of which is all heads, thus the chance that we could have even gotten to
this state is only 63/64th's. The one "all heads" state has to be disallowed
(subtracted out).

The same is true for state 9, but with slightly more complicated
calculations. Here, we have 7 x's to worry about, and we must insure that
there are no patterns of at least six heads in a row among those 7 x's.

There are 3 possible patterns that would have at least 6 heads in 7 x's. They
are:

      6T
      T6
      7

where the number represents the number of heads in a row. Thus, the weight
for the ninth state is 125/128th's, given that we must subtract out these
possibilities.

For the tenth state, the calculations are similar:

     6Tx * 2
     T6T * 1
     xT6 * 2
     7T
     T7
     8

yielding a weight of 248/256th's.

Similar calculations follow for each of the additional states.

What this means is that there is very little probability of reaching the
100th coin toss without somewhere along the line throwing six heads in a row
-- and there is virtually zero chance of getting to the millionth state.
Indeed, if we summed up all of these probabilities, as the state count went
to infinity, the probability of throwing six heads in a row would approach
absolute certainty (P(x) -> 1, to as many decimal places as you wish).

In this case, without going through all of the trouble of either developing a
formula or enumerating all possibilities, my estimate would be that the
probability is about 14.6/64th's, or P ~ 0.228.

Wirt Atmar

ATOM RSS1 RSS2