see r successes is . Thus, the expected number of failures would be this value, minus the successes: Expectation of Successes The expected total number of failures in a negative binomial distribution with parameters is r(1 − p)/p. To see this, imagine an experiment simulating the negative binomial is performed many times. That is, a set of trials is performed until successes are obtained, then another set of trials, and then another etc. Write down the number of trials performed in each experiment: and set . Now we would expect about successes in total. Say the experiment was performed times. Then there are successes in total. So we would expect , so . See that is just the average number of trials per experiment. That is what we mean by "expectation". The average number of failures per experiment is . This agrees with the mean given in the box on the right-hand side of this page. A rigorous derivation can be done by representing the negative binomial distribution as the sum of waiting times. Let with the convention represents the number of failures observed before successes with the probability of success being . And let where represents the number of failures before seeing a success. We can think of as the waiting time (number of failures) between the th and th success. Thus The mean is which follows from the fact . Variance When counting the number of failures before the r-th success, the variance is r(1 - p)/p2. When counting the number of successes before the r-th failure, as in alternative formulation (3) above, the variance is rp/(1 − p)2. Relation to the binomial theorem Suppose Y is a random variable with a binomial distribution with parameters n and p. Assume p + q = 1, with p, q ≥ 0, then Using Newton's binomial theorem, this can equally be written as: in which the upper bound of summation is infinite. In this case, the binomial coefficient is defined when n is a real number, instead of just a positive integer. But in our case of the binomial distribution it is zero when k > n. We can then say, for example Now suppose r > 0 and we use a negative exponent: Then all of the terms are positive, and the term is just the probability that the number of failures before the rth success is equal to