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.
Supported types:
INTEGER
DECIMAL
INTEGER_ARRAY
DECIMAL_ARRAY
shape (
Operand) –The shape parameter α (must be > 0). Determines the distribution shape:
α < 1: Decreasing failure rate
α = 1: Exponential distribution
α > 1: Increasing failure rate
Supported types:
INTEGER
DECIMAL
INTEGER_ARRAY
DECIMAL_ARRAY
scale (
Operand) –The scale parameter β (must be > 0). Characteristic life parameter.
Supported types:
INTEGER
DECIMAL
INTEGER_ARRAY
DECIMAL_ARRAY
cumulative (
Operand) –Boolean flag (or numeric 0/1) to determine calculation type:
False / 0: PDF
True / 1: CDF
Supported types:
BOOLEAN
BOOLEAN_ARRAY
- 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
Supported types:
DECIMAL
DECIMAL_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