Class NormalDistribution
The normal distribution's density: for average μ and standard deviation σ, f(x) = exp(−(x − μ)²/(2σ²)) / (σ√(2π)), with its first derivative.
public sealed class NormalDistribution
- Inheritance
-
NormalDistribution
- Inherited Members
Remarks
QuantLib's GaussianDistribution is an alias of this class, and isn't ported.
Constructors
NormalDistribution(double, double)
Initializes a new instance of the NormalDistribution class.
public NormalDistribution(double average = 0, double sigma = 1)
Parameters
Exceptions
- ArgumentException
sigmaisn't positive.
Methods
Derivative(double)
The density's first derivative at x, −f(x)(x − μ)/σ².
public double Derivative(double x)
Parameters
xdoubleThe point.
Returns
- double
The derivative; 0 where the density is 0.
Evaluate(double)
The density at x.
public double Evaluate(double x)
Parameters
xdoubleThe point.
Returns
- double
The density; 0 where the exponent is −690 or below.