Library of normal distribution functions
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).
Name | Description |
---|---|
density | Density of normal distribution |
cumulative | Cumulative distribution function of normal distribution |
quantile | Quantile of normal distribution |
Density of normal distribution
Normal.density(u, mu=0, sigma=1);
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.
density(0.5) // = 0.3520653267642995 density(3,1,0.5) // = 0.00026766045152977074
Normal.cumulative, Normal.quantile.
Extends from Modelica.Math.Distributions.Interfaces.partialDensity (Common interface of probability density functions).
Name | Description |
---|---|
u | Random number over the real axis (-inf < u < inf) |
mu | Expectation (mean) value of the normal distribution |
sigma | Standard deviation of the normal distribution |
Name | Description |
---|---|
y | Density of u |
Cumulative distribution function of normal distribution
Normal.cumulative(u, mu=0, sigma=1);
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.
cumulative(0.5) // = 0.6914624612740131 cumulative(0,1,0.5) // = 0.15865525393145707
Normal.density, Normal.quantile.
Extends from Modelica.Math.Distributions.Interfaces.partialCumulative (Common interface of cumulative distribution functions).
Name | Description |
---|---|
u | Value over the real axis (-inf < u < inf) |
mu | Expectation (mean) value of the normal distribution |
sigma | Standard deviation of the normal distribution |
Name | Description |
---|---|
y | Value in the range 0 <= y <= 1 |
Quantile of normal distribution
Normal.quantile(u, y_min=0, y_max=1);
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.
quantile(0.001) // = -3.090232306167813; quantile(0.5,1,0.5) // = 1
Normal.density, Normal.cumulative.
Extends from Modelica.Math.Distributions.Interfaces.partialQuantile (Common interface of quantile functions (= inverse cumulative distribution functions)).
Name | Description |
---|---|
u | Random number in the range 0 <= u <= 1 |
mu | Expectation (mean) value of the normal distribution |
sigma | Standard deviation of the normal distribution |
Name | Description |
---|---|
y | Random number u transformed according to the given distribution |