Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

A coin having probability $p$ of coming up heads is successively flipped until the $r^{th}$ head appears. Let $X$ be the number of flips required. Find the probability $P(X=n)$.

So this means I need to find the probability that $n$ flips are needed to get the $r^{th}$ head. I am not sure how to proceed. Any help/clarification please?

Thank you.

share|improve this question

2 Answers 2

If $n$ flips are required to get $r$ heads, it means in $n-1$ flips you already have $r-1$ heads and the $n^{th}$ flip is a head. Assuming successive flips are independent,

$P(X=n)=P(r-1 \text{ heads in } n-1 \text{ flips})*p$

$P(X=n)=\binom{n-1}{r-1}p^{r-1}{(1-p)}^{n-r}*p$

share|improve this answer

I'm quite sure this question involves some sort of distribution. You might want to search about the Negative Binomial distribution. Given the probability of a success $p$, calculate the number of times, $n$, you will need to achieve $r$ successes.

I will shamelessly copy the equation from Shyam

$$P(X=n)=\binom{n-1}{r-1}p^{r-1}{(1-p)}^{n-r}\times p$$

There are 3 parts to this equation (RHS), namely:

  • Basically, the $\binom{n-1}{r-1}$ means there are these number of ways where you can select $r-1$ successes, out of $n-1$ tries.
  • The next part, $p^{r-1}{(1-p)}^{n-r}$ means, assuming the event of success is independent, once again, $r-1$ successes and $n-r$ failures. Consider that $(n-r) + (r-1) = (n-1)$, which is the total number of tries so far.
  • Multiply that with $p$, which is the probability of the last success, and you get your answer.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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