k + r - 1, r - 1) * p^r * (1 - p)^k,</code><br/>
 where <code>r</code> is the number of successes, <code>p</code> is the probability of
 success, and <code>X</code> is the total number of failures. <code>C(n, k)</code> is
 the binomial coefficient (<code>n</code> choose <code>k</code>). The mean and variance
 of <code>X</code> are<br/>
 <code>E(X) = (1 - p) * r / p, var(X) = (1 - p) * r / p^2.</code><br/>
 Finally, the cumulative distribution function is given by<br/>
 <code>P(X &lt;= k) = I(p, r, k + 1)</c