Kaplan–Meier estimator (source code)

= Kaplan–Meier estimator
{c}
{title2=$\widehat S(t)=\prod_{t_j\leq t}(1-d_j/n_j)$}
{wiki}

At distinct observed event times $t_1<t_2<\cdots$, let $n_j$ be the <risk set> size immediately before $t_j$, and let $d_j$ count events at $t_j$. The <Kaplan–Meier estimator> of the <survival function> is
$$
\widehat S(t)=\prod_{t_j\leq t}\left(1-\frac{d_j}{n_j}\right).
$$
The empty product is one. Each factor estimates a conditional survival <probability> among those still observed and event-free; their product joins the successive steps. This is <nonparametric statistics>: no specified shape for the <survival distribution> is imposed. Use <independent censoring> and the appropriate <risk sets> to interpret the result as an estimate for the intended population.

The <Kaplan–Meier estimator> is a <right-continuous function> with downward jumps at event times. <Right censoring> changes later denominators without causing a jump. A tick on the curve marks <right censoring>, rather than a failure. For a tied group of $d_j$ events, use the one factor $(n_j-d_j)/n_j$; subjects <right-censored> at that recorded time remain in $n_j$ for this factor. The fraction $d_j/n_j$ estimates a <discrete hazard>, not a continuous <hazard function> in inverse-time units. With no <censoring>, the factors telescope to the fraction of the original cohort whose observed <survival times> exceed $t$, the complement of its <empirical distribution function>.

Edward L. Kaplan and Paul Meier published https://doi.org/10.1080/01621459.1958.10501452[Nonparametric Estimation from Incomplete Observations, Journal of the American Statistical Association 53(282), 457–481 (1958)]{ref}. Their paper addresses lifetime estimation when observation ends before failure and explicitly calls attention to the assumption of <independence> between lifetime and potential observation loss. The date 1958 is the original publication year; the publisher's later online-posting date is not the discovery date.

In his https://garfield.library.upenn.edu/classics1983/A1983QS51100001.pdf[1983 Citation Classic recollection]{ref}, Kaplan traces Meier's interest to cancer-duration data in 1952 and his own to the lifetimes of vacuum tubes in undersea telephone-cable equipment a year later. The journal encouraged them to combine their manuscripts. The shared mathematical question was how to estimate a <survival function> when some lifetimes are still running or disappear from observation.