Skip to contents

Functions to compute the probability density function, cumulative distribution function, and quantile function for the Weibull distribution.

Usage

weibull_pdf(x, shape = 1, scale = 1)

weibull_lpdf(x, shape = 1, scale = 1)

weibull_cdf(x, shape = 1, scale = 1)

weibull_lcdf(x, shape = 1, scale = 1)

weibull_quantile(p, shape = 1, scale = 1)

Arguments

x

quantile

shape

shape parameter (default is 1)

scale

scale parameter (default is 1)

p

probability (0 <= p <= 1)

Value

A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.

See also

Boost Documentation for more details on the mathematical background.

Examples

# Weibull distribution with shape = 1, scale = 1
weibull_pdf(1)
#> [1] 0.3678794
weibull_lpdf(1)
#> [1] -1
weibull_cdf(1)
#> [1] 0.6321206
weibull_lcdf(1)
#> [1] -0.4586751
weibull_quantile(0.5)
#> [1] 0.6931472