Modelica.Math.Distributions.Normal

Library of normal distribution functions

Information

This package provides

of the normal distribution. Examples:

For more details of this distribution see Wikipedia.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Modelica.Math.Distributions.Normal.density density Density of normal distribution
Modelica.Math.Distributions.Normal.cumulative cumulative Cumulative distribution function of normal distribution
Modelica.Math.Distributions.Normal.quantile quantile Quantile of normal distribution

Modelica.Math.Distributions.Normal.density Modelica.Math.Distributions.Normal.density

Density of normal distribution

Information

Syntax

Normal.density(u, mu=0, sigma=1);

Description

This function computes the probability density function according to a normal distribution with mean value mu and standard deviation sigma (variance = sigma2). Plot of the function:

For more details, see Wikipedia.

Example

density(0.5)     // = 0.3520653267642995
density(3,1,0.5) // = 0.00026766045152977074

See also

Normal.cumulative, Normal.quantile.

Extends from Modelica.Math.Distributions.Interfaces.partialDensity (Common interface of probability density functions).

Inputs

NameDescription
uRandom number over the real axis (-inf < u < inf)
muExpectation (mean) value of the normal distribution
sigmaStandard deviation of the normal distribution

Outputs

NameDescription
yDensity of u

Modelica.Math.Distributions.Normal.cumulative Modelica.Math.Distributions.Normal.cumulative

Cumulative distribution function of normal distribution

Information

Syntax

Normal.cumulative(u, mu=0, sigma=1);

Description

This function computes the cumulative distribution function according to a normal distribution with mean value mu and standard deviation sigma (variance = sigma2). The returned value y is in the range:

0 ≤ y ≤ 1

Plot of the function:

For more details, see Wikipedia.

Example

cumulative(0.5)      // = 0.6914624612740131
cumulative(0,1,0.5)  // = 0.15865525393145707

See also

Normal.density, Normal.quantile.

Extends from Modelica.Math.Distributions.Interfaces.partialCumulative (Common interface of cumulative distribution functions).

Inputs

NameDescription
uValue over the real axis (-inf < u < inf)
muExpectation (mean) value of the normal distribution
sigmaStandard deviation of the normal distribution

Outputs

NameDescription
yValue in the range 0 <= y <= 1

Modelica.Math.Distributions.Normal.quantile Modelica.Math.Distributions.Normal.quantile

Quantile of normal distribution

Information

Syntax

Normal.quantile(u, y_min=0, y_max=1);

Description

This function computes the inverse cumulative distribution function (= quantile) according to a normal distribution with mean value mu and standard deviation sigma (variance = sigma2). Input argument u must be in the range:

0 < u < 1

If the input argument u is a uniformly distributed random number, then 99.7 % of the returned random numbers are in the range:

mu-3*sigma ≤ y ≤ mu+3*sigma

Plot of the function:

For more details, see Wikipedia.

Example

quantile(0.001)     // = -3.090232306167813;
quantile(0.5,1,0.5) // = 1

See also

Normal.density, Normal.cumulative.

Extends from Modelica.Math.Distributions.Interfaces.partialQuantile (Common interface of quantile functions (= inverse cumulative distribution functions)).

Inputs

NameDescription
uRandom number in the range 0 <= u <= 1
muExpectation (mean) value of the normal distribution
sigmaStandard deviation of the normal distribution

Outputs

NameDescription
yRandom number u transformed according to the given distribution
Automatically generated Thu Oct 1 16:08:16 2020.