Kaplan–Meier survival: formula and time-to-close example

Concept · Time and flow · Measures

Updated

Browse documentation
On this page

Engine 19.0.0rc597 · Reader 9.0.0rc656 · Development snapshot

What does the survival estimate mean?

Kaplan–Meier estimates the share of objects still open at a given age while retaining objects whose final closing time has not yet been observed. An open object contributes evidence up to the analysis cutoff; it is then right-censored, rather than treated as closed or discarded.

In Ghost Observatory, closure includes completed, cancelled and merged. “Survival” means remaining open. The estimate therefore concerns time to any supported closure, rather than successful completion alone.

The method does not assume a normal, lognormal or other fitted duration distribution. Its steps come from observed closure ages and the objects still under observation at those ages.

The product-limit formula

Ŝ(t) = ∏tj ≤ t (1 − dj / nj)

At closure age tj, dj objects close and nj remain under observation immediately before it. Multiply the successive fractions remaining open.

The Engine groups equal ages. Objects censored at an age shared with a closure remain in that age's denominator, then leave before the next age. A censor alone changes the later denominator without lowering survival at its own age.

The estimated median time to close is the first age at which survival reaches one half or less. The implementation allows an absolute numerical tolerance of 10−12 when testing that crossing.

A worked example with twelve objects

Ten objects close at ages 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11 days. Two remain open at the cutoff, having reached ages 1 and 8 days. Apply the product-limit formula to these closure and censoring ages.

Selected steps of the resulting survival estimate
AgeUnder observation before stepClosuresCensorsShare still open after step
1 day12011
2 days111010/11 ≈ 90.91%
6 days7106/11 ≈ 54.55%
7 days6105/11 ≈ 45.45%
8 days5114/11 ≈ 36.36%

Survival first crosses one half at 7 days. Seven days equals 604,800 seconds. By comparison, the ordinary median of the ten closed durations is 6.5 days. The two calculations use different information.

Which objects enter the model?

The model pools eligible top-level process objects in one analysis scope. It needs usable identity, ranked events, a known lifecycle state and a complete temporal envelope. Child objects, unknown outcomes and unusable clocks do not enter.

Objects that began before a bounded window are excluded because the window cuts their history. Those beginning inside it and remaining open at its end are censored there. The cutoff is windows.as_of_ts: the declared end, or the latest admitted data instant when no end is declared.

Publication and interpretation

windows.time_to_close_median_sec requires at least min_traces objects, default five, and at least five observed closures. It remains empty if the curve never reaches one half. These publication floors are product rules; they do not prove that the observations are representative.

The Reader's Overview displays the published median. The same internal model supplies remaining-time estimates and due-date risk. This result contract does not publish the full survival curve as a separate table.

Kaplan and Meier's original method assumes a suitable relationship between censoring and the lifetime being measured. Missing histories that depend on whether work is difficult or slow can undermine that assumption. The Engine's evidence checks do not test it, and future work may differ from the observed scope.

Primary references

The mathematical method and censoring assumption are described in Kaplan and Meier's Nonparametric Estimation from Incomplete Observations (1958). NIST gives a worked product-limit calculation.

Related: observed lead time, ordinary percentiles and time and flow.

Survival analysis beyond process completion

A survival function describes the probability of remaining beyond a given time before a defined event occurs. The event could be an equipment failure or the closure of a work object; the analyst must define it before fitting the curve. The word “survival” names the mathematical method, not necessarily a biological outcome.

For an object that is still open when observation ends, you know its duration is at least its current age. Right censoring preserves that information without assigning a made-up closing time. Compare the estimator with ordinary percentiles when deciding whether a completed-only summary answers your question.