Geometric Distribution Constructor
Definition
Namespace: Extreme.Statistics.Distributions
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Geometric | Constructs a new GeometricDistribution with the specified probability of success. The distribution uses the default random number generator to generate samples. |
Geometric | Estimates the parameter of the distribution of a variable assuming it follows a geometric distribution. |
GeometricDistribution(Double)
Constructs a new GeometricDistribution with the specified
probability of success. The distribution uses the
default random number generator to generate samples.
public GeometricDistribution(
double probabilityOfSuccess
)
Parameters
- probabilityOfSuccess Double
- The probability of a trial resulting in success.
Exceptions
ArgumentOutOfRangeException | probabilityOfSuccess is less than zero or greater than 1. |
GeometricDistribution(Vector<Double>)
Estimates the parameter of the distribution of a variable assuming it follows a geometric distribution.
public GeometricDistribution(
Vector<double> variable
)
Parameters
- variable Vector<Double>
- A vector.
Return Value
The GeometricDistribution that best matches the distribution of variable.Remarks
Use this constructor to create a GeometricDistribution whose parameter is estimated from variable.
Exceptions
ArgumentNullException | variable is null. |
ArgumentException | The mean of variable is less than zero. Samples from a geometric distribution cannot be negative. |