numbers. Definitions Imagine a sequence of independent Bernoulli trials: each trial has two potential outcomes called "success" and "failure." In each trial the probability of success is and of failure is . We observe this sequence until a predefined number of successes occurs. Then the random number of observed failures, , follows the negative binomial (or Pascal) distribution: Probability mass function The probability mass function of the negative binomial distribution is where r is the number of successes, k is the number of failures, and p is the probability of success on each trial. Here, the quantity in parentheses is the binomial coefficient, and is equal to There are k failures chosen from k + r − 1 trials rather than k + r because the last of the k + r trials is by definition a success. This quantity can alternatively be written in the following manner, explaining the name "negative binomial": Note that by the last expression and the binomial series, for every and , hence the terms of the probability mass function indeed add up to one as below. To understand the above definition of the probability mass function, note that the probability for every specific sequence of r successes and k failures is , because the outcomes of the k + r trials are supposed to happen independently. Since the rth success always comes last, it remains to choose the k trials with failures out of the remaining k + r − 1 trials. The above binomial coefficient, due to its combinatorial interpretation, gives precisely the number of all these sequences of length k + r − 1. Cumulative distribution function The cumulative distribution function can be expressed in terms of the regularized incomplete beta function: (This formula is using the same parameterization as in the article's table, with r the number of successes, and with the mean.) It can also be expressed in terms of the cumulative distribution function of the binomial distribution: Alternative formulations Some sources may define the negative binomial distribution slightly differently from the primary one here. The most common variations are where the random variable X is counting different things. These variations can be seen in the table here: Each of these definitions of the negative binomial distribution can be expressed in slightly different but equivalent ways. The first alternative formulation is simply an equivalent form of the binomial coefficient, that