# 5 heads or 5 tails in a row on 10 toss : why this answer?

An acquaintance of mine came up with this question:

What is the probability of having 5 heads or 5 tails in a row, when tossing a fair coin 10 times.

Using this answer, I came up with this solution

$\dfrac{10 \choose 5}{2^{10}} = \dfrac{252}{1024} = \dfrac{63}{256}$.

Yet when thinking of it, I cannot explain in plain words my solution.

Can anyone help?

Update:

It should have been this instead

$\dfrac{112}{1024}$

• thanks @RobertZ, updated – Andy K Feb 9 '18 at 11:32
• What you calculated is the probability to get 5 heads in 10 tosses, but your question is "What is the probability of having 5 heads IN A ROW". This probability would be different. – Stefan Hante Feb 9 '18 at 11:39
• Do you want the probability of the 10 throws consisting of 5 heads and 5 tails in any order (e.g. HTHHHTTHTT would count)? Or do you want (at least) 5 heads to occur consecutively amongst the 10 throws? – Jaap Scherphuis Feb 9 '18 at 11:40
• I think the answer you mentioned is not for 5 heads in a row .. it is for 5 heads but not necessarily consecutive. – Kareem Metwaly Feb 9 '18 at 11:40
• hi @JaapScherphuis 5 heads to occur consecutively among 10 throws – Andy K Feb 9 '18 at 11:42

$\binom{10}{5}=\frac{10!}{5!5!}$ counts all the anagrams of the word $HHHHHTTTTT$ which has $10$ letters, $5$ $H$s and $5$ $T$s. $(1/2)^{10}$ is the probability that one of these anagrams appears after $10$ tosses.

However in your question it is asked to count the arrangements where the 5 heads or 5 tails are in a row such as $TTHHHHHTTT$ or $HHHHTTTTTH$, but also $HTHHHHHHTH$ (which is not an anagram of $HHHHHTTTTT$). So your answer is not correct.

In order to have at least $5$ heads in a row, we consider the following cases:

1) $HHHHHTXXXX$, $THHHHHTXXX$, $XTHHHHHTXX$, $XXTHHHHHTX$, $XXXTHHHHHT$, $XXXXTHHHHH$ $\implies 2^{4}+4\cdot 2^3+2^4=64$;

2) $HHHHHHTXXX$, $THHHHHHTXX$, $XTHHHHHHTX$, $XXTHHHHHHT$, $XXXTHHHHHH$ $\implies 2^{3}+3\cdot 2^2+2^3=28$;

3) $HHHHHHHTXX$, $THHHHHHHTX$, $XTHHHHHHHT$, $XXTHHHHHHH$ $\implies 2^{2}+2\cdot 2^1+2^2=12$;

4) $HHHHHHHHTX$, $THHHHHHHHT$, $XTHHHHHHHH$ $\implies 2^{1}+2^0+2^1=5$;

5) $HHHHHHHHHT$, $THHHHHHHHH$ $\implies 2^0+2^0=2$;

6) $HHHHHHHHHH$ $\implies 2^0=1$;

and the total number is $64+28+12+5+2+1=112$.

Similarly the total number of ways to have at least 5 tails in a row is $112$. For a row of $5$ heads OR $5$ tails the number of ways is $112+112-2=222$ (we subtract $2$ because otherwise $TTTTTHHHHH$ and $HHHHHTTTTT$ are counted twice).

Finally the probability of having $5$ heads or $5$ tails in a row, when tossing a fair coin $10$ times is $$\frac{222}{2^{10}}=\frac{111}{512}.$$

• ok @robert-z. so my answer is wrong then? – Andy K Feb 9 '18 at 11:41
• @Andy Yes, the answer you gave does not apply to what you've asked. – Stefan Hante Feb 9 '18 at 12:25
• @AndyK See my hint. Are you able to find the correct answer now? – Robert Z Feb 9 '18 at 12:50
• @RobertZ brilliant! Thank you! – Andy K Feb 9 '18 at 13:01
• @AndyK Of course $2^4+4\cdot 2^3+2^4=64=2^6$. The formula $2^4+4\cdot 2^3+2^4$ follows from the scheme on the left where each $X$ can be replaced with $H$ or $T$ ($2$ ways). – Robert Z Feb 9 '18 at 13:36