Modelica.Math.Distributions.Weibull

Library of Weibull distribution functions

Information

This package provides

of the Weibull 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.Weibull.density density Density of Weibull distribution
Modelica.Math.Distributions.Weibull.cumulative cumulative Cumulative distribution function of Weibull distribution
Modelica.Math.Distributions.Weibull.quantile quantile Quantile of Weibull distribution

Modelica.Math.Distributions.Weibull.density Modelica.Math.Distributions.Weibull.density

Density of Weibull distribution

Information

Syntax

Weibull.density(u, lambda=1, k=1);

Description

This function computes the probability density function according to a Weibull distribution with scale parameter lambda and shape parameter k. Equation:

y = if u >= 0 then (k/lambda)*(u/lambda)^(k - 1)*exp(-(u/lambda)^k) else 0.0;

Plot of the function:

For more details, see Wikipedia.

Example

  density(0.5)     // = 0.36787944117144233
  density(1,0.5,2) // = 0.14652511110987343

See also

Weibull.cumulative, Weibull.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)
lambdaScale parameter of the Weibull distribution
kShape parameter of the Weibull distribution

Outputs

NameDescription
yDensity of u

Modelica.Math.Distributions.Weibull.cumulative Modelica.Math.Distributions.Weibull.cumulative

Cumulative distribution function of Weibull distribution

Information

Syntax

Weibull.cumulative(u, lambda=1, k=1);

Description

This function computes the cumulative distribution function according to a Weibull distribution with scale parameter lambda and shape parameter k. Equation:

y := if u >= 0 then 1 - exp(-(u/lambda)^k) else 0.0;

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.3934693402873666
  cumulative(0.5,0.5,1) // = 0.6321205588285577

See also

Weibull.density, Weibull.quantile.

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

Inputs

NameDescription
uValue over the real axis (-inf < u < inf)
lambdaScale parameter of the Weibull distribution
kShape parameter of the Weibull distribution

Outputs

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

Modelica.Math.Distributions.Weibull.quantile Modelica.Math.Distributions.Weibull.quantile

Quantile of Weibull distribution

Information

Syntax

Weibull.quantile(u, lambda=1, k=1);

Description

This function computes the inverse cumulative distribution function (= quantile) according to a Weibull distribution with scale parameter lambda and shape parameter k. Equation:

y := lambda * (-log( 1-u)) ^(1/k);

Input argument u must be in the range:

0 ≤ u < 1

Plot of the function:

For more details, see Wikipedia.

Example

  quantile(0)         // = 0
  quantile(0.5,1,0.5) // = 0.41627730557884884

See also

Weibull.density, Weibull.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
lambdaScale parameter of the Weibull distribution
kShape parameter of the Weibull distribution

Outputs

NameDescription
yRandom number u transformed according to the given distribution
Automatically generated Thu Dec 19 17:20:25 2019.