Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Waltzing Matilda (was: statistics, 10 events tell us what ?

Author: Dan Homan

Date: 03:09:24 08/17/98

Go up one level in this thread


On August 14, 1998 at 21:48:40, fca wrote:

>Just fill in the blanks for me. It gets better as it goes along. All are of
>course "answerable".  And all are welcome to reply.  Dan, Bruce and Dann
>especially.

Ok, I'll bite.  There is probably a catch here somewhere. :)

>
>(a) In 1048576 trials (each of 20 throws) the probability of one or more "20 in
>a row"s occurring is ________ .

Assuming that we don't care whether it is 20 in a row of heads or 20 in a row
of tails, then the probability of a single trial giving "20 in a row" is the
sum of "20 in a row of heads" and "20 in a row of tails"  this is

P("20 in a row") = 2 x (1/2)^20;

and the probability of not getting 20 in a row (in a single trial) is just 1
minus this

P(not "20 in a row") = 1 - 2 x (1/2)^20;

The probability of one or more of N trials giving "20 in a row" is just 1 minus
the probability that none of the N trials give "20 in a row", which is

P(1 or more "20 in a row" in N trials) = 1 - (1 - 2 x (1/2)^20)^N

If N = 1048576,  P(1 or more "20 in a row") = 0.865
if we don't care whether the "20 in a row" is of tails or heads.

(Note, if we want just "20 in a row of heads", P = 0.632)

>
>(b) In order for there to be at least a 99.9% probability of getting at least
>one "20 in a row", the minimum number of such trials that can be a priori
>expected to be needed is _______________ .
>

Just reverse the above equation.

N = log (0.001) / log (1 - 2 x (1/2)^20)  = 3621650 trials, again if we
don't care whether the "20 in a row" is of tails or heads"


>(c) In 1048576 such trials, where exactly 4 "20 in a row"s were observed, there
>is a _______ % chance that this result does not contradict the "fair coin"
>hypothesis.

 P(4 "20 in a rows" in N trials) =
      (N!/(4!(N-4)!)) x (2 x (1/2)^10)^4 x (1 - 2 x (1/2)^20)^(N-4)

Again, assuming we don't care whether the "20 in a row" is of tails or heads.

I will leave the above as an exercise to the reader, if N = 1048576.  :)

>
>(d) "20 in a row" has been just been thrown for the first time in the
>experiment.  The best guess of the trial number on which this happened is
>_____________ .
>

It is, of course, equally likely to happen on any of the trials, but the
expected number of trials should be something like....

N = 1/(2 x (1/2)^20) = 524384

Again, assuming that we don't care where the "20 in a row" is of tails or
heads.  Note that the above expression is slightly incorrect, the denomentator
should also include the chance of not having 20 in a row - but this
is very close to 1.

 - Dan

P.S. If you want the results for just "20 heads in a row", simply change
the 2 x (1/2)^20 is all of the above expressions to (1/2)^20.



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.