MultivariateNormalDistribution Constructor

Definition

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

Overload List

MultivariateNormalDistribution(Int32) Constructs a new MultivariateNormalDistribution with mean equal to zero and standard deviation equal to 1.
MultivariateNormalDistribution(Matrix<Double>) Estimates the parameters of the distribution of a set of observations assuming it follows a multivariate normal distribution.
MultivariateNormalDistribution(Vector<Double>) Constructs a new MultivariateNormalDistribution with specified mean and standard deviation equal to 1.
MultivariateNormalDistribution(Vector<Double>[]) Estimates the parameters of the distribution of a variable assuming it follows a normal distribution.
MultivariateNormalDistribution(Vector<Double>, Matrix<Double>) Constructs a new MultivariateNormalDistribution with specified mean and standard deviation.

MultivariateNormalDistribution(Int32)

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

Parameters

order  Int32
 

Remarks

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

MultivariateNormalDistribution(Matrix<Double>)

Estimates the parameters of the distribution of a set of observations assuming it follows a multivariate normal distribution.
C#
public MultivariateNormalDistribution(
	Matrix<double> data
)

Parameters

data  Matrix<Double>
A real Matrix<T> whose rows contain the observations.

Return Value

The MultivariateNormalDistribution that best matches the distribution of the rows of data.

Remarks

Use this constructor to create a MultivariateNormalDistribution whose parameters are estimated from data. This constructor uses an unbiased estimator. A single observation uses identity covariance. At least one observation and one variable are required.

Exceptions

ArgumentNullException

data is null.

ArgumentOutOfRangeExceptiondata has no observations or no variables.

MultivariateNormalDistribution(Vector<Double>)

Constructs a new MultivariateNormalDistribution with specified mean and standard deviation equal to 1.
C#
public MultivariateNormalDistribution(
	Vector<double> mean
)

Parameters

mean  Vector<Double>
The nonempty vector of finite means. Its values are copied.

Exceptions

ArgumentNullExceptionmean is null.
ArgumentOutOfRangeExceptionmean is empty or contains a nonfinite value.

MultivariateNormalDistribution(Vector<Double>[])

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

Parameters

variables  Vector<Double>[]
An array of vectors.

Return Value

The MultivariateNormalDistribution that best matches the distribution of variables.

Remarks

Use this constructor to create a MultivariateNormalDistribution whose parameters are estimated from variables. This constructor uses an unbiased estimator. Each variable must have the same positive observation count. A single observation uses identity covariance.

Exceptions

ArgumentNullException

variables is null.

ArgumentOutOfRangeExceptionvariables is empty or its vectors contain no observations.
ArgumentExceptionAn element is null or variable lengths differ.

MultivariateNormalDistribution(Vector<Double>, Matrix<Double>)

Constructs a new MultivariateNormalDistribution with specified mean and standard deviation.
C#
public MultivariateNormalDistribution(
	Vector<double> mean,
	Matrix<double> covarianceMatrix
)

Parameters

mean  Vector<Double>
The nonempty vector of finite means. Its values are copied.
covarianceMatrix  Matrix<Double>
The finite, symmetric variance-covariance matrix. Its values are copied.

Remarks

The covariance must be positive semi-definite and have one row and column for each mean.

Exceptions

ArgumentNullException

mean is null.

-or-

covarianceMatrix is null.

DimensionMismatchException

Either dimension of covarianceMatrix does not equal the length of mean.

ArgumentOutOfRangeExceptionmean is empty, or an input contains a nonfinite value.
ArgumentExceptioncovarianceMatrix is not symmetric.

See Also