Weibull distribution

From Vero - Wikipedia
Jump to navigation Jump to search

Template:Short descriptionTemplate:External links

Template:Use Oxford spelling Template:Use dmy dates Template:Infobox probability distribution

In probability theory and statistics, the Weibull distribution Template:IPAc-en is a continuous probability distribution. It models a broad range of random variables, largely in the nature of a time to failure or time between events. Examples are maximum one-day rainfalls and the time a user spends on a web page.

The distribution is named after Swedish mathematician Waloddi Weibull, who described it in detail in 1939,<ref>Template:Cite journal</ref><ref>Bowers, et. al. (1997) Actuarial Mathematics, 2nd ed. Society of Actuaries.</ref> although it was first identified by René Maurice Fréchet and first applied by Rosin & Rammler (1933) to describe a particle size distribution.<ref name=":2">Template:Cite journal</ref>

Definition

Standard parameterization

The probability density function of a Weibull random variable is<ref>Template:Cite book</ref><ref>Template:Cite journal</ref>

<math>

f(x;\lambda,k) = \begin{cases} \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1}e^{-(x/\lambda)^{k}}, & x\geq0 ,\\ 0, & x<0, \end{cases}</math>

where k > 0 is the shape parameter and λ > 0 is the scale parameter of the distribution. Its complementary cumulative distribution function is a stretched exponential function. The Weibull distribution is related to a number of other probability distributions; in particular, it interpolates between the exponential distribution (k = 1) and the Rayleigh distribution (k = 2 and <math>\lambda = \sqrt{2}\sigma </math>).<ref>Template:Cite web</ref>

If the quantity, x, is a "time-to-failure", the Weibull distribution gives a distribution for which the failure rate is proportional to a power of time. The shape parameter, k, is that power plus one, and so this parameter can be interpreted directly as follows:<ref>Template:Cite journal</ref>

  • A value of <math> k < 1\,</math> indicates that the failure rate decreases over time (like in case of the Lindy effect, which however corresponds to Pareto distributions<ref name=":0">Template:Cite journal</ref> rather than Weibull distributions). This happens if there is significant "infant mortality", or defective items failing early and the failure rate decreasing over time as the defective items are weeded out of the population. In the context of the diffusion of innovations, this means negative word of mouth: the hazard function is a monotonically decreasing function of the proportion of adopters;
  • A value of <math> k = 1\,</math> indicates that the failure rate is constant over time. This might suggest random external events are causing mortality, or failure. The Weibull distribution reduces to an exponential distribution;
  • A value of <math> k > 1\,</math> indicates that the failure rate increases with time. This happens if there is an "aging" process, or parts that are more likely to fail as time goes on. In the context of the diffusion of innovations, this means positive word of mouth: the hazard function is a monotonically increasing function of the proportion of adopters. The function is first convex, then concave with an inflection point at <math>(e^{1/k} - 1)/e^{1/k},\, k > 1\,</math>.

In the field of materials science, the shape parameter k of a distribution of strengths is known as the Weibull modulus. In the context of diffusion of innovations, the Weibull distribution is a "pure" imitation/rejection model.

Optional parameterizations

First option

Applications in medical statistics and econometrics often adopt a different parameterization.<ref>Template:Cite book</ref><ref>Template:Cite book</ref> The shape parameter k is the same as above, while the scale parameter is <math>b = \lambda^{-k}</math>. In this case, for x ≥ 0, the probability density function is

<math>f(x;k,b) = bkx^{k-1}e^{-bx^k},</math>

the cumulative distribution function is

<math>F(x;k,b) = 1 - e^{-bx^k},</math>

the quantile function is

<math>Q(p;k,b) = \left(-\frac{1}{b}\ln(1-p) \right)^{\frac{1}{k}},</math>

the hazard function is

<math>h(x;k,b) = bkx^{k-1},</math>

and the mean is

<math>b^{-1/k}\Gamma(1+1/k).</math>

Second option

