Negative binomial stopping argument (source code)

= Negative binomial stopping argument

For the $r$th success to occur after exactly $x$ failures, the final trial must be a success, while the preceding $x+r-1$ trials contain $x$ failures and $r-1$ successes. Choosing the failure locations gives the factor $\binom{x+r-1}{x}$.