Class NegativeBinomialDistribution represents the discrete probability distribution of obtaining N successes in a series of x trials, where the probability of success on each trial is P.
For example, this code constructs an NegativeBinomialDistribution:
int n = 5; double p = 0.25; NegativeBinomialDistribution negBin = new NegativeBinomialDistribution( n, p );
The default constructor creates an NegativeBinomialDistribution with
and
:
BinomialDistribution negBin = new BinomialDistribution();
The provided N and P properties can be used to get and set the number of successes and the probability of success on each trial after construction:
negBin.N = 75; negBin.P = 0.02;
Once you have constructed an NegativeBinomialDistribution object, you can query it for the PDF, CDF, inverse CDF, and random variable moments, as described in Section 5.1.
TOC | Previous | Next | Index