Subject: | |
From: | |
Reply To: | |
Date: | Tue, 29 Feb 2000 17:46:17 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> 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?"
>
> I believe that the number of tosses (20) doesn't matter.
Sure it does:
The number of possible result sequences from 20 tosses is 2exp20 (duuh!)
Of those, 120 have 6 consecutive heads somewhere in the sequence, as
follows:
12345678901234567890
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
HHHHHH
15 sequences of exactly 6 consecutive heads
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
HHHHHHH
14 sequences of exactly 7 consecutive heads
13 sequences of exactly 8 consecutive heads
12 " " " 9 " "
11 " " " 10 " "
You get the idea. The formula is
sequences = ((t - r + 1)exp2 + (t - r + 1)) / 2
where t = # of tosses and r = consecutive run length. This is the standard
n + (n-1) + (n-2) +...+ 1 = 1/2 * (nexp2 + n)
With 120 sequences that contain 6 consecutive heads somewhere, the
probability is
120/2exp20 = 0.00011444091796875
If there were only 10 tosses, the probability would be
15/2exp10 = 0.0146484375
And, of course, the most obvious reason why the number of tosses matters: 6
tosses. The probability is 1/2exp6 = 0.015625, more than two orders of
magnitude larger than with 20 tosses.
Generally:
with t = number of tosses
r = desired run length
let n = t - r + 1
p = (nexp2 + n)/2exp(t + 1)
So, p is very definitely dependent on t (and also on r).
Steve Dirickson WestWin Consulting
[log in to unmask] (360) 598-6111
|
|
|