-
First, write down the outcome of a series of 100 imaginary coin flips. H for heads
and T for tails. Be sure to come up
with the imaginary coin flips yourself! When you've finished
your 100 'coin flips' and have a series of 100 letters, read
the story below.
While walking in the woods, a statistician named Goldilocks
wanders into a cottage and discovers three bears. The bears,
being hungry, threaten to eat the young lady, but Goldilocks
begs them to give her a chance to win her freedom.
The bears agree. While Mama Bear and Papa Bear block Goldilocks'
view, Baby Bear tosses a coin 30 times and records the results.
He then makes up two other (fake) sequences of heads and tails,
and gives Goldilocks a piece of paper that shows all three
sequences. Papa Bear growls, "If you can determine which
sequence came from the real coin toss, we will let you go.
Otherwise we will eat you for dinner, for I have grown tired of
porridge."
Here are the three sequences of heads (H) and tails (T) that the
bears present to Goldilocks. Each of the sequences contain 16
heads and 14 tails.
H H H H H H H H H H H H H H H H T T T T T T T T T T T T
T T
H T H T H T H T H T H T H T H T H T H T H T H T H T H T
H H
H T T H
H H T T T T T T T H H H T H T H H H T H H H T H T H
Goldilocks studies the three sequences and tells Papa Bear:
"The first sequence is "too hot." It contains 16 heads followed
by 14 tails. I would not expect such long sequences of heads and
tails. Similarly, the second sequence is "too cold." It
alternates between heads and tails like clockwork. The third
sequence is "just right." It matches my intuitive notion of a
random sequence of two categories: many short subsequences
interlaced with a few longer subsequences. I think that the
third sequence is real."
She had chosen correctly. The three bears, impressed by her
statistical knowledge, set Goldilocks free and—once
again—reluctantly ate porridge for dinner.
. . .
You can quantify Goldilocks' intuitive notions by defining a run
as a sequence of consecutive trials that result in the same
value. The first sequence has two runs: a run of heads followed
by a run of tails. The second sequence has 29 runs. The third
sequence has 15 runs: eight runs of heads and seven runs of
tails.
It turns out that you can calculate the expected number of runs
in a random sequence that has n heads and m tails. The expected
number of runs is E(R) = 2nm / ((n+m) + 1). The three sequences
have n = 16 heads and m = 14 tails, so the expected number of
runs is 15.9. So Goldilocks' intuition was correct: the first
sequence does not have enough runs, whereas the second has too
many. The third sequence has 15 runs, which is close to the
expected value.
(Original story
available at:
https://blogs.sas.com/content/iml/2013/10/09/how-to-tell-if-a-sequence-is-random.html)
|