Negative Binomial
The number of failures before the rth success in a sequence of independent Bernoulli trials with probability p of success on each trial. The range of this random variable is {0, 1, 2, ....}
Parameters
The success probability, must be in range (0,1)
The desired number of successes
an optional name/label
Properties
the desired number of successes to wait for
the probability of failure, 1-p
the probability of success, p
indicates whether pmf and cdf calculations are done by recursive (iterative) algorithm based on logarithms or via beta incomplete function and binomial coefficients.
Functions
Computes the first order loss function for the function for given value of x, G1(x) = Emax(X-x,0)
Gets the parameters as an array parameters0 is probability of success parameters1 is number of desired successes
Sets the parameters as an array parameters0 is probability of success parameters1 is number of desired successes
Promises to return a random variable that uses the supplied stream number using the supplied stream provider
Computes the 2nd order loss function for the distribution function for given value of x, G2(x) = (1/2)Emax(X-x,0)*max(X-x-1,0)