NormalDistribution Constructor

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

NormalDistribution() Constructs a new NormalDistribution with mean equal to zero and standard deviation equal to 1.
NormalDistribution(Double) Constructs a new NormalDistribution with specified mean and standard deviation equal to 1.
NormalDistribution(Vector<Double>) Estimates the parameters of the distribution of a variable assuming it follows a normal distribution.
NormalDistribution(Double, Double) Constructs a new NormalDistribution with specified mean and standard deviation.
NormalDistribution(Vector<Double>, EstimationMethod) Estimates the parameters of the distribution of a variable assuming it follows a normal distribution.

NormalDistribution

Constructs a new NormalDistribution with mean equal to zero and standard deviation equal to 1.
C#
public NormalDistribution()

Remarks

This constructor creates a standard normal distribution, with mean zero and standard deviation equal to one.

NormalDistribution(Double)

Constructs a new NormalDistribution with specified mean and standard deviation equal to 1.
C#
public NormalDistribution(
	double mean
)

Parameters

mean  Double
The mean of the distribution.

NormalDistribution(Vector<Double>)

Estimates the parameters of the distribution of a variable assuming it follows a normal distribution.
C#
public NormalDistribution(
	Vector<double> variable
)

Parameters

variable  Vector<Double>
A vector.

Return Value

The NormalDistribution that best matches the distribution of variable.

Remarks

Use this constructor to create a NormalDistribution whose parameters are estimated from variable. This constructor uses an unbiased estimator.

Exceptions

ArgumentNullException

variable is null.

NormalDistribution(Double, Double)

Constructs a new NormalDistribution with specified mean and standard deviation.
C#
public NormalDistribution(
	double mean,
	double standardDeviation
)

Parameters

mean  Double
The mean of the distribution.
standardDeviation  Double
The standard deviation of the distribution.

Remarks

The standard deviation must be greater than zero.

Exceptions

ArgumentOutOfRangeException

standardDeviation is less than or equal to zero.

NormalDistribution(Vector<Double>, EstimationMethod)

Estimates the parameters of the distribution of a variable assuming it follows a normal distribution.
C#
public NormalDistribution(
	Vector<double> variable,
	EstimationMethod method
)

Parameters

variable  Vector<Double>
A vector.
method  EstimationMethod
An EstimationMethod value that specifies the method to be used to estimate the distribution parameters.

Return Value

The NormalDistribution that best matches the distribution of variable.

Remarks

Use this constructor to create a NormalDistribution whose parameters are estimated from variable. The maximum likelihood and matching moment methods use biased and unbiased estimators for the standard deviation.

Exceptions

ArgumentNullException

variable is null.

See Also