Investment Studio > Expressions > Functions > Statistical > WEIBULL

float weibull(float x, float shape, float scale, boolean cumulative = TRUE)

Returns the Weibull probability function.

x is the point of evaluation.

shape and scale >= 1 are parameters of the distribution.

When shape = 1, weibull(x, 1, scale, cumulative) = expondist(x, 1 / scale, cumulative). When shape = 2, weibull reduces to the Rayleigh distribution (used in physics to model the amplitude spectra of wave phenoma).

If cumulative = TRUE, the CDF (Cumulative Distribution Function) is returned (equal to the probability that x is >= a stochastic variable with Weibull distribution); otherwise, the PDF (Probability Density Function) is returned. If omitted, cumulative defaults to TRUE.

Mathematically, the Weibull PDF is

f(x, shape, scale) = (shape / scale) (x / scale)shape - 1 exp(-(x / scale)shape)

and the CDF is

  x  
F(x, shape, scale) =  ó f(u, shape, scale) du = 1 - exp(-(x / scale)shape)
ô
õ
  0  

The Weibull distribution is often used in reliability analysis to model the failure behaviour over time of devices subject to fatigue.

Example

=weibull(1, 2, 3, TRUE)

returns 0.10516068318563;

=weibull(1, 2, 3, FALSE)

returns 0.198853181514304.

See also expondist, gammadist, normdist, weibullinv.