TL;DR
The Kaplan–Meier estimator answers a simple question: of the things being watched, what fraction are still going at each time? It moves forward through the observed times. At each time something fails, it multiplies the current survival fraction by the fraction of at-risk items that did not fail. Items that leave the study early, which are censored, count as at risk up to the moment they leave, so they are not thrown away.
Where you'll see it: in reliability studies of machine parts, in customer-retention curves, in clinical trial reports (educational explanation only; this is not medical advice), and as the standard first plot in any analysis of time-to-event data.
Intuition
A curve that only moves when something happens
Imagine following 6 light bulbs in a test rig. Some burn out, and you have to stop the test on others before they fail because the rig is needed elsewhere. Those stopped bulbs are censored: you know they lasted at least that long, but not when they would have failed.
A naive plot of "fraction still working" would be wrong if you drop the stopped bulbs. Dropping them throws away the bulbs that were known to survive at least that long, so the failures are compared against a smaller, unluckier group and the curve falls too fast. The fix is to keep the stopped bulbs in the count until they leave, and then to update only at moments when a bulb actually fails.
The survival curve is therefore flat between failures and steps down at each one. The size of each step depends on how many bulbs were still being watched at that moment.
Why a product of ratios
At any failure time, the question is: among the bulbs still being watched just before this moment, what fraction failed right now? If 1 out of 5 watched bulbs failed, the chance a watched bulb survives this moment is 4 out of 5. The survival chance to any later time is the product of these conditional survival chances across all earlier failure times. This is just the chain rule of probability applied to the sequence of moments.
The math
Setup
Let be the distinct times at which at least one event happens. At time :
- is the number at risk: subjects still under observation and not yet failed, just before . This includes those censored at exactly .
- is the number of events (failures) at .
Definition
The Kaplan–Meier estimate of the survival function is
For before the first event, . The estimate is constant between event times and drops at each .
Each factor is the estimated probability of surviving time , given survival up to just before it. The product is the chance of surviving through all the event times up to . Censoring only changes , by removing subjects who have left, so a censored subject contributes to the risk counts until the moment it is censored and then no further.
The median survival time
The estimated median is the smallest with . If the curve never falls to 0.5 within the follow-up period, the median is not estimable and you should say so.
Uncertainty: Greenwood's formula
An approximate variance for is
This is Greenwood's formula. It is reliable when is not small. The standard error is its square root, and the usual confidence intervals are built on a log or log-log transform so that they stay inside .
Why it is a maximum likelihood estimate
The estimator is the nonparametric maximum-likelihood estimate of the survival curve when the censoring does not depend on the outcome. Each factor is the empirical conditional probability of surviving a failure moment, so no distribution shape is assumed. That is the reason the method is called nonparametric.
- Kaplan–Meier estimate, example A
Worked examples
Six subjects are followed. Their times are: 2 (event), 3 (censored), 3 (event), 5 (event), 7 (censored), 8 (event). The censored subject at 3 is still at risk at time 3, so it counts in at that moment.
- At : , . Factor . Survival so far: .
- At : (one left after the failure at 2), (the event; the censored subject does not fail). Factor . Survival: .
- After the at-risk count is : one failed and one was censored.
- At : , . Factor . Survival: .
- After the at-risk count is . At the subject is censored, so the count becomes and the curve does not move.
- At : , . Factor . Survival falls to .
- The median is the first time the curve is at or below : that is , where the estimate is .
- Greenwood's variance at sums the events so far: . Then , and the standard error is about . That is wide, because only six subjects were followed.
- Interpretation: about 44% are estimated to still be going at time 5, with a large uncertainty. The censored subject at 7 did not pull the curve down, but it did shrink the risk set for the last failure.
Five units are tested. Their times are: 1 (event), 1 (event), 2 (censored), 4 (event), 5 (censored).
- At : , . Two units failed together. Factor . Survival: .
- After the at-risk count is .
- At , one unit is censored. The count drops to , but there is no drop in the curve.
- At : , . Factor . Survival: .
- The unit censored at 5 never causes a step. The curve stays at from 4 onward.
- Median: the curve first reaches or below at .
- Greenwood sum at : . Variance , standard error about .
- Interpretation: with two failures at the same moment, the single step is larger than either one would be alone. The tail of the curve rests on only two units at risk, which is why its uncertainty is large.
Tradeoffs and failure modes
The estimator is simple and assumption-light, but it has conditions. Check them before reading the curve as the truth.
| Situation | Problem | Better choice |
|---|---|---|
| Censoring depends on the outcome (for example, the sickest subjects leave first) | Curve is biased in a direction you cannot see | Model the censoring, or report the limitation |
| Very few subjects still at risk late in follow-up | Tail is unstable and its interval is very wide | Report the at-risk count next to the curve and truncate the plot |
| You need to compare two groups formally | Two separate curves do not give a test | Log-rank test on the same data |
| You need predictions beyond the observed range | Curve stops where the data stop | Parametric survival model (Weibull, exponential) with its assumptions stated |
| Many distinct times with one subject each | Works as intended, but the step plot is busy | Keep the plot, or summarise with survival at chosen times |
| Times are recorded coarsely (days, years) | Many ties distort the steps | Accept the approximation or use a method for grouped times |
Practical warnings:
- Do not read the last step as precise. The curve's end depends on a handful of subjects.
- Report the number at risk under the plot. It is the most honest part of the figure.
- The estimate describes this study. It is not a population law unless the sample represents the population.
History
Edward Kaplan and Paul Meier published the estimator in 1958, in the Journal of the American Statistical Association, under the title "Nonparametric Estimation from Incomplete Observations". They were working on how to estimate survival when some observations are incomplete, and they showed that the product of conditional survival fractions is a natural estimator that uses every observation for as long as it is informative.
The variance formula is usually credited to Major Greenwood, who worked on life tables in the 1920s. The method spread quickly through medical statistics and reliability engineering because it needed no distributional assumption and could be computed by hand from a list of times. Its wide use today comes from that simplicity together with the honest handling of censoring.
Check yourself
QuestionWhich subjects in the six-subject example count toward at time 3, and why?Show answer
The subject that failed at time 2 has left the risk set. The censored subject at 3 and the subject who fails at 3 are still under observation just before time 3, so both count toward . The censored subject counts because it was still being watched at that moment; it only leaves the risk set after time 3.
QuestionCompute for the data 2 (event), 3 (censored), 3 (event), 5 (event), 7 (censored), 8 (event).Show answer
The product over event times up to 3 is .
QuestionWhy is it wrong to drop censored subjects from the data before computing the curve?Show answer
Dropping them removes the information that those subjects survived up to their censoring time, so at-risk counts shrink too early. The curve then falls too fast, by an amount that depends on when subjects happened to leave rather than on their actual survival. The censored subject should stay in until its censoring time.
QuestionA study of 40 machine parts reports a Kaplan–Meier curve that reaches 0.5 at time 800 hours, with only 3 parts still under observation after 700 hours. What should you say about the reported median?Show answer
The median is estimated from the data but its uncertainty is large, since only 3 parts were still at risk when the curve crossed 0.5. The right statement is that the median is roughly 800 hours with a wide interval, and the curve after 700 hours rests on very few units. Reporting the at-risk count alongside the curve lets a reader see this.
Sources
- Kaplan and Meier, Nonparametric Estimation from Incomplete Observations (JASA, 1958): https://doi.org/10.1080/01621459.1958.10501452
- Kaplan–Meier estimator (Wikipedia): https://en.wikipedia.org/wiki/Kaplan%E2%80%93Meier_estimator
- Survival analysis (Wikipedia): https://en.wikipedia.org/wiki/Survival_analysis