Main Content

Weibull Distribution

Overview

The Weibull distribution is a two-parameter family of curves. This distribution is named for Waloddi Weibull, who offered it as an appropriate analytical tool for modeling the breaking strength of materials. Current usage also includes reliability and lifetime modeling. The Weibull distribution is more flexible than the exponential distribution for these purposes, because the exponential distribution has a constant hazard function.

Statistics和Machine Learning Toolbox™提供了几种处理Weibull分销的方法。

  • Create a probability distribution objectweibulldistributionby fitting a probability distribution to sample data (fitdist) or by specifying parameter values (makedist). Then, use object functions to evaluate the distribution, generate random numbers, and so on.

  • Work with the Weibull distribution interactively by using theDistribution Fitterapp. You can export an object from the app and use the object functions.

  • Use distribution-specific functions (wblcdf,wblpdf,wblinv,wbllike,wblstat,wblfit,wblrnd,wblplot) with specified distribution parameters. The distribution-specific functions can accept parameters of multiple Weibull distributions.

  • Use generic distribution functions (cdf,icdf,pdf,random) with a specified distribution name ('weibull') and parameters.

Parameters

Statistics and Machine Learning Toolbox functions use a two-parameter Weibull distribution with these parameters.

Parameter Description 金宝app
a Scale a> 0
b Shape b> 0

The standard Weibull distribution has unit scale.

The Weibull distribution can take a third parameter. The three-parameter Weibull distribution adds a location parameter that is zero in the two-parameter case. IfXhas a two-parameter Weibull distribution, thenY=X+c有一个带三个参数的威布尔分布智慧h the added location parameterc. For more details, seeThree-Parameter Weibull Distribution.

Parameter Estimation

Thelikelihood functionis the probability density function (pdf) viewed as a function of the parameters. Themaximum likelihood estimates(MLEs) are the parameter estimates that maximize the likelihood function for fixed values ofx. The maximum likelihood estimators ofaandbfor the Weibull distribution are the solution of the simultaneous equations

a ^ = [ ( 1 n ) i = 1 n x i b ^ ] 1 b ^ b ^ = n ( 1 a ^ ) i = 1 n x i b ^ log x i i = 1 n log x i .

âand b ^ 是参数的公正估计器aandb.

To fit the Weibull distribution to data and find parameter estimates, usewblfit,fitdist, ormle. Unlikewblfitandmle, which return parameter estimates,fitdistreturns the fitted probability distribution objectweibulldistribution. The object propertiesaandbstore the parameter estimates.

For an example, seeFit Weibull Distribution to Data and Estimate Parameters.

Probability Density Function

The pdf of the Weibull distribution is

