# Experiment with negative binomial distribution

Suppose I toss a coin with $$0.25$$ chance of $$H$$. I toss it until I get $$k+1$$ times heads. What is the probability that I will have to toss the coin $$4k$$ times?

The last throw must be an $$H$$ so I have $$4k-1$$ options to choose $$k-1$$ throws where I get $$H$$. So $$\ {\ 4k-1 \choose k-1 }\cdot 0.75^{3k-1} \cdot 0.25 ^{k}$$

But I'm wrong about something here as the answer is $$\ {\ 4k-1 \choose k } \cdot 0.75^{3k-1} \cdot 0.25^{k+1}$$

I know I can just plug the variables into negative binomial formula but still I don't understand what am I missing here? what I need $$\ 0.25^{k+1}$$ successes? and why I need to chose $$\ k$$ places instead of $$\ k-1$$ places as I know the last throw must be $$H$$ ??

Thanks!

• You are almost correct. Note that in total $k+1$ heads (successes) are needed (not $k$): exactly $k$ in the first $4k-1$ throws and $1$ at the $4k$-th throw. – drhab Dec 6 '18 at 15:11

If you need $$k+1$$ heads overall then you must succeed $$k$$ times from the first $$4k-1$$ throws - if you throw $$k-1$$ heads in the first $$4k-1$$ and then another head then that is only $$k$$ heads overall. The probability that you succeed $$k$$ times in the first $$4k-1$$ throws is
$$P(\textrm{there are } k \textrm{ heads out of the first } 4k-1 \textrm{ throws})= p = \binom{4k-1}{k}\cdot 0.75^{3k-1} \cdot 0.25^{k}$$
Now, the probability that it takes you $$4k$$ throws to succeed $$k+1$$ times is the probability that you throw $$k$$ heads in the first $$4k-1$$ throws times the probability the last throw is a head (which is 0.25). So
$$P(\textrm{it takes 4k throws to see } k+1 \textrm{ heads}) = 0.25p = \binom{4k-1}{k}\cdot 0.75^{3k-1} \cdot 0.25^{k+1}$$
Since your last throw results in a head and you need a total of $$k+1$$ heads, you have $$4k-1$$ throws to get the rest of $$k$$ heads.