Constructs a BinomialDistribution instance with the given number of
trials, and the given probability of success on each trial.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public BinomialDistribution( int n, double p ) |
| Visual Basic (Declaration) |
|---|
Public Sub New ( _ n As Integer, _ p As Double _ ) |
| Visual C++ |
|---|
public: BinomialDistribution( int n, double p ) |
Parameters
- n
- Type: System..::.Int32
The total number of trials.
- p
- Type: System..::.Double
The probability of success on each trial.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if the number of trials is <0, or the probability of success is <0.0 or >1.0. |