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

5.10 Binomial Distribution

Class BinomialDistribution represents the discrete probability distribution of obtaining exactly n successes in N trials where the probability of success on each trial is p. For example, this code constructs an BinomialDistribution:

int n = 20;
double p = 0.25;
BinomialDistribution bin = new BinomialDistribution( n, p );

The default constructor creates an BinomialDistribution with and :

BinomialDistribution bin = new BinomialDistribution();

The provided N and P properties can be used to get and set the number of trials and the probability of success on each trial after construction:

bin.N = 75;
bin.P = 0.02;

Once you have constructed an BinomialDistribution 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