Weibull distribution

(Redirected from Weibull)



Release:

4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4  •  6.5


The Weibull distribution is often used to represent the time to failure in models of equipment reliability, or time to death for humans and other creatures. It is similar in shape to the gamma distribution, but tends to be less skewed and tail-heavy. It is a continuous distribution over the positive real numbers.

Weibull(10, 4) → Weibull graph.jpg

Functions

Both parameters most be positive, i.e., [math]\displaystyle{ shape, scale \gt 0 }[/math]. The «scale» parameter is optional and defaults to 1.

Weibull(shape, scale, over)

The distribution function. Use this to define a chance variable or other uncertain quantity as having a Weibull distribution.

You can use the optional «over» parameter to generate independent and identically distributed distributions over one or more indicated indexes.

DensWeibull(x, shape, scale )

The density on [math]\displaystyle{ x\ge 0 }[/math] is given by:

[math]\displaystyle{ p(x) = {{shape}\over{scale}} \left({x\over{scale}}\right)^{shape-1} \exp\left(-(x/{scale})^{shape}\right) }[/math]

CumWeibull(x, shape, scale )

The Weibull distribution has a cumulative density on [math]\displaystyle{ x\ge 0 }[/math] given by:

[math]\displaystyle{ F(x) = 1 - \exp\left({-\left({x\over{scale}}\right)^{shape}}\right) }[/math]

and F(x) = 0 for x < 0.

CumWeibullInv(p, shape, scale )

The inverse cumulative distribution, or quantile function. Returns the «p»th fractile/quantile/percentile.

[math]\displaystyle{ F^{-1}(p) = scale * \left( \ln\left( 1\over{1-p} \right)\right)^{1/shape} }[/math]

Statistics

The theoretical statistics (i.e., without sampling error) for the Weibull distribution are as follows. I use [math]\displaystyle{ \alpha = 1/shape }[/math] and [math]\displaystyle{ \beta = scale }[/math].

  • Mean = [math]\displaystyle{ \beta \Gamma\left( 1 + \alpha\right) }[/math]
  • Mode = [math]\displaystyle{ \left\{ \begin{array}{ll} \beta \left( 1 - \alpha \right)^\alpha & \alpha\gt 1 \\ 0 & \alpha \leq 1 \end{array}\right. }[/math]
  • Median = [math]\displaystyle{ \beta \left( \ln 2\right)^\alpha }[/math]
  • Variance = [math]\displaystyle{ \beta^2 \Gamma(1+2\alpha) - \left(\beta \Gamma(1+\alpha)\right)^2 }[/math]

Parameter Estimation

Suppose you have sampled historic data in Data, indexed by I, and you want to find the parameters for the best-fit Weibull distribution. The parameters can be estimated using a linear regression as follows:

Index bm := ['b', 'm'];
Var Fx := (Rank(Data, I) - 0.5)/Size(I);
Var Z := Ln(-Ln(1 - Fx));
Var fit := Regression(Z, Array(bm, [1, Ln(Data)]), I, bm);
Var shape := fit[bm = 'm'];
Var b := fit[bm = 'b'];
Var scale := Exp(-b/shape);
[shape, scale]

See Also

Comments


You are not allowed to post comments.