# Weibull-class

##### Class "Weibull"

The Weibull distribution with `shape`

parameter $a$, by default $=1$, and
`scale`

parameter $\sigma$ has density given by, by default $=1$,
$$d(x) = (a/\sigma) {(x/\sigma)}^{a-1} \exp (-{(x/\sigma)}^{a})$$
for $x > 0$.
C.f. `rweibull`

- Keywords
- distribution

##### Note

The density is $d(x)=0$ for $x < 0$. The cumulative is $p(x) = 1 - \exp(-{(x/\sigma)}^a)$, the mean is $E(X) = \sigma \Gamma(1 + 1/a)$, and the $Var(X) = \sigma^2(\Gamma(1 + 2/a)-(\Gamma(1 + 1/a))^2)$.

##### Objects from the Class

Objects can be created by calls of the form `Weibull(shape, scale)`

.
This object is a Weibull distribution.

##### Extends

Class `"AbscontDistribution"`

, directly.
Class `"UnivariateDistribution"`

, by class `"AbscontDistribution"`

.
Class `"Distribution"`

, by class `"AbscontDistribution"`

.

##### concept

- absolutely continuous distribution
- Weibull distribution
- S4 distribution class
- generating function

##### See Also

`WeibullParameter-class`

`AbscontDistribution-class`

`Reals-class`

`rweibull`

##### Examples

```
W <- Weibull(shape=1,scale=1) # W is a Weibull distribution with shape=1 and scale=1.
r(W)(1) # one random number generated from this distribution, e.g. 0.5204105
d(W)(1) # Density of this distribution is 0.3678794 for x=1.
p(W)(1) # Probability that x<1 is 0.6321206.
q(W)(.1) # Probability that x<0.1053605 is 0.1.
shape(W) # shape of this distribution is 1.
shape(W) <- 2 # shape of this distribution is now 2.
```

*Documentation reproduced from package distr, version 2.0.6, License: LGPL-3*