A second parameterization option can also be found.<ref>Template:Cite book</ref><ref>Template:Cite web</ref> The shape parameter k is the same as in the standard case, while the scale parameter λ is replaced with a rate parameter β = 1/λ. Then, for x ≥ 0, the probability density function is

<math>f(x;k,\beta) = \beta k({\beta x})^{k-1} e^{-(\beta x)^k}</math>

the cumulative distribution function is

<math>F(x;k,\beta) = 1 - e^{-(\beta x)^k},</math>

the quantile function is

<math>Q(p;k,\beta) = \frac{1}{\beta}(-\ln(1-p))^\frac{1}{k},</math>

and the hazard function is

<math>h(x;k,\beta) = \beta k({\beta x})^{k-1}.</math>

In all three parameterizations, the hazard is decreasing for k < 1, increasing for k > 1 and constant for k = 1, in which case the Weibull distribution reduces to an exponential distribution.

Properties

Density function

The form of the density function of the Weibull distribution changes drastically with the value of k. For 0 < k < 1, the density function tends to ∞ as x approaches zero from above and is strictly decreasing. For k = 1, the density function tends to 1/λ as x approaches zero from above and is strictly decreasing. For k > 1, the density function tends to zero as x approaches zero from above, increases until its mode and decreases after it. The density function has infinite negative slope at x = 0 if 0 < k < 1, infinite positive slope at x = 0 if 1 < k < 2 and null slope at x = 0 if k > 2. For k = 1 the density has a finite negative slope at x = 0. For k = 2 the density has a finite positive slope at x = 0. As k goes to infinity, the Weibull distribution converges to a Dirac delta distribution centered at x = λ. Moreover, the skewness and coefficient of variation depend only on the shape parameter. A generalization of the Weibull distribution is the hyperbolastic distribution of type III.

Cumulative distribution function

The cumulative distribution function for the Weibull distribution is

<math>F(x;k,\lambda) = 1 - e^{-(x/\lambda)^k}\,</math>

for x ≥ 0, and F(x; k; λ) = 0 for x < 0.

If x = λ then F(x; k; λ) = 1 − e−1 ≈ 0.632 for all values of k. Vice versa: at F(x; k; λ) = 0.632 the value of x ≈ λ.

The quantile (inverse cumulative distribution) function for the Weibull distribution is

<math>Q(p;k,\lambda) = \lambda(-\ln(1-p))^{1/k}</math>

for 0 ≤ p < 1.

The failure rate h (or hazard function) is given by

<math> h(x;k,\lambda) = {k \over \lambda} \left({x \over \lambda}\right)^{k-1}.</math>

The Mean time between failures MTBF is

<math> \text{MTBF}(k,\lambda) = \lambda\Gamma(1+1/k).</math>

Moments

The moment generating function of the logarithm of a Weibull distributed random variable is given by<ref name=JKB>Template:Harvnb</ref>

<math>\operatorname E\left[e^{t\log X}\right] = \lambda^t\Gamma\left(\frac{t}{k}+1\right)</math>

where Template:Math is the gamma function. Similarly, the characteristic function of log X is given by

<math>\operatorname E\left[e^{it\log X}\right] = \lambda^{it}\Gamma\left(\frac{it}{k}+1\right).</math>

In particular, the nth raw moment of X is given by

<math>m_n = \lambda^n \Gamma\left(1+\frac{n}{k}\right).</math>

The mean and variance of a Weibull random variable can be expressed as

<math>\operatorname{E}(X) = \lambda \Gamma\left(1+\frac{1}{k}\right)\,</math>

and

<math>\operatorname{var}(X) = \lambda^2\left[\Gamma\left(1+\frac{2}{k}\right) - \left(\Gamma\left(1+\frac{1}{k}\right)\right)^2\right]\,.</math>

The skewness is given by

<math>\gamma_1=\frac{2\Gamma_1^3-3\Gamma_1\Gamma_2+ \Gamma_3 }{[\Gamma_2-\Gamma_1^2]^{3/2}}</math>

where <math>\Gamma_i=\Gamma(1+i/k)</math>, which may also be written as

