Coin toss problem, get exactly 2 heads in 5 tosses

The result is correct, but one of the intermediate steps is incorrect. You first write "the first $4$ tosses [do] not have $2$ heads", and then "That is, the first $4$ tosses need to contain $1$ head and $3$ tails". That's not the same thing; the second formulation is correct, whereas the first formulation would also include results with $0$ heads in the first $4$ tosses.


This really sounds like you are saying the following:

" The probability of the number X of Bernoulli trials needed to get n successes "

If that is the case we can just apply the negative binomial formula:

\begin{equation} C^{n + r -1}_{r-1} p^{r} (1-p)^{n} \end{equation}

$r$ is the number of successes and $n$ is the number of failures so $r=2, n=3$ which yields:

  • $n+r-1= 2+3 -1=4$
  • $C^{n+r-1}_{r-1} = C^{4}_{1} = 4=6$

\begin{equation} C^{4}_{1} (0.5)^{2} (0.5)^{3} \end{equation}

\begin{equation} 4(0.5)^{2} (0.5)^{3} = \frac{4}{2^{5}} = \frac{1}{8} \end{equation}

Which agrees with your answers sorry for the typos :)

Tags:

Probability