19.8 Weibull distribution
19.8.1 Probability density function
If \(\alpha \in \mathbb{R}^+\) and \(\sigma \in \mathbb{R}^+\), then for \(y \in [0,\infty)\), \[ \text{Weibull}(y|\alpha,\sigma) = \frac{\alpha}{\sigma} \, \left( \frac{y}{\sigma} \right)^{\alpha - 1} \, \exp \! \left( \! - \left( \frac{y}{\sigma} \right)^{\alpha} \right) . \]
Note that if \(Y \propto \text{Weibull}(\alpha,\sigma)\), then \(Y^{-1} \propto \text{Frechet}(\alpha,\sigma^{-1})\).
19.8.2 Sampling statement
y ~
weibull
(alpha, sigma)
Increment target log probability density with weibull_lupdf(y | alpha, sigma)
.
Available since 2.0
19.8.3 Stan functions
real
weibull_lpdf
(reals y | reals alpha, reals sigma)
The log of the Weibull density of y given shape alpha and scale sigma
Available since 2.12
real
weibull_lupdf
(reals y | reals alpha, reals sigma)
The log of the Weibull density of y given shape alpha and scale sigma
dropping constant additive terms
Available since 2.25
real
weibull_cdf
(reals y, reals alpha, reals sigma)
The Weibull cumulative distribution function of y given shape alpha
and scale sigma
Available since 2.0
real
weibull_lcdf
(reals y | reals alpha, reals sigma)
The log of the Weibull cumulative distribution function of y given
shape alpha and scale sigma
Available since 2.12
real
weibull_lccdf
(reals y | reals alpha, reals sigma)
The log of the Weibull complementary cumulative distribution function
of y given shape alpha and scale sigma
Available since 2.12
R
weibull_rng
(reals alpha, reals sigma)
Generate a weibull variate with shape alpha and scale sigma; may only
be used in transformed data and generated quantities blocks.
For a description of argument and return types, see section
vectorized PRNG functions.
Available since 2.18