GARETH GRANTTECHNOLOGY · DATA · INNOVATION
Explore

41 / Quality & reliability

Reliability and survival with censored observations

Survival analysis models time until an event while retaining partial information from units whose event has not yet occurred. It helps estimate reliability, warranty exposure or customer persistence without treating incomplete follow-up as either a failure or permanent success.

AdvancedLive exploration + Python

The business question

What proportion of assets or customers remains failure-free after a specified time?

  • Compare failure-free service duration for equipment cohorts with different lengths of observation.
  • Track time to customer churn or warranty claim using a consistent event and follow-up definition.

How the method works

Each record needs an observed time and an event indicator. A pump that has run for six months when observation stops is right-censored: it is known to survive to six months, not to fail then. The Kaplan–Meier estimator moves downward at observed event times and uses the number still at risk immediately before each event as its denominator.

At each event time, multiply the previous survival estimate by one minus the fraction failing among those still at risk. Censored units leave future risk sets after their last observed time but do not cause a downward jump. Tied event and censoring times need a consistent convention; the example includes units censored at an event time in that time’s risk set before removing them.

Kaplan–Meier is distribution-free within observed follow-up. It does not justify extrapolating a long unobserved tail. Parametric exponential or Weibull models can extrapolate only with additional shape assumptions and model checking. Replacement and warranty decisions also need failure consequences, maintenance costs and operating conditions: a fitted survival curve alone does not identify a profit-maximising maintenance interval.

The calculation

S_hat(t) = product over event times t_j ≤ t of (1−d_j/n_j); F_hat(t) = 1−S_hat(t).
Read the symbols
SymbolMeaning
d_jNumber of observed events at time t_j.
n_jNumber still at risk immediately before that event time, including appropriate tied censored records.
S_hat(t)Estimated probability of remaining event-free beyond time t under the study conditions.

A worked business example

ILLUSTRATIVE SCENARIO

Illustrative pump cohort: six pumps have different event or observation-end times in months.

Inputs

  • Observed times: 2, 3, 4, 4, 5 and 6 months.
  • Event indicators: 1, 0, 1, 0, 1, 0, where 0 means right-censored.

Work through the numbers

  1. At month 2, one event among six at risk gives S = 5/6 = 0.833333.
  2. The month-3 censoring removes a pump from later risk sets without lowering survival.
  3. At month 4, one event among four at risk gives S = (5/6) × (3/4) = 0.625. Remove the tied censored record after evaluating that risk set.
  4. At month 5, one event among the two remaining at risk gives S = 0.625 × 1/2 = 0.3125.
  5. The month-6 censoring produces no additional event-time drop.
The illustrative estimate after the month-5 event is 31.25% event-free survival.

Only two pumps were at risk just before month 5, so tail uncertainty is substantial. The final censored pump is not evidence of a month-6 failure.

Explore the decision

Respect right-censored lifetimes. The live explorer has its own example inputs; it is separate from the worked calculation above.

Enable JavaScript to use this calculator. The worked example and executable Python remain available.

Apply it at work

  1. Define the event, starting point, observation end and operating conditions before combining cohorts.
  2. Record event indicators and follow-up times; examine whether the reasons for censoring relate to likely failure.
  3. Construct risk sets and survival estimates, with uncertainty and clear numbers still at risk.
  4. Use the curve alongside failure costs, maintenance records and sensitivity analysis before changing a service policy.

Check these assumptions

  • Censoring is non-informative for event risk, conditional on relevant information used in the analysis.
  • Units are independent or dependence is addressed in the study design and uncertainty calculation.
  • Event timing, entry time and event definition are recorded consistently.
  • The observed cohort and operating environment are relevant to the decision population.

Common mistakes and how to avoid them

  • Counting every observation-end time as a failure overstates failure risk.
  • A flat tail with few units at risk is not proof of long-term reliability.
  • Different workloads or selective removal of deteriorating assets can invalidate a naive comparison between cohorts.

How this can help the business

  • Preserving censored information can make reliability monitoring more defensible than comparing simple average recorded lifetimes.
  • Risk-set visibility can identify where further follow-up is more valuable than a confident-looking extrapolation.
A decision rule to adapt

Choose a service or warranty action only after examining survival uncertainty, operating comparability and costs; flag tail estimates based on very small risk sets.

When to use another approach

Use Weibull or other parametric survival models for justified extrapolation; use regression survival models when covariates or changing risk must be modelled.

Reproduce the worked example in Python

The code is self-contained for this example. Dependencies and run instructions are included with the downloadable notebook.

Show executable code and recorded output
import numpy as np
times = np.array([2,3,4,4,5,6])
event = np.array([1,0,1,0,1,0])
survival = 1.0
for time in sorted(set(times[event == 1])):
    at_risk = (times >= time).sum()
    failures = ((times == time) & (event == 1)).sum()
    survival = survival * (1-failures/at_risk)
    print("Month",time,"at risk",at_risk,"survival",round(survival,6))
print("Estimated event-free % after month 5:",round(100*survival,2))

Recorded output

Month 2 at risk 6 survival 0.833333
Month 4 at risk 4 survival 0.625
Month 5 at risk 2 survival 0.3125
Estimated event-free % after month 5: 31.25
Download all worked examples

Sources and further reading

Concepts are linked to primary teaching or technical sources. The business examples are illustrative applications, not reported client results.