# Negative Binomial

$r \geq 2$

$X - \text{\# of trials until the rth success}$

$x \in \mathbb{Z}^+$

$x \in \{r, ~r+1, ~r+2, \cdots\}$

$P(X=x) = {{x-1} \choose {r-1}} p^{r-1} (1-p)^{x-r} p$

Where ${{x-1} \choose {r-1}} p^{r-1} (1-p)^{x-r}$ is the $r-1$ successes out of x-1 trials, and $p$ is the $x$th trial of $r$th success.