Home
Products
Support
Blog
Resources
Company
NMath Stats User's Guide
TOC |  Previous |  Next |  Index

5.11 Negative Binomial Distribution

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

Copyright © 2008 CenterSpace Software, LLC. All rights reserved.
All trademarks and registered trademarks mentioned on this web site are the property of their respective owners.
Contact Webmaster