Binomial |
public class BinomialDistribution : ProbabilityDistribution
The BinomialDistribution type exposes the following members.
| Name | Description | |
|---|---|---|
| BinomialDistribution(Double, Int32) | Initializes a new instance of the BinomialDistribution class. | |
| BinomialDistribution(Double, Int32, RandomGenerator) | Initializes a new instance of the BinomialDistribution class. |
| Name | Description | |
|---|---|---|
| Generator | Returns the random generator used by the distribution to generate the random values. (Inherited from ProbabilityDistribution) | |
| Num | Gets the number of trials. | |
| Prob | Gets the probability of success. |
| Name | Description | |
|---|---|---|
| CDF(Double) |
Gives the cumulative probability at x.
(Overrides ProbabilityDistributionCDF(Double)) | |
| CDF(Double, Double, Int32) | Returns the cumulative distribution function for the specified value, probability, and trial count. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| Initialize | Initializes the parameters for the binomial distribution. | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| NextDouble |
Generates a random value distributed according to the distribution.
(Overrides ProbabilityDistributionNextDouble) | |
| PDF(Double) |
Gives the probability density at x.
(Overrides ProbabilityDistributionPDF(Double)) | |
| PDF(Double, Double, Int32) | Returns the probability density function for the specified value, probability, and trial count. | |
| Quantile |
Gives the pth quantile of the distribution.
(Overrides ProbabilityDistributionQuantile(Double)) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| Name | Description | |
|---|---|---|
| en | Cached floating-point parameters used by the distribution implementation. | |
| en1 | Cached floating-point parameters used by the distribution implementation. | |
| gamen1 | Cached floating-point parameters used by the distribution implementation. | |
| generator | Pointer to generator. (Inherited from ProbabilityDistribution) | |
| n | Cached number of trials. | |
| np | Cached floating-point parameters used by the distribution implementation. | |
| npexp | Cached floating-point parameters used by the distribution implementation. | |
| p | Cached floating-point parameters used by the distribution implementation. | |
| pc | Cached floating-point parameters used by the distribution implementation. | |
| pclog | Cached floating-point parameters used by the distribution implementation. | |
| plog | Cached floating-point parameters used by the distribution implementation. | |
| scale | Cached floating-point parameters used by the distribution implementation. | |
| scalepi | Cached floating-point parameters used by the distribution implementation. | |
| sq | Cached floating-point parameters used by the distribution implementation. | |
| sym | Cached flag indicating whether the symmetric variant is used. |
Returns a binomial distributed deviate (integer returned in a double)
according to the distribution:
j+eps / n \ j n-j
integral p (m) dm = | | q (1-q)
j-eps n,q \ j /
References:
D. E. Knuth: The Art of Computer Programming, Vol. 2, Seminumerical
Algorithms, pp. 120, 2nd edition, 1981.
//
W. H. Press, B. P. Flannery, S. A. Teukolsky, W. T. Vetterling,
Numerical Recipes in C, Cambridge Univ. Press, 1988.