Performs a curve fit using the two-parameter Weibull distribution (lifetime analysis).
Syntax
WeibullFit(Sample, [ NumberOfRightCensoredValues = 0 ], [ Algorithm = WEIBULLFIT_ALGORITHM_LSE ], [ MLECorrectionFactor = TRUE ], [ MLEMaximumNumberOfIterations = 500n ] [ , MLETolerance = 1e-6 ])
The syntax of the WeibullFit function consists of the following parts:
Part |
Description |
||||||
---|---|---|---|---|---|---|---|
Sample |
The sample from which a lifetime analysis is to be carried out by means of curve fitting using the two-parameter Weibull distribution. The sample consists exclusively of the failed objects with corresponding downtimes in the Y component of the data set. Permitted data structures are Data series und Signal. All real data types are permitted. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||
NumberOfRightCensoredValues |
Number of test objects that have not yet failed by the end of the measurement (and in particular are therefore not included in the sample). Permitted data structures are Scalar value. Supported data types are 16-bit integer, 32-bit integer und 64-bit integer. The value must be greater or equal to 0. If the argument is a list, then the function is executed for each element of the list and the result is also a list. If this argument is omitted, it will be set to the default value 0 . |
||||||
Algorithm |
Specifies which algorithm is to be used for curve fitting using the two-parameter Weibull distribution. The argument Algorithm can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value WEIBULLFIT_ALGORITHM_LSE . |
||||||
MLECorrectionFactor |
Specifies whether a correction factor should be taken into account in the case of maximum likelihood curve fitting. Background: One disadvantage of maximum likelihood parameter estimation is its bias when the sample size is small. To correct this disadvantage, appropriate correction factors (depending on the sample size) can be taken into account. The argument is therefore only used if Maximum Likelihood Parameter Estimation has been selected as the algorithm. Permitted data structures are Scalar value. Supported data types are Boolean value. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value TRUE . |
||||||
MLEMaximumNumberOfIterations |
The maximum likelihood curve fitting of the two-parameter Weibull distribution is solved numerically by searching for zeros. The latter is implemented using fixed-point iteration. The argument specifies the maximum number of iterations to be performed. The argument is therefore only used if Maximum Likelihood Parameter Estimation has been selected as the algorithm. Permitted data structures are Scalar value. Supported data types are 16-bit integer, 32-bit integer und 64-bit integer. The value must be greater or equal to 1. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value 500n . |
||||||
MLETolerance |
The fixed point iteration for parameter determination of the maximum likelihood curve fitting is terminated if the relative value change is smaller than the specified delta. The argument is therefore only used if Maximum Likelihood Parameter Estimation has been selected as the algorithm. Permitted data structures are Scalar value. Supported data types are 64-bit floating point. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value 1e-6 . |
Remarks
As a result of the curve fitting, the fitted parameters α and β of the two-parameter Weibull distribution are output as a list. The continuous probability density f(x) and distribution function F(x) of the Weibull distribution with the parameters α and β (shape parameters) are given by:
Note: in the literature, the characteristic lifetime T is often used as an alternative to the parameter α (and β is denoted by k). The following relation applies here:
The results of the list (i.e. the curve fitting parameters found) can be accessed using the following syntax: result.alpha or result.beta. With the help of the Distribution function can then be used to output the distribution (or a survival plot) of the fitted Weibull distribution (lifetime distribution).
The algorithms for Weibull curve fitting can be described schematically as follows:
Least Squares Algorithm
If the distribution of a Weibull-distributed random variable is plotted in the form log(log(1/(1-F(x)))) = β*log(x) + log(α) in a double logarithmic diagram (Weibull network), the result is a straight line with slope β and y-intercept log(α). Exactly this principle is now used for least squares Weibull curve fitting. The empirical distribution function F_emp serves as an estimator for the distribution of the sample (with Hazen's formula as the calculation mode according to the EmpiricalDistribution function). The slope and y-intercept of log(log(1/(1-F_emp))) are then determined using linear regression analysis. This finally provides estimators for the parameters β and log(α), and thus also for α.
Details can be found in [1, Chapter 13, Section 3.2.1] or [2, Chapter 5, Section 5.1.2.2].
Maximum Likelihood Algorithm
This algorithm is based on the usual maximum likelihood principle, according to which (in simple terms) those parameters α and β are selected as estimates according to whose distribution the realization of the observed data appears most plausible. This can be formulated mathematically equivalent in the form of a maximization problem, according to which the parameters are to be selected in such a way that the so-called log-likelihood function is maximized. Extreme points of the log-likelihood function in turn correspond to zero points of the derivative of the log-likelihood function according to the parameters α and β. In the present case of the two-parametric Weibull distribution, the latter zero determination does not have an analytically closed solution, but can be determined iteratively using numerical equation solvers. A fixed point iteration is used as the numerical equation solver. The fixed-point iteration is terminated if the relative value change of the parameters is smaller than the specified delta (see argument MLETolerance). The maximum number of iterations is determined by the argument MLEMaximumNumberOfIterations. If the maximum number of iterations has been reached and the relative value change has not yet fallen below the specified tolerance value, the algorithm has not converged and a corresponding error message is displayed.
One disadvantage of maximum likelihood parameter estimation is its bias when the sample size is small. To correct this disadvantage, appropriate correction factors (depending on the sample size) can be taken into account (see argument MLECorrectionFactor).
All details can be found in [2, Chapter 5, Section 5.1.2.3] and [3].
Available in
Option Statistics
Examples
WeibullFit(Sample)
Performs a least squares curve fit using the two-parameter Weibull distribution of a sample and returns the α and β parameters found as a list. The sample contains only the failed objects with corresponding failure times in the Y component.
Dim p = WeibullFit(Sample)
Dim x = Series(0, 5*Maximum(Sample), 0.1)
Signal(Distribution(x, DISTRIBUTION_WEIBULL, p.alpha, p.beta), x)
Performs a Weibull curve fit of a sample and calculates the fitted Weibull distribution (lifetime distribution) in the interval [0, 5*Maximum(Sample)].
Dim p = WeibullFit(Sample)
Dim x = Series(0, 5*Maximum(Sample), 0.1)
Signal(1 - Distribution(x, DISTRIBUTION_WEIBULL, p.alpha, p.beta), x)
Performs a Weibull curve fit of a sample and calculates the resulting survival plot in the interval [0, 5*Maximum(Sample)].
WeibullFit(Sample, 7)
As an extension to the first example, the sample is now supplemented by 7 additional units that have not yet failed by the end of the measurement. The lifetime of these additional 7 test specimens is therefore greater than the maximum of all failure times in the Y component of the sample.
WeibullFit(Sample, , WEIBULLFIT_ALGORITHM_MLE)
Performs a maximum likelihood curve fit using the two-parameter Weibull distribution of a sample and returns the α and β parameters found as a list. The sample contains only the failed objects with corresponding failure times in the Y component.
See Also
EmpiricalDistribution Function
References
[1] Hartung, Joachim: Statistik, 9. Auflage. Oldenbourg Verlag GmbH, München, 1993. ISBN 3-486-22055-1.
[2] Wilker, Holger: Weibull-Statistik in der Praxis, 2. Auflage. Books on Demand GmbH, Norderstedt, 2010. ISBN 3-8391-6241-5.
[3] T. Kernane and Z. A. Raizah: Fixed point iteration for estimating the parameters of extreme value distributions. In: Communications in Statistics - Simulation and Computation, Taylor and Francis, Vol. 38, No. 10, Pages 2161-2170. Prentice Hall, 2009.