Suppose we toss a fair coin until we get exactly 2 heads. What is the probability that exactly 5 tosses are required?

My try: We have to make sure that the first 4 tosses does not have 2 heads and the last toss must be a head. That is, the first 4 tosses need to contain 1 head and 3 tails. The probability of this event is $\frac{4}{2^4}=1/4$. Then the probability of 5th toss is head is $1/2$. Hence, in the end the answer is $\frac{1}{4}\cdot\frac{1}{2}=\frac{1}{8}$.

Am I correct?

  • 1
    $\begingroup$ Is your question what is the probability that the third head is obtained on the fifth toss? $\endgroup$ – N. F. Taussig Sep 3 '15 at 12:12
  • $\begingroup$ @N.F.Taussig Sorry a typo. Corrected! $\endgroup$ – spatially Sep 3 '15 at 12:13

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 :)

  • $\begingroup$ So my answer is wrong? $\endgroup$ – spatially Sep 3 '15 at 12:42
  • $\begingroup$ @Jerryoverone: No, this answer is wrong. The number of successes is $r=3$, the number of failures is $n=2$; if you plug in those numbers, you get $1/8$ as in your correct solution. More generally, I wouldn't trust an answer that derives a result contradicting yours but doesn't explain the discrepancy. $\endgroup$ – joriki Sep 3 '15 at 12:45
  • $\begingroup$ The answer is still wrong after the edit; please see my comment above. $\endgroup$ – joriki Sep 3 '15 at 13:07
  • $\begingroup$ your comment above does not clarify where the answer goes wrong and I disagree the number of succeses is 2. Explicitly speaking the number of succeses is 2 which is the number of times it lands head and the number of failures is 3 being the number of times it does not land head. The mistake was in in $C^{n+r-1}_{r}$ corrected to $C^{n+r-1}_{r-1}$ reference. $\endgroup$ – Francisco Vargas Sep 3 '15 at 13:15
  • $\begingroup$ It depends on what you call a success and a failure. Your previous formula would have been correct with successes and failures swapped, but changing the formula also solved the problem. $\endgroup$ – joriki Sep 3 '15 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.