WEIBULL
- WEIBULL(x, shape, scale, cumulative)[source]
Calculates the Weibull distribution probability density (PDF) or cumulative distribution (CDF).
WEIBULL evaluates either the probability density function (PDF) or the cumulative distribution function (CDF) of the Weibull distribution for the given input(s).
- Parameters:
x (
Operand) – The input value(s) at which to evaluate the distribution. Must be ≥ 0.shape (
Operand) –The shape parameter α (must be > 0). Determines the distribution shape:
α < 1: Decreasing failure rate
α = 1: Exponential distribution
α > 1: Increasing failure rate
scale (
Operand) – The scale parameter β (must be > 0). Characteristic life parameter.cumulative (
Operand) –Boolean flag (or numeric 0/1) to determine calculation type:
False / 0: PDF
True / 1: CDF
- Return type:
- Returns:
A formula object evaluating to the Weibull distribution value(s).
Returns DECIMAL if all inputs are scalar
Returns DECIMAL_ARRAY if any input is an array
- Raises:
ValueError – If x, shape, or scale are not numeric types
ValueError – If cumulative is not boolean-compatible
Examples
Probability density function (PDF):
WEIBULL(2, 1.5, 3, False) # Returns the PDF at x=2
Cumulative distribution function (CDF):
WEIBULL(2, 1.5, 3, True) # Returns the CDF at x=2
Array inputs:
WEIBULL([1, 2, 3], 1.5, 3, True) # Returns an array of CDF values at x=1,2,3
``x`` — accepted types
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
``arg_2`` — accepted types
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
``arg_3`` — accepted types
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
``cumulative`` — accepted types
BOOLEAN
BOOLEAN_ARRAY
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
Return types
DECIMAL
DECIMAL_ARRAY