TikTok Challenge
Optiver
In a TikTok challenge, participants must flip a coin exactly six times and achieve exactly three heads in a row (no more, no less) somewhere in their sequence. What's the probability of success?
Answer
Any sequence of results is equally likely, so we can just count the configurations where exactly 3H appear in a row. The 3H sequence can start at 1st flip, 2nd flip, 3rd or 4th flip (after 5th there's no more flips left for a 3 coin sequence). If the 3H sequence starts at 1st flip, we must have $HHHT\_ \_$ - T must follow 3H since otherwise we'd have 4H sequence, and the last 2 flips can be H or T, so 4 possibilities in total. Same applies if our 3H starts at 4th flip since we have $\_ \_THHH$ - first two can be either H or T, giving 4 possible confiugrations. Now in the cases where 3H starts on 2nd or 3rd flip, we need the 3H sequence to be bound by Ts to avoid having longer than 3H sequences. So we must have $THHHT\_$ or $\_THHHT$, with 2 choices for the outstanding one. Summing the configurations: 4 if 3H starts on 1st flip, 2 if it starts on 2nd flip, 2 if it starts on 3rd and 4 if it starts on 4th flip. 12 in total. How many total possible confiugrations are there? well H or T for each of the 6 flips, so $2^6 = 64$. The probability of success is then $\frac{12}{64}$ or $\frac{3}{16}$.