The negative binomial distribution is an extension of the geometric distribution, and so is also related to the Bernoulli distribution. Whereas the geometric distribution results from counting the number of trials required to obtain the first success, the negative binomial is the number of trials needed to get r ≥ 1 successes. There are two formulations for the random variable; either X is the trial at which the rth success occurs, or Y is the number of failures before the rth success. As with previous distributions, we discuss the probability mass function (PMF) for both random variables. We also provide the CDFs, means, variances, and moment generating functions. We conclude with an example and R functions.