<math>\gamma_1=\frac{\Gamma\left(1+\frac{3}{k}\right)\lambda^3-3\mu\sigma^2-\mu^3}{\sigma^3}</math>

where the mean is denoted by Template:Math and the standard deviation is denoted by Template:Math.

The excess kurtosis is given by

<math>\gamma_2=\frac{-6\Gamma_1^4+12\Gamma_1^2\Gamma_2-3\Gamma_2^2-4\Gamma_1 \Gamma_3 +\Gamma_4}{[\Gamma_2-\Gamma_1^2]^2}</math>

where <math>\Gamma_i=\Gamma(1+i/k)</math>. The kurtosis excess may also be written as:

<math>\gamma_2=\frac{\lambda^4\Gamma(1+\frac{4}{k})-4\gamma_1\sigma^3\mu-6\mu^2\sigma^2-\mu^4}{\sigma^4}-3.</math>

Moment generating function

A variety of expressions are available for the moment generating function of X itself. As a power series, since the raw moments are already known, one has

<math>\operatorname E\left[e^{tX}\right] = \sum_{n=0}^\infty \frac{t^n\lambda^n}{n!} \Gamma\left(1+\frac{n}{k}\right).</math>

Alternatively, one can attempt to deal directly with the integral

<math>\operatorname E\left[e^{tX}\right] = \int_0^\infty e^{tx} \frac k \lambda \left(\frac{x}{\lambda}\right)^{k-1}e^{-(x/\lambda)^k}\,dx.</math>

If the parameter k is assumed to be a rational number, expressed as k = p/q where p and q are integers, then this integral can be evaluated analytically.Template:Efn With t replaced by −t, one finds

<math> \operatorname E\left[e^{-tX}\right] = \frac1{ \lambda^k\, t^k} \, \frac{ p^k \, \sqrt{q/p}} {(\sqrt{2 \pi})^{q+p-2}} \, G_{p,q}^{\,q,p} \!\left( \left. \begin{matrix} \frac{1-k}{p}, \frac{2-k}{p}, \dots, \frac{p-k}{p} \\ \frac{0}{q}, \frac{1}{q}, \dots, \frac{q-1}{q} \end{matrix} \; \right| \, \frac {p^p} {\left( q \, \lambda^k \, t^k \right)^q} \right) </math>

where G is the Meijer G-function.

The characteristic function has also been obtained by Muraleedharan et al. (2007)<ref>Template:Cite journal</ref>

Minima

Let <math>X_1, X_2, \ldots, X_n</math> be independent and identically distributed Weibull random variables with scale parameter <math>\lambda</math> and shape parameter <math>k</math>. If the minimum of these <math>n</math> random variables is <math>Z = \min(X_1, X_2, \ldots, X_n)</math>, then the cumulative probability distribution of <math>Z</math> is given by

<math>F(z) = 1 - e^{-n(z/\lambda)^k}.</math>

That is, <math>Z</math> will also be Weibull distributed with scale parameter <math>n^{-1/k} \lambda</math> and with shape parameter <math>k</math>.

Reparametrization tricks

Fix some <math>\alpha > 0</math>. Let <math>(\pi_1, ..., \pi_n)</math> be nonnegative, and not all zero, and let <math>g_1,... , g_n</math> be independent samples of <math>\text{Weibull}(1, \alpha^{-1})</math>, then<ref>Template:Cite journal</ref>

  • <math>\arg\min_i (g_i \pi_i^{-\alpha}) \sim \text{Categorical}\left(\frac{\pi_j}{\sum_i \pi_i}\right)_j</math>
  • <math>\min_i (g_i \pi_i^{-\alpha}) \sim\text{Weibull}\left( \left(\sum_i \pi_i \right)^{-\alpha}, \alpha^{-1}\right)</math>.

Shannon entropy

The information entropy is given by<ref>Template:Cite journal</ref>

<math>

H(\lambda,k) = \gamma\left(1 - \frac{1}{k}\right) + \ln\left(\frac{\lambda}{k}\right) + 1 </math>

