1
$\begingroup$

I'm faced with the following problem:

Let $X$ be the number of times that we need to toss a coin until $r$ heads are obtained. Find the distribution and the expectation of $X$, if the probability of the coin landing heads is $p$.

I tried doing it this way:

If we require $n$ tosses to get $r$ heads, then in the first $n-1$ tosses we had $r-1$ heads and $n-r$ tails and the $n$th toss was heads. $$P(X=n) = \binom{n-1}{r-1} \cdot(1-p)^{n-r} \cdot p^{r-1} \cdot p$$

Is this a geometric distribution or some extension? I am sure I can wrangle that formula to give me the expectation after a lot of manipulation, but I was wondering if there was a way to massage it into a known expectation.

$\endgroup$

2 Answers 2

1
$\begingroup$

Your formula looks right. This is the negative binomial distribution (shifted by adding $r$, since you are counting the total number of tosses rather than the number of tails).

An easy way to get the expectation is that you are tossing coins until you get one head, and repeating $r$ times, so the expectation is just $r$ times that for one head (which is a geometric distribution).

$\endgroup$
2
  • $\begingroup$ I wondered about that if I could just multiply the expectations by r, but wasn't sure about independence $\endgroup$ Commented Apr 24, 2018 at 16:22
  • $\begingroup$ @user1775614 they are independent (the number of tails between the first and second heads is independent of the number before the first head), but that's not actually important as $E(X+Y)=E(X)+E(Y)$ even if $X$ and $Y$ are dependent. $\endgroup$ Commented Apr 24, 2018 at 20:25
0
$\begingroup$

Geometric distribution usually applies to the first successful outcome. How many coin tosses before getting a tails for instance.

If you apply this to multiple outcomes, say the probability of getting 5 heads in 5 tosses of a coin, then 6 tosses, then 7 etc, that distribution isn't geometric (a probability isn't generated by a common ratio of the previous).

As expectation is a factor of probability, I don't see how that would work as a geometric distribution either.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .