Weibull | R Documentation |
Generalization of the gamma distribution. Often used in survival and time-to-event analyses.
Weibull(shape, scale)
shape |
The shape parameter |
scale |
The scale parameter |
We recommend reading this documentation on https://alexpghayes.github.io/distributions3/, where the math will render with additional detail and much greater clarity.
In the following, let X
be a Weibull random variable with
success probability p
= p
.
Support: R^+
and zero.
Mean: \lambda \Gamma(1+1/k)
, where \Gamma
is
the gamma function.
Variance: \lambda [ \Gamma (1 + \frac{2}{k} ) - (\Gamma(1+ \frac{1}{k}))^2 ]
Probability density function (p.d.f):
f(x) = \frac{k}{\lambda}(\frac{x}{\lambda})^{k-1}e^{-(x/\lambda)^k}, x \ge 0
Cumulative distribution function (c.d.f):
F(x) = 1 - e^{-(x/\lambda)^k}, x \ge 0
Moment generating function (m.g.f):
\sum_{n=0}^\infty \frac{t^n\lambda^n}{n!} \Gamma(1+n/k), k \ge 1
A Weibull
object.
Other continuous distributions:
Beta()
,
Cauchy()
,
ChiSquare()
,
Erlang()
,
Exponential()
,
FisherF()
,
Frechet()
,
GEV()
,
GP()
,
Gamma()
,
Gumbel()
,
LogNormal()
,
Logistic()
,
Normal()
,
RevWeibull()
,
StudentsT()
,
Tukey()
,
Uniform()
set.seed(27)
X <- Weibull(0.3, 2)
X
random(X, 10)
pdf(X, 2)
log_pdf(X, 2)
cdf(X, 4)
quantile(X, 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.