where <math>\gamma</math> is the Euler–Mascheroni constant. The Weibull distribution is the maximum entropy distribution for a non-negative real random variate with a fixed expected value of xk equal to λk and a fixed expected value of ln(xk) equal to ln(λk) − <math>\gamma</math>.

Kullback–Leibler divergence

The Kullback–Leibler divergence between two Weibull distributions is given by<ref>Template:Cite arXiv</ref>

<math>D_\text{KL}( \mathrm{Weib}_1 \parallel \mathrm{Weib}_2) = \log \frac{k_1}{\lambda_1^{k_1}} - \log \frac{k_2}{\lambda_2^{k_2}} + (k_1 - k_2) \left[ \log \lambda_1 - \frac{\gamma}{k_1} \right] + \left(\frac{\lambda_1}{\lambda_2}\right)^{k_2} \Gamma \left(\frac{k_2}{k_1} + 1 \right) - 1</math>

Parameter estimation

Ordinary least square using Weibull plot

File:Weibull qq.svg
Weibull plot

The fit of a Weibull distribution to data can be visually assessed using a Weibull plot.<ref>Template:Cite web</ref> The Weibull plot is a plot of the empirical cumulative distribution function <math>\widehat F(x)</math> of data on special axes in a type of Q–Q plot. The axes are <math>\ln(-\ln(1-\widehat F(x)))</math> versus <math>\ln(x)</math>. The reason for this change of variables is the cumulative distribution function can be linearized:

<math>\begin{align}

F(x) &= 1-e^{-(x/\lambda)^k}\\[4pt] -\ln(1-F(x)) &= (x/\lambda)^k\\[4pt] \underbrace{\ln(-\ln(1-F(x)))}_{\textrm{'y'}} &= \underbrace{k\ln x}_{\textrm{'mx'}} - \underbrace{k\ln \lambda}_{\textrm{'c'}} \end{align} </math> which can be seen to be in the standard form of a straight line. Therefore, if the data came from a Weibull distribution then a straight line is expected on a Weibull plot.

There are various approaches to obtaining the empirical distribution function from data. One method is to obtain the vertical coordinate for each point using

<math>\widehat F = \frac{i-0.3}{n+0.4}</math>,

where <math>i</math> is the rank of the data point and <math>n</math> is the number of data points.<ref>Wayne Nelson (2004) Applied Life Data Analysis. Wiley-Blackwell Template:ISBN</ref><ref>Template:Cite journal</ref> Another common estimator<ref>Template:Cite ISO standard</ref> is

<math>\widehat F = \frac{i-0.5}{n}</math>.

Linear regression can also be used to numerically assess goodness of fit and estimate the parameters of the Weibull distribution. The gradient informs one directly about the shape parameter <math>k</math> and the scale parameter <math>\lambda</math> can also be inferred.

Method of moments

The coefficient of variation of Weibull distribution depends only on the shape parameter:<ref name="Cohen1965">Template:Cite journal</ref>

<math>CV^2 = \frac{\sigma^2}{\mu^2}
= \frac{\Gamma\left(1+\frac{2}{k}\right) - \left(\Gamma\left(1+\frac{1}{k}\right)\right)^2}{\left(\Gamma\left(1+\frac{1}{k}\right)\right)^2}.</math>

Equating the sample quantities <math>s^2/\bar{x}^2</math> to <math>\sigma^2/\mu^2</math>, the moment estimate of the shape parameter <math>k</math> can be read off either from a look up table or a graph of <math>CV^2</math> versus <math>k</math>. A more accurate estimate of <math>\hat{k}</math> can be found using a root finding algorithm to solve

<math>\frac{\Gamma\left(1+\frac{2}{k}\right) - \left(\Gamma\left(1+\frac{1}{k}\right)\right)^2}{\left(\Gamma\left(1+\frac{1}{k}\right)\right)^2} = \frac{s^2}{\bar{x}^2}.</math>

The moment estimate of the scale parameter can then be found using the first moment equation as

