Method · Statistics Library

Weibull reliability (life-data) fit

This fits a two-parameter Weibull distribution to complete (uncensored) failure times by maximum likelihood, reporting the shape and scale parameters, the mean time to failure, reliability at any age, the B10 life, and whether the hazard is decreasing (infant mortality), constant (random), or increasing (wear-out).

Topic indexA reference reading outside the guided chapter sequence

Understand the idea

Weibull analysis is the standard tool in reliability engineering for describing how long units last before failing. It is built around two numbers: the SCALE (called the characteristic life) is roughly a typical failure age (specifically, the age by which about 63.2% of units have failed). The SHAPE tells a completely different story: how the failure RISK changes as units age.

The shape parameter is the whole story behind the famous 'bathtub curve' of failure risk over a product's life. A shape below 1 means the risk of failure DECREASES with age: classic infant mortality, where units that survive early defects tend to keep surviving (think of manufacturing defects showing up early). A shape near 1 means the risk stays CONSTANT regardless of age: purely random failures with no memory of how old the unit is. A shape above 1 means the risk INCREASES with age: wear-out, where things genuinely age and become more likely to fail the older they get.

A very practical output is the B10 life: the age by which 10% of the population is expected to have failed, a standard warranty and design benchmark in industry. This fit assumes every unit's failure time was fully observed: if any units were still running when your test or observation period ended, this simple version is the WRONG tool, and the censored version is needed instead.

A Weibull reliability fit is the most common tool of life-data analysis. The MTTF, mean time to failure, is the average lifetime implied by the fitted distribution.

Practitioner explanation

By default ('Fix location at 0' on) KernelStats fits the standard 2-parameter Weibull by exact maximum likelihood with the location fixed at 0, using its own solver rather than a general-purpose optimizer: the shape is the root of the profile score equation (found by a Newton iteration kept inside a sign bracket, converged to a relative change of 1e-12), and the scale then follows in closed form, eta = (mean of t^beta)^(1/beta). scipy's weibull_min.fit(t, floc=0) fits the same model but stops about one part in a million short, which is visible at four decimals for large failure times, so it is not used for this fit. Turning 'Fix location at 0' off gives a 3-parameter fit (free location, or threshold) from scipy.stats.weibull_min.fit(t); the card then raises a boundary_hit warning when the fitted location reaches 97% or more of the smallest observed failure time, the boundary where the 3-parameter likelihood can become unbounded (a well-documented degenerate MLE), and advises preferring the 2-parameter fit rather than reporting the estimates as trustworthy. MTTF = eta*Gamma(1+1/beta) and B_p life = eta*[-ln(1-p)]^(1/beta), each plus the location for a 3-parameter fit; B1, B10 (the standard warranty metric) and B50 (equal to the median life) are reported directly. Rows with a blank failure time are dropped and counted on the card.

A Kolmogorov-Smirnov goodness-of-fit test against the fitted Weibull distribution is computed and reported alongside the Weibull probability plot. Because beta and eta are estimated from the same sample, the textbook KS p-value would be far too large (the Lilliefors problem), so for the 2-parameter fit KernelStats calibrates the p-value against a seeded Monte Carlo reference (the null distribution of D is parameter-free for the 2-parameter MLE); no calibrated p-value is claimed for the 3-parameter fit, which is judged from the probability plot (which linearizes the CDF: ln[-ln(1-F)] against ln(t) should trace a straight line if the Weibull model is appropriate), giving both a quantitative and a visual check of model adequacy rather than either alone.

This module is EXPLICITLY scoped to COMPLETE (uncensored) data only: every unit's exact failure time must be observed. The product states directly that censored-data MLE (units still running at test end) is OUT OF SCOPE for this function specifically, and directs the analyst to the dedicated censored Weibull fit instead; running this uncensored version on data that actually contains survivors would silently understate the characteristic life and B-lives, since it would be fitting the distribution of only the shorter observed lives rather than the true population.

When to use it

Consider it when