f ( x | a , b ) = { b a ( x a ) b 1 e ( x / a ) b if x 0 , 0 if x < 0.

For an example, seeCompute Weibull Distribution pdf.

Cumulative Distribution Function

The cumulative distribution function (cdf) of the Weibull distribution is

p = F ( x | a , b ) = 0 x b a b t b 1 e ( t a ) b d t = 1 e ( x a ) b .

The resultpis the probability that a single observation from a Weibull distribution with parametersaandbfalls in the interval [0x].

For an example, seeCompute Weibull Distribution cdf.

Inverse Cumulative Distribution Function

The inverse cdf of the Weibull distribution is

x = F 1 ( p | a , b ) = a [ ln ( 1 p ) ] 1 / b .

The resultx是来自带有参数的威布尔分布观察的值aandbfalls in the range [0x] with probabilityp.

Hazard Function

The hazard function (instantaneous failure rate) is the ratio of the pdf and the complement of the cdf. Iff(t) andF(t) are the pdf and cdf of a distribution, then the hazard rate is h ( t ) = f ( t ) 1 F ( t ) . Substituting the pdf and cdf of the exponential distribution forf(t) andF(t) above yields the function b a b x b 1 .

For an example, seeCompare Exponential and Weibull Distribution Hazard Functions.

Examples

Fit Weibull Distribution to Data and Estimate Parameters

Simulate the tensile strength data of a thin filament using the Weibull distribution with the scale parameter value0.5and the shape parameter value2.

rng('默认');% For reproducibilitystrength = wblrnd(0.5,2,100,1);% Simulated strengths

Compute the MLEs and confidence intervals for the Weibull distribution parameters.

[param,ci] = wblfit(strength)
param =1×20.4768 1.9622
ci =2×20.4291 1.6821 0.5298 2.2890

The estimated scale parameter is0.4768, with the 95% confidence interval(0.4291,0.5298).

The estimated shape parameter is1.9622, with the 95% confidence interval(1.6821,2.2890).

The default confidence interval for each parameter contains the true value.

Compute Weibull Distribution pdf

计算和绘制Weibull分布的PDF,以量表(a)和形状(b)参数的各种值。

x = linspace(0,30); plot(x,wblpdf(x,10,1),'DisplayName','A=10, B=1') holdonplot(x,wblpdf(x,10,2),'DisplayName','A=10, B=2') plot(x,wblpdf(x,10,4),'DisplayName','A=10, B=4') plot(x,wblpdf(x,10,0.5),'DisplayName','A=10, B=0.5')图(x,wblpdf(x,10,0.25),'DisplayName','A=10, B=0.25') plot(x,wblpdf(x,5,1),'DisplayName','A=5, B=1') holdofflegend('show') xlabel('x') ylabel('pdf')

图包含一个坐标轴对象。坐标轴对象有限公司ntains 6 objects of type line. These objects represent A=10, B=1, A=10, B=2, A=10, B=4, A=10, B=0.5, A=10, B=0.25, A=5, B=1.

The value B=1 leads to the exponential distribution. Values of B<1 have a density that approaches infinity as x approaches 0. Values of B>1 have a density that approaches 0 as x approaches 1.

Compute Weibull Distribution cdf

Compute and plot the cdf of the Weibull distribution for various values of the scale (A) and shape (B) parameters.

x = linspace(0,30); plot(x,wblcdf(x,10,1),'DisplayName','A=10, B=1') holdonplot(x,wblcdf(x,10,2),'DisplayName','A=10, B=2') plot(x,wblcdf(x,10,4),'DisplayName','A=10, B=4') plot(x,wblcdf(x,10,0.5),'DisplayName','A=10, B=0.5') plot(x,wblcdf(x,10,0.25),'DisplayName','A=10, B=0.25') plot(x,wblcdf(x,5,1),'DisplayName','A=5, B=1') holdofflegend('show','Location','southeast') xlabel('x') ylabel('cdf')

图包含一个坐标轴对象。坐标轴对象有限公司ntains 6 objects of type line. These objects represent A=10, B=1, A=10, B=2, A=10, B=4, A=10, B=0.5, A=10, B=0.25, A=5, B=1.

Compare Exponential and Weibull Distribution Hazard Functions

The exponential distribution has a constant hazard function, which is not generally the case for the Weibull distribution. In this example, the Weibull hazard rate increases with age (a reasonable assumption).

Compute the hazard function for the Weibull distribution with the scale parameter value1and the shape parameter value2.

t = 0:0.1:4.5; h1 = wblpdf(t,1,2)./(1-wblcdf(t,1,2));

Compute the mean of the Weibull distribution with scale parameter value1and shape parameter value2.

mu = wblstat(1,2)
mu = 0.8862

Compute the hazard function for the exponential distribution with meanmu.

h2 = exppdf(t,mu)./(1-expcdf(t,mu));

Plot both hazard functions on the same axis.

plot(t,h1,“- - -”,t,h2,'--') xlabel('Observation') ylabel('Hazard Rate') legend('weibull','Exponential','location','northwest')

图包含一个坐标轴对象。坐标轴对象有限公司ntains 2 objects of type line. These objects represent Weibull, Exponential.

Related Distributions

  • 指数分布- 指数分布是具有参数的单参数连续分布μ(mean). This distribution is also used for lifetime modeling. Whenb= 1, the Weibull distribution is equal to the exponential distribution with meanμ=a.

  • Extreme Value Distribution— The extreme value distribution is a two-parameter continuous distribution with parametersµ(位置)和σ(scale). IfXhas a Weibull distribution with parametersaandb, then logXhas an extreme value distribution with parametersµ= logaandσ= 1/b. This relationship is used to fit data to a Weibull distribution.

  • Rayleigh Distribution— The Rayleigh distribution is a one-parameter continuous distribution that has parameterb(scale). IfAandB是Weibull分布的参数,然后是带有参数的瑞利分布bis equivalent to the Weibull distribution with parameters A = 2 b andB= 2.

参考

[1] Crowder, Martin J., ed.Statistical Analysis of Reliability Data. Reprinted. London: Chapman & Hall, 1995.

[2] Devroye, Luc.Non-Uniform Random Variate Generation. New York, NY: Springer New York, 1986.https://doi.org/10.1007/978-1-4613-8643-8

[3] Evans, Merran, Nicholas Hastings, and Brian Peacock.Statistical Distributions. 2nd ed. New York: J. Wiley, 1993.

[4] Lawless, Jerald F.Statistical Models and Methods for Lifetime Data. 2nd ed. Wiley Series in Probability and Statistics. Hoboken, N.J: Wiley-Interscience, 2003.

[5] Meeker, William Q., and Luis A. Escobar.Statistical Methods for Reliability Data. Wiley Series in Probability and Statistics. Applied Probability and Statistics Section. New York: Wiley, 1998.

See Also

|||||||||

Related Topics