Tossing the coin problem: We toss symmetrical coin $10$ times. Calculate probability of tails appearing at least five times in a row.

This is easier than it looks! There are six mutually exclusive cases:

  1. First five throws are Tails: probability = $\frac{1}{32}$
  2. First throw is a Head, and next five throws are Tails: probability = $\frac{1}{64}$
  3. Second throw is a Head, and next five throws are Tails: probability = $\frac{1}{64}$
  4. Third throw is a Head, and next five throws are Tails: probability = $\frac{1}{64}$
  5. Fourth throw is a Head, and next five throws are Tails: probability = $\frac{1}{64}$
  6. Fifth throw is a Head, and next five throws are Tails: probability = $\frac{1}{64}$

So the total probability is $\frac{7}{64} = 0.109375$.

Note that this method doesn't work if there are more than ten throws, because then you have to guard against double counting (e.g. T T T T T H T T T T T).


It may be easier to find the probability that a sequence of five tails does not occur.

There are $2^{10}$ possible sequences of coin tosses, all of which we assume are equally likely. We would like to count the number of sequences which does not contain a sequence of five tails in a row.

One way to do this is with a set of recursive equations. Define $a_i(n)$ to be the number of sequences of $n$ coin tosses which do not contain a run of five tails and which end in $i$ tails, for $i=0,1,2,3,4$. Clearly $a_0(1) = a_1(1) = 1$ and $a_i(1) = 0$ for $i=2,3,4$. Any sequence of $n$ tosses followed by a head results in a sequence of $n+1$ tosses ending in zero tails; so $$a_0(n+1) = a_0(n) + a_1(n) + a_2(n) + a_3(n) + a_4(n) $$ for $n > 1$. The only way to get $n+1$ tosses ending in a sequence of $i$ tails for $i > 0$ is to start with a sequence of $n$ tosses ending in $i-1$ tails and then get a tail on the $(n+1)$th toss; so $$a_i(n+1) = a_{i-1}(n)$$ for $i=1,2,3,4$ and $n>1$.

Using these equations and the given initial conditions, we can calculate $a_i(n)$ for $0 \le i \le 4$ and $n$ as large as we want. (It's easy to do on a spreadsheet; see below.) The total number of sequences of length $n$ not containing any run of five tails is then $\sum_{i=0}^4 a_i(n)$, and the probability of such a sequence is $$\frac{\sum_{i=0}^4 a_i(n)}{2^n}$$ We are interested in the case $n=10$. By calculation, we find $\sum_{i=0}^4 a_i(10) = 912$, so the probability that a sequence of $10$ coin tosses does not include a sequence of five tails is $912/2^{10}$. The answer to the original question, the probability that a sequence of $10$ tosses contains at least one sequence of five tails, is $$\boxed{1-\frac{912}{2^{10}}}$$


In case it's not clear how to calculate the $a_i(n)$ values, here are the first few rows of my spreadsheet, containing $a_i(n)$ for $0 \le i \le 4$ and $1 \le n \le 5$, just to get you started. The first row is for $n=1$, the second for $n=2$, etc. Not shown are the spreadsheet formulas which perform the calculations. $$\begin{matrix} 1 &1 &0 &0 &0\\ 2 &1 &1 &0 &0\\ 4 &2 &1 &1 &0\\ 8 &4 &2 &1 &1\\ 16 &8 &4 &2 &1\\ \end{matrix}$$