Skip to content

weibull

Syntax

weibull(a, b)

Parameters

a
A numeric expression representing shape.
b
A numeric expression representing scale.

Returns

Returns a variate according to a Weibull distribution.

Description

Returns a number according to a 2-parameter Weibull distribution. This distribution generates random values, each representing the lifespan during which the likelihood of death is proportional to time raised to the power of a. The parameter b adjusts the scale of the timeline.

This is represented by the probability density function:

\[ p(x|a,b) = \frac{a}{b} \cdot \left(\frac{x}{b}\right)^{a-1} \cdot e^{-\left(\frac{x}{b}\right)^a}, \quad x \geq 0 \]

Examples

The following state will make entering agents collectively wait with a Weibull distribution (a = 5, b = 1) of individual hourly wait times:

state Demo {
    wait(weibull(5, 1))
    default(Excluded)
}

See Also