<math>\hat{\lambda} = \frac{\bar{x}}{\Gamma\left(1 + \frac{1}{\hat{k}}\right)}.</math>

Maximum likelihood

The maximum likelihood estimator for the <math>\lambda</math> parameter given <math>k</math> is<ref name="Cohen1965"/>

<math>\widehat \lambda = \left(\frac{1}{n} \sum_{i=1}^n x_i^k \right)^\frac{1}{k} </math>

The maximum likelihood estimator for <math>k</math> is the solution for k of the following equation<ref name="Sornette, D. 2004">Template:Cite book.</ref>

<math>
 0 =  \frac{\sum_{i=1}^n x_i^k \ln x_i }{\sum_{i=1}^n x_i^k }
                 - \frac{1}{k} - \frac{1}{n} \sum_{i=1}^n \ln x_i

</math>

This equation defines <math>\widehat k</math> only implicitly, one must generally solve for <math>k</math> by numerical means.

When <math>x_1 > x_2 > \cdots > x_N</math> are the <math>N</math> largest observed samples from a dataset of more than <math>N</math> samples, then the maximum likelihood estimator for the <math>\lambda</math> parameter given <math>k</math> is<ref name="Sornette, D. 2004"/>

<math>\widehat \lambda^k = \frac{1}{N} \sum_{i=1}^N (x_i^k - x_N^k)</math>

Also given that condition, the maximum likelihood estimator for <math>k</math> isTemplate:Citation needed

<math>
 0 = \frac{\sum_{i=1}^N (x_i^k \ln x_i -  x_N^k \ln x_N)}
                      {\sum_{i=1}^N (x_i^k - x_N^k)}
                 - \frac{1}{N} \sum_{i=1}^N \ln x_i

</math>

Again, this being an implicit function, one must generally solve for <math>k</math> by numerical means.

Applications

The Weibull distribution is usedTemplate:Citation needed

File:FitWeibullDistr.tif
Fitted cumulative Weibull distribution to maximum one-day rainfalls using CumFreq, see also distribution fitting<ref>Template:Cite web</ref>
File:DCA with four RDC.png
Fitted curves for oil production time series data<ref name="ReferenceA">Template:Cite journal</ref>

