What is more likely? Part 2

A fair coin is flipped repeatedly. Which event is more likely to occur first?

Event A: HHH appears.
Event B: TTHH appears.

Warning: This is hard.

Equally likely Event B Event A

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Ivan Koswara
Mar 12, 2015

First, some intuition: Observe when the first time Event A happens, and assume it occurs earlier than Event B. Then before the three heads, there should be a tails (otherwise it's not the earliest occurrence), and before that there should be a heads (otherwise Event B would have occurred one toss ago). Thus Event A is actually HTHHH instead of only HHH! This should be suspicious enough that "Event B" now suddenly looks very probable as the answer. (In fact I answered this by using only this intuition, before making the rigorous solution below.)


We use Markov chain to denote the possible states of the past few coin tosses. For the states, we will give an ordered pair ( a , b ) (a,b) where 1 a 3 , 1 b 4 1 \le a \le 3, 1 \le b \le 4 , indicating that this state is a a steps away from reaching Event A and b b steps away from reaching Event B. Of course, some of the ordered pairs are impossible; for example, ( 3 , 1 ) (3,1) is impossible, as 3 3 steps away from Event A implies that the last toss was a tails (no heads to build the streak of three), while 1 1 step away away from Event B implies that the last toss was a heads (since only one more heads for T T H H TTHH to happen). In addition to these, we also have the states A , B A, B , indicating that Event A or B respectively has occurred earlier than the other.

First, the ordered pairs.

Rows b b , columns a a 1 1 2 2 3 3
1 1 Impossible; second-last toss was heads (one step from A) and tails (one step from B) Possible, last few tosses were T T H TTH Impossible; last toss was tails (three steps from A) and heads (one step from B)
2 2 Impossible; last toss was heads (one step from A) and tails (two steps from B) Impossible; last toss was heads (two steps from A) and tails (two steps from B) Possible, last few tosses were T T TT
3 3 Impossible; last toss was heads (one step from A) and tails (two steps from B) Impossible; last toss was heads (two steps from A) and tails (two steps from B) Possible, last few tosses were H T HT
4 4 Possible, last few tosses were H T H H HTHH Possible, last few tosses were H T H HTH Possible, this is the first toss (no previous toss)

Thus the valid states are ( 2 , 1 ) , ( 3 , 2 ) , ( 3 , 3 ) , ( 1 , 4 ) , ( 2 , 4 ) , ( 3 , 4 ) (2,1), (3,2), (3,3), (1,4), (2,4), (3,4) , along with A , B A, B .

Then, state transitions:

  • ( 3 , 4 ) (3,4) transitions to ( 2 , 4 ) (2,4) on heads or ( 3 , 3 ) (3,3) on tails.
  • ( 2 , 4 ) (2,4) transitions to ( 1 , 4 ) (1,4) on heads or ( 3 , 3 ) (3,3) on tails.
  • ( 1 , 4 ) (1,4) transitions to A A on heads or ( 3 , 3 ) (3,3) on tails.
  • ( 3 , 3 ) (3,3) transitions to ( 2 , 4 ) (2,4) on heads or ( 3 , 2 ) (3,2) on tails.
  • ( 3 , 2 ) (3,2) transitions to ( 2 , 1 ) (2,1) on heads or ( 3 , 2 ) (3,2) on tails.
  • ( 2 , 1 ) (2,1) transitions to B B on heads or ( 3 , 3 ) (3,3) on tails.
  • A A always stays in A A .
  • B B always stays in B B .

In the following diagram, a red arrow is a transition on heads and an orange arrow is a transition on tails. A A and B B don't have arrows; once the game goes to either state, it will stay there forever.


We can use intuition again here. Note how many arrows lead to the chain leading to B B , while only ( 3 , 3 ) ( 2 , 4 ) (3,3) \to (2,4) leads to the chain to A A , so this further strengthens the possibility that "Event B" is the correct answer. But still, we'll proceed further.


Let P ( E X ) P(E|X) be the probability that some event E E occurs (usually "arrive to a given state"), given that we are currently in state X X . Suppose S S is a state, and it can transition to S 1 , S 2 , S_1, S_2, \ldots with w 1 , w 2 , w_1, w_2, \ldots probability respectively. Then P ( E S ) = w i P ( E S i ) P(E|S) = \sum w_i P(E|S_i) .

Now let E = A E=A , the probability that Event A occurs before B; that is, the probability that we arrive in state A A . Then P ( A A ) = 1 , P ( A B ) = 0 P(A|A) = 1, P(A|B) = 0 . For the rest, we have a system of six linear equations in six variables, which technically is solvable...

Let P ( A ( 3 , 4 ) ) = a , P ( A ( 2 , 4 ) ) = b , P ( A ( 1 , 4 ) ) = c P(A|(3,4)) = a, P(A|(2,4)) = b, P(A|(1,4)) = c , P ( A ( 3 , 3 ) ) = d , P ( A ( 3 , 2 ) ) = e , P ( A ( 2 , 1 ) ) = f P(A|(3,3)) = d, P(A|(3,2)) = e, P(A|(2,1)) = f as shown in the diagram above. Then,

{ a = 1 2 b + 1 2 d b = 1 2 c + 1 2 d c = 1 2 1 + 1 2 d d = 1 2 b + 1 2 e e = 1 2 e + 1 2 f f = 1 2 d + 1 2 0 \begin{cases} a = \frac{1}{2} b + \frac{1}{2} d \\ b = \frac{1}{2} c + \frac{1}{2} d \\ c = \frac{1}{2} \cdot 1 + \frac{1}{2} d \\ d = \frac{1}{2} b + \frac{1}{2} e \\ e = \frac{1}{2} e + \frac{1}{2} f \\ f = \frac{1}{2} d + \frac{1}{2} \cdot 0 \\ \end{cases}

Fifth equation implies e = f e=f . Fourth and sixth equations, together with that, imply 3 4 d = 1 2 b \frac{3}{4} d = \frac{1}{2} b .

Second and third equations imply b = 1 4 + 3 4 d b = \frac{1}{4} + \frac{3}{4} d . Combining with above gives b = 1 4 + 1 2 b b = \frac{1}{4} + \frac{1}{2} b , or b = 1 2 b = \frac{1}{2} , so d = 1 3 d = \frac{1}{3} . Thus first equation gives P ( A ( 3 , 4 ) ) = a = 5 12 P(A|(3,4)) = a = \frac{5}{12} .

Similarly, we can compute P ( B ( 3 , 4 ) ) = 7 12 P(B|(3,4)) = \frac{7}{12} as well. This shows that Event B is more likely , with probability of 7 12 \frac{7}{12} over Event A's 5 12 \frac{5}{12} .

Thanks for a great writeup!!

I would like to point out what the difference / mistake that many people would make it.

If the question is "Which event is more likely to occur", then the answer is A.
However, the question is actually "Which event is more likely to occur first in this sequence", which may sound like "which event is more likely to occur", but actually is not.

What we have here with events A and B, is that while B is much less likely than A to occur given a fixed sequence length, it is also more likely than A to occur first. This is (partly) due to the positive correlation in event A, and the negative correlation in event B. What that means, is that if event A occurs, then it would occur more times, hence is more likely to occur. However, if event A doesn't occur, then it would take a while before it occurs, and hence it is less likely to occur first.

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

Shouldn't this be a level 5 problem?

Krishna Sharma - 6 years, 3 months ago

Log in to reply

Because it is MCQ, it becomes easier for people to make a guess at what the answer is. With the "Warning: This is hard", some people would second guess themselves and choose B instead of the "obvious" A.

Calvin Lin Staff - 6 years, 3 months ago
Bill Bell
Apr 3, 2015

Since the difference in probabilities is not at all subtle it's easy to check with a Monte-Carlo experiment.

Great! Monte Carlo simulations can help us estimate the actual probabilities.

Calvin Lin Staff - 6 years, 2 months ago

Let head is a sucess event with P= 0.5 In 1st case probability of happening = 3C3 (0.5)^3 =0.125 In 2nd case probability = 4C2 (0.5)^4=0.375

No, the probability of the 2nd case happening in 4 coin tosses is 1 16 \frac{1}{16} . It is not that we have "2 heads 2 tails in 4 coin tosses". It has to be the sequence "TTHH".

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

It must also contains 4C2 in 2nd case

Rishabh Deep Singh - 6 years, 3 months ago

Log in to reply

No, the probability of getting exactly the sequence TTHH on 4 coin tosses is 1 2 × 1 2 × 1 2 × 1 2 \frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} .

The probability of getting "2 heads 2 tails" on 4 coin tosses is ( 4 2 ) × 1 2 × 1 2 × 1 2 × 1 2 { 4 \choose 2 } \times \frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} .

Calvin Lin Staff - 6 years, 3 months ago

First we assume that the coin is fair, that is, the probabilities of heads and tails appearing is 0.5 apiece. Since the probability of each outcome is equal, we simply look at the number of tosses required to obtain each event in the problem.

Now imagine that we simultaneously toss two coins A and B repeatedly, producing the corresponding events in the problem. By the third toss of each coin, Event A will already have occurred in Coin A, while Coin B needs one more toss for Event B to occur.

Simply put, Event A will happen first because it is "shorter" than Event B.

Ooops, sorry, I had the wrong answer in.

See part one for an explanation of why your logic is false, and how one should approach this problem.

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

OK Sir, I'm on it. Thanks for the correction. (And I thought it was that simple.) :)

Francis Gerard Magtibay - 6 years, 3 months ago

This reminds me of Penney's Game

Mursalin Habib - 6 years, 3 months ago

Log in to reply

Yes, they are related. For example, if player 1 chooses HHH, then if player 2 chooses THH, the odds for player 2 are almost 7:1! Adding an extra T at the start bring it down to 1.4 : 1, which is a surprising result to those who don't know how to interpret it.

Calvin Lin Staff - 6 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...