Answer:
A bare answer doesn't really help those of you who got the answer wrong.
Here's an explanation
Spoiler:
I don't think I can do better for a verbal explanation of why THT needs more coin tosses that THH than the one Lo Zeno provided:
Quote:
Originally Posted by Lo Zeno
Let's assume that we are now trying to get the THT sequence, and we already got one Tail and one Head (TH). Now we toss the coin, and we have 50% chances to get Tail (and complete the THT), and 50% chances to get Head, so we have to continue tossing: in case we get Head, so we DON'T finish the sequence, we'll need AT LEAST three more tosses, because the latest two results we got would be Head-Head, so in the most lucky condition we would have to get another Tail followed by another Head and another Tail.
Let's assume now that we are trying to get the THH sequence, and once again we already got one Tail and one Head (TH). Once again, we have 50% chances to get Head (thus completing the sequence), and 50% chances to get Tail (thus FAILING the sequence). But Wait! If we fail, our last toss resulted in a Tail (T), so in the most lucky condition we only would need TWO more tosses (two Heads) to complete the sequence, instead of three.
This small, unique case makes the combination THH "quicker" than the combination THT on average
|
Indeed, as ClarkNova found in his computer simulation of the problem, on average, you'll need to monitor 100 coin tosses to spot 10 THT sequences, but only 80 coin tosses to spot 10 THH sequences.
and an analysis.
Spoiler:
There is a way to work this out mathematically, but we need to introduce a little notation to make it concise.
We want a way to represent the average number of additional coin tosses to get a particular sequence of coin tosses, given that we've already seen some coin tosses. We're going to use N(sequence|previous sequence) for this.
For example, N[TH|T] is the average number of additional coin tosses we'd need to observe to see a sequence of Tails followed by Heads, after we've just seen a Tails.
Note that
N[Tsequence|previoussequenceH] = N[Tsequence|]
That is, if the sequence we're looking for starts with a Tails, and the coin tosses we've just seen ended with a Heads, the average number of additional coin tosses needed to see what we're looking for is that same as if we hadn't seen any coin tosses yet.
Also
N(sequence|sequence) = 0
That is, if we've just seen the sequence we're looking for, we don't need any more coin tosses to see the sequence.
We want to know N[THH|] (seeing Tails, Heads, Heads, without having seen any coin tosses yet) and N[THT|] (seeing Tails, Heads, Heads, without having seen any coin tosses yet).
We can write N[THH|] like this
N[THH|] = 0.5*(1 + N[THH|H]) + 0.5*(1 + N[THH|T])
That is, the average sequence length is half of one plus the average sequence length given we've seen a Heads and half of one plus the average sequence length given we've seen a Tails. Remembering that N[THH|H] = N[THH|], this simplifies to
N[THH|] = 2 + N[THH|T]
Now, we can also work out that
N[THH|T] = 0.5*(1 + N[THH|TH]) + 0.5*(1 + N[THH|TT])
simplifying again (note that N[THH|TT] = N[THH|T]) , we get
N[THH|T] = 2 + N[THH|TH]
and substituting back, we get
N[THH|] = 4 + N[THH|TH]
And similarly, we can see that
N[THH|TH] = 0.5*(1 + N[THH|THH]) + 0.5(1 + N[THH|THT])
simplifying again (note that N[THH|THT] = N[THH|T]), we get
N[THH|TH] = 1 + 0.5*N[THH|T]
and using our previous result that N[THH|T] = 2 + N[THH|TH], we find
N[THH|TH] = 4
and so
N[THH|] = 8.
Similarly for N[THT|]:
N[THT|] = 0.5*(1 + N[THT|H]) + 0.5*(1 + N[THT|T])
simplifies (as N[THT|H] = N[THT|]) to
N[THT|] = 2 + N[THT|T]
Now, we can also work out that
N[THT|T] = 0.5*(1 + N[THT|TH]) + 0.5*(1 + N[THT|TT])
simplifying again (note that N[THH|TT] = N[THH|T]) , we get
N[THT|T] = 2 + N[THT|TH]
Substituting back, we get
N[THT|] = 4 + N[THT|TH]
NB This is all identical to the reasoning for THH
And similarly, we can see that
N[THT|TH] = 0.5*(1 + N[THT|THH]) + 0.5(1 + N[THT|THT])
simplifies (noting that N[THT|THH] = N[THT] and N[THT|THT] = 0) to
N[THT|TH] = 1 + 0.5*N[THT|]
NB Here is the difference from the THH case. For THH we saw that N[THH|THT] = N[THH|T], but here we see that N[THT|THH] = N[THT|]
and using our previous result that N[THT|] = 4 + N[THT|TH], we find
N[THT|TH] = 6
and so
N[THT|] = 10.
Whew! Hopefully I haven't made too many typos in that!