For a random variable {@code X} whose values are distributed according to thisdistribution, the probability mass function is given by
{@code P(X = k) = C(k + r - 1, r - 1) * p^r * (1 - p)^k,}
where {@code r} is the number of successes, {@code p} is the probability ofsuccess, and {@code X} is the total number of failures. {@code C(n, k)} isthe binomial coefficient ( {@code n} choose {@code k}). The mean and variance of {@code X} are
{@code E(X) = (1 - p) * r / p, var(X) = (1 - p) * r / p^2.}
Finally, the cumulative distribution function is given by
{@code P(X <= k) = I(p, r, k + 1)}, where I is the regularized incomplete Beta function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|