Skip to content

Weibull functions in the Stochastic DuckDB extension

Function category

Weibull

19 functions

Weibull distribution — flexible shape/scale. Reliability engineering, time-to-failure, wind-speed modeling.

dist_weibull_cdf

Scalar function Weibull
Signature
dist_weibull_cdf( shape: DOUBLE, scale: DOUBLE, x: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument x Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_cdf(1.5, 1.0, 0.5);

Output

dist_weibull_cdf(1.5, 1.0, 0.5)
0.2978114986734404

dist_weibull_cdf_complement

Scalar function Weibull
Signature
dist_weibull_cdf_complement( shape: DOUBLE, scale: DOUBLE, x: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument x Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_cdf_complement(1.5, 1.0, 0.5);

Output

dist_weibull_cdf_complement(1.5, 1.0, 0.5)
0.7021885013265596

dist_weibull_chf

Scalar function Weibull
Signature
dist_weibull_chf( shape: DOUBLE, scale: DOUBLE, x: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument x Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_chf(1.5, 1.0, 0.5);

Output

dist_weibull_chf(1.5, 1.0, 0.5)
0.35355339059327373

dist_weibull_hazard

Scalar function Weibull
Signature
dist_weibull_hazard( shape: DOUBLE, scale: DOUBLE, x: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument x Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_hazard(1.5, 1.0, 0.5);

Output

dist_weibull_hazard(1.5, 1.0, 0.5)
1.0606601717798214

dist_weibull_kurtosis

Scalar function Weibull
Signature
dist_weibull_kurtosis(shape: DOUBLE, scale: DOUBLE) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_kurtosis(1.5, 1.0);

Output

dist_weibull_kurtosis(1.5, 1.0)
4.3904035615957975

dist_weibull_kurtosis_excess

Scalar function Weibull
Signature
dist_weibull_kurtosis_excess(shape: DOUBLE, scale: DOUBLE) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_kurtosis_excess(1.5, 1.0);

Output

dist_weibull_kurtosis_excess(1.5, 1.0)
1.3904035615957977

dist_weibull_log_cdf

Scalar function Weibull
Signature
dist_weibull_log_cdf( shape: DOUBLE, scale: DOUBLE, x: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument x Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_log_cdf(1.5, 1.0, 0.5);

Output

dist_weibull_log_cdf(1.5, 1.0, 0.5)
-1.211294547411032

dist_weibull_log_cdf_complement

Scalar function Weibull
Signature
dist_weibull_log_cdf_complement( shape: DOUBLE, scale: DOUBLE, x: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument x Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_log_cdf_complement(1.5, 1.0, 0.5);

Output

dist_weibull_log_cdf_complement(1.5, 1.0, 0.5)
-0.3535533905932738

dist_weibull_log_pdf

Scalar function Weibull
Signature
dist_weibull_log_pdf( shape: DOUBLE, scale: DOUBLE, x: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument x Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_log_pdf(1.5, 1.0, 0.5);

Output

dist_weibull_log_pdf(1.5, 1.0, 0.5)
-0.29466187276508204

dist_weibull_median

Scalar function Weibull
Signature
dist_weibull_median(shape: DOUBLE, scale: DOUBLE) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_median(1.5, 1.0);

Output

dist_weibull_median(1.5, 1.0)
0.7832197687746514

dist_weibull_mode

Scalar function Weibull
Signature
dist_weibull_mode(shape: DOUBLE, scale: DOUBLE) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_mode(1.5, 1.0);

Output

dist_weibull_mode(1.5, 1.0)
0.4807498567691361

dist_weibull_pdf

Scalar function Weibull
Signature
dist_weibull_pdf( shape: DOUBLE, scale: DOUBLE, x: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument x Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_pdf(1.5, 1.0, 0.5);

Output

dist_weibull_pdf(1.5, 1.0, 0.5)
0.7447833764388441

dist_weibull_quantile

Scalar function Weibull
Signature
dist_weibull_quantile( shape: DOUBLE, scale: DOUBLE, p: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument p Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_quantile(1.5, 1.0, 0.95);

Output

dist_weibull_quantile(1.5, 1.0, 0.95)
2.0781106375345564

dist_weibull_quantile_complement

Scalar function Weibull
Signature
dist_weibull_quantile_complement( shape: DOUBLE, scale: DOUBLE, p: DOUBLE ) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Argument p Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_quantile_complement(1.5, 1.0, 0.05);

Output

dist_weibull_quantile_complement(1.5, 1.0, 0.05)
2.078110637534557

dist_weibull_range

Scalar function Weibull
Signature
dist_weibull_range(shape: DOUBLE, scale: DOUBLE) DOUBLE[2]
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_range(1.5, 1.0);

Output

dist_weibull_range(1.5, 1.0)
(0.0, 1.7976931348623157e+308)

dist_weibull_sample

Scalar function Weibull
Signature
dist_weibull_sample(shape: DOUBLE, scale: DOUBLE) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_sample(1.5, 1.0);

Output

dist_weibull_sample(1.5, 1.0)
1.1238833819731295

dist_weibull_skewness

Scalar function Weibull
Signature
dist_weibull_skewness(shape: DOUBLE, scale: DOUBLE) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_skewness(1.5, 1.0);

Output

dist_weibull_skewness(1.5, 1.0)
1.0719865728909461

dist_weibull_support

Scalar function Weibull
Signature
dist_weibull_support(shape: DOUBLE, scale: DOUBLE) DOUBLE[2]
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_support(1.5, 1.0);

Output

dist_weibull_support(1.5, 1.0)
(2.2250738585072014e-308, 1.7976931348623157e+308)

dist_weibull_variance

Scalar function Weibull
Signature
dist_weibull_variance(shape: DOUBLE, scale: DOUBLE) DOUBLE
Arguments (Positional)
Argument shape Type DOUBLE Mode Positional Description
Argument scale Type DOUBLE Mode Positional Description
Description
1 Example 1
SELECT dist_weibull_variance(1.5, 1.0);

Output

dist_weibull_variance(1.5, 1.0)
0.3756902848139321