Prediction

  • It is often of interest to predict probabilities of out-of-sample data under the assumption that both the training data and the out-of-sample data follow a Weibull distribution.
  • Predictions generated by substituting the method of moments or maximum likelihood estimates of the Weibull parameters given above into the cumulative distribution function ignore parameter uncertainty. As a result, the probabilities are not well calibrated, do not reflect the frequencies of out-of-sample events, and, in particular, underestimate the probabilities of out-of-sample tail events.<ref name=":1">Template:Cite journal</ref>
  • Predictions generated using the objective Bayesian approach of calibrating prior prediction completely eliminate this underestimation. The Weibull distribution is one of a number of statistical distributions with group structure. As a result of the group structure, the Weibull has associated left and right Haar measures. The use of the right Haar measure as the prior (known as the right Haar prior) in a Bayesian prediction gives probabilities that are perfectly calibrated, for any underlying true parameter values.<ref>Template:Cite journal</ref><ref name=":1" /><ref>Template:Cite journal</ref> Calibrating prior prediction for the Weibull using the appropriate right Haar prior is implemented in the R software package fitdistcp.[1]
  • If <math>W \sim \mathrm{Weibull}(\lambda, k)</math>, then the variable <math>G = \log W</math> is Gumbel (minimum) distributed with location parameter <math>\mu = \log \lambda</math> and scale parameter <math>\beta = 1/k</math>. That is, <math>G \sim \mathrm{Gumbel}_{\min}(\log \lambda, 1/k)</math>.
  • Template:Paragraph breakA Weibull distribution is a generalized gamma distribution with both shape parameters equal to k.
  • Template:Paragraph breakThe translated Weibull distribution (or 3-parameter Weibull) contains an additional parameter.<ref name="JKB" /> It has the probability density function

    <math>f(x;k,\lambda, \theta)={k \over \lambda} \left({x - \theta \over \lambda}\right)^{k-1} e^{-\left({x-\theta \over \lambda}\right)^k}\,</math>

    Template:Paragraph breakfor <math>x \geq \theta</math> and <math>f(x; k, \lambda, \theta) = 0</math> for <math>x < \theta</math>, where <math>k > 0</math> is the shape parameter, <math>\lambda > 0</math> is the scale parameter and <math>\theta</math> is the location parameter of the distribution. <math>\theta</math> value sets an initial failure-free time before the regular Weibull process begins. When <math>\theta = 0</math>, this reduces to the 2-parameter distribution.
  • Template:Paragraph breakThe Weibull distribution can be characterized as the distribution of a random variable <math>W</math> such that the random variable

    <math>X = \left(\frac{W}{\lambda}\right)^k</math>

    Template:Paragraph breakis the standard exponential distribution with intensity 1.<ref name="JKB" />
  • This implies that the Weibull distribution can also be characterized in terms of a uniform distribution: if <math>U</math> is uniformly distributed on <math>(0,1)</math>, then the random variable <math>W = \lambda(-\ln(U))^{1/k}\,</math> is Weibull distributed with parameters <math>k</math> and <math>\lambda</math>. Note that <math>-\ln(U)</math> here is equivalent to <math>X</math> just above. This leads to an easily implemented numerical scheme for simulating a Weibull distribution.
  • The Weibull distribution interpolates between the exponential distribution with intensity <math>1/\lambda</math> when <math>k = 1</math> and a Rayleigh distribution of mode <math>\sigma = \lambda/\sqrt{2}</math> when <math>k = 2</math>.
  • The Weibull distribution (usually sufficient in reliability engineering) is a special case of the three parameter exponentiated Weibull distribution where the additional exponent equals 1. The exponentiated Weibull distribution accommodates unimodal, bathtub shaped<ref>Template:Cite web</ref> and monotone failure rates.
  • Template:Paragraph breakThe Weibull distribution is a special case of the generalized extreme value distribution. It was in this connection that the distribution was first identified by Maurice Fréchet in 1927.<ref>Template:Cite book</ref> The closely related Fréchet distribution, named for this work, has the probability density function

    <math>f_{\rm{Frechet}}(x;k,\lambda)=\frac{k}{\lambda} \left(\frac{x}{\lambda}\right)^{-1-k} e^{-(x/\lambda)^{-k}} = f_{\rm{Weibull}}(x;-k,\lambda).</math>

  • The distribution of a random variable that is defined as the minimum of several random variables, each having a different Weibull distribution, is a poly-Weibull distribution.
  • Template:Paragraph breakThe Weibull distribution was first applied by Rosin & Rammler (1933)<ref name=":2" /> to describe particle size distributions. It is widely used in mineral processing to describe particle size distributions in comminution processes. In this context the cumulative distribution is given by

    <math>f(x;P_{\rm{80}},m) = \begin{cases} 1-e^{\ln\left(0.2\right)\left(\frac{x}{P_{\rm{80}}}\right)^m} & x\geq0 ,\\ 0 & x<0 ,\end{cases}</math>

    Template:Paragraph breakwhere
    • <math>x</math> is the particle size
    • <math>P_{\rm{80}}</math> is the 80th percentile of the particle size distribution
    • <math>m</math> is a parameter describing the spread of the distribution
  • Because of its availability in spreadsheets, it is also used where the underlying behavior is actually better modeled by an Erlang distribution.<ref>Template:Cite journal</ref>
  • If <math>X \sim \mathrm{Weibull}(\lambda,\frac{1}{2})</math> then <math> \sqrt{X} \sim \mathrm{Exponential}(\frac{1}{\sqrt{\lambda}})</math> (Exponential distribution)
  • Template:Paragraph breakFor the same values of k, the Gamma distribution takes on similar shapes, but the Weibull distribution is more platykurtic.

See also

Notes

Template:Notelist

References

Template:Reflist

Further reading

Template:Refbegin

Template:Refend

Template:ProbDistributions Template:Authority control