Flora Liu Hardware Engineer

Test2Fail Toolkit

Test-to-failure data in, a reliability report out.

Which life model fits, how sure is the fit, and when do the first units fail?

A test-to-failure run ends with a column of numbers. Turning it into an answer takes the same steps every time, so I put them in one tool.

First page of the generated PDF report: data source, methods, a results table with Weibull parameters, B10, B50, B95 and MTTF, and validation checks.

github.com/floraliu-dev/Test2Fail-Toolkit ↗ · Python · Ships with synthetic sample data only.

Why fit more than one model

Two models can agree on the mean life and still disagree on when the first 10% fail. Field returns come from that early tail, so the tool reports B10 and the fit test alongside MTTF.

Survival curves for one synthetic dataset under Weibull, lognormal and exponential fits. Their MTTFs are within 400 cycles of each other, but the curves differ early in life.
Fig 1 Three fits to one synthetic dataset. The mean lives are close; the early-life curves are not.

I walk through one such dataset in How a product earns confidence.

What it does

  • Fits Weibull, lognormal and exponential by maximum likelihood and picks the best one.
  • Checks the fit with a Kolmogorov–Smirnov test.
  • Puts 95% bootstrap confidence intervals (1,000 resamples) on the Weibull β and η.
  • Predicts B10, B50, B95 and MTTF from 10,000 Monte Carlo samples.
  • Suggests a maintenance interval from a target reliability and cost.
  • Writes every plot and table into one PDF.

Does the model match the data?

A best fit is only the best of three. The tool overlays the fitted CDF on the sample data and on a Monte Carlo sample drawn from the fit, then measures the largest gap between them.

Cumulative distribution of the sample lifetimes, a simulated sample and the fitted model, lying close together.
Fig 2 Sample, simulated and fitted CDFs. A visual check of the fit, not proof that the model is right.

Try it