You have a complete set of failure/life times (every unit's exact failure age was observed, with no units still running or removed unfailed) and want to model reliability, mean time to failure, and B-life warranty metrics.

Use caution when

ANY unit in the dataset did not fail (was still running, removed, or lost to follow-up): use the censored Weibull fit instead; dropping or excluding those units here would understate the characteristic life and B-lives, since it fits the distribution of only the shorter lives that happened to be observed as complete failures.

Formulas and symbols

Weibull reliability (survival) function

R(t)=exp⁡ ⁣[−(tη)β]R(t) = \exp\!\left[-\left(\dfrac{t}{\eta}\right)^{\beta}\right]

eta the scale (characteristic life); beta the shape parameter controlling how the hazard changes with age.

Mean time to failure

MTTF=η Γ ⁣(1+1β)\text{MTTF} = \eta\,\Gamma\!\left(1+\dfrac{1}{\beta}\right)

Gamma the gamma function; eta the scale parameter, beta the shape parameter.

Bp life (quantile of the failure distribution)

Bp=η [−ln⁡(1−p)]1/βB_p = \eta\,[-\ln(1-p)]^{1/\beta}

The age by which fraction p of the population is expected to have failed; B10 (p=0.10) is a standard warranty/design metric.

Assumptions and checks

  • If the Weibull distribution genuinely does not fit the failure-time data well, the shape and scale parameters, and every downstream reliability number computed from them (percentiles, hazard rate, MTTF), describe a distribution the data don't actually follow.

    In KernelStats: Kolmogorov-Smirnov goodness-of-fit test with a Monte Carlo-calibrated p-value (2-parameter fit only; the 3-parameter fit reports D without a p-value), with a tied-value caveat when times are duplicated, plus the Weibull probability plot.

  • Independence of observations. If units do not fail independently from one common Weibull population (e.g. a batch effect, or more than one failure mode mixed together), the single fitted shape/scale pair describes a blend that may not represent any real failure mode well.

    In KernelStats: Not checked by KernelStats: assumed from the study design; stated directly as a standing 'Independent, identically distributed failure times' reminder.

  • This fit assumes every unit's exact failure time was observed; if some units were still running (censored) when the study ended, treating them as if they failed at the last-observed time, or dropping them, biases the fitted parameters, typically toward underestimating the true lifetime.

    In KernelStats: Not checked by KernelStats for this function: right-censoring is out of scope here; use Censored Weibull Reliability (Life-Data) Fit when some units did not fail before the study ended.

Alternatives

  • Censored Weibull Reliability (Life-Data) Fit. Any unit's failure time is right-censored (still running at test end, or removed before failing): the correct maximum-likelihood treatment for that partial information.
  • Distribution Fitting. You want to compare Weibull against other candidate distributions (lognormal, exponential, gamma, normal) by AIC rather than committing to Weibull specifically.

Worked example

Scenario

Fitting complete failure times for 45 bearings, all of which were run to failure.

Result

Shape beta = 2.4 (wear-out regime), scale eta = 18,200 cycles; MTTF = 16,130 cycles; B10 life = 7,130 cycles.

Interpretation

A shape above 1 confirms these bearings genuinely wear out with age rather than failing randomly, and the B10 life gives a concrete, actionable warranty benchmark: 10% of bearings are expected to have failed by 7,130 cycles, informing a maintenance or replacement schedule.

Common misconceptions

Misconception

If some units in a life test are still running at the end, you can just drop those rows and fit Weibull on the completed failures only.

Correction

Dropping units that were still running (right-censored) fits the distribution of the SHORTER lives you happened to observe as complete failures, not the true population distribution. In a typical life test the survivors are the LONGEST-running units, so this understates the characteristic life and the B-lives; a censored unit is not a missing value and should never be deleted; use the dedicated censored Weibull fit instead.

Misconception

A Weibull shape parameter near 1 means the units are unusually reliable.

Correction

A shape near 1 specifically means the hazard rate is roughly CONSTANT with age: failures are random and memoryless (the exponential regime), which says nothing directly about how reliable the units are overall. Reliability at a given age is read from R(t) and the characteristic life eta, not from the shape parameter alone; the shape only describes the PATTERN of how risk changes over time.

References

  1. A statistical distribution function of wide applicability, Weibull, W. (1951), Journal of Applied Mechanics, 18(3), 293-297.
  2. Statistical Methods for Reliability Data, Meeker, W. Q. and Escobar, L. A. (1998).