Why the Kaplan-Meier Estimator Is Needed
A right-censored observation tells us that an event time exceeds the observed follow-up time, but does not reveal the exact event time. Treating the censoring time as if the event occurred there would distort an empirical survival estimate. The Kaplan-Meier estimator uses the observed failures while accounting for how censoring reduces the number of individuals who remain under observation.
The key calculation is local: at each observed failure time, compare the number of failures with the number at risk just before that time. The estimated survival through a time \(t\) is the product of the resulting conditional survival factors for all failure times up to \(t\). This is why the method is called a product-limit estimator.
Here, “at risk immediately before \(t_j\)” means that the individual has not yet failed and has not been censored before \(t_j\). A failure at \(t_j\) is included in \(d_j\), while an individual censored before \(t_j\) is no longer included in \(n_j\). A censored observation does not itself create a failure factor: it changes the risk set for later event times.
The estimator is used for right-censored data under an appropriate noninformative-censoring assumption: conditional on the information used to define the study, censoring should not selectively hide different event-time prospects. This is the setting in which the observed individuals still at risk can represent those whose event times are not yet observed. The estimator does not recover an event time for a censored individual.
How the Product-Limit Calculation Works
At a failure time \(t_j\), the observed fraction of the risk set that does not fail is \((n_j-d_j)/n_j\). The estimator uses that fraction as the survival factor for that interval. Multiplying the factors carries the estimated probability of surviving through successive observed failure times.
This justification explains both parts of the calculation. The factor is based on failures among those still at risk, not on the original sample size. And a censoring time contributes no factor, because censoring is not an observed event; it only changes who is available for later comparisons.
List the distinct event times up to the time at which survival is requested.
For every failure time, count individuals still under observation immediately before that time. Remove earlier failures and earlier censorings.
At \(t_j\), calculate \(1-d_j/n_j\), where \(d_j\) is the number of failures and \(n_j\) the number at risk.
Include factors for failures at or before \(t\). Censorings alone do not add factors.
Worked Calculations
Worked Example: Updating the Risk Set After Censoring
A hypothetical follow-up study begins with 10 units. Failures are observed at months 1, 4, and 7. One other unit is censored at month 3, and another is censored at month 6. The remaining five units are all censored after month 7. Estimate survival through month 7.
Method. Apply the Kaplan-Meier product-limit estimator. Each failure time contributes a factor, and censorings before later failures reduce the later risk sets.
At month 1, all 10 units are at risk, and one fails. Thus \(n_1=10\), \(d_1=1\), and the factor is
At month 4, the month-1 failure and the unit censored at month 3 are no longer at risk. Therefore \(n_2=10-1-1=8\). One unit fails, so the factor is \(1-1/8=7/8\).
At month 7, subtract from the original 10 the failures at months 1 and 4 and the censorings at months 3 and 6. Thus \(n_3=10-2-2=6\). One unit fails, so the factor is \(1-1/6=5/6\).
Rounded to four decimal places, the estimate is \(0.6563\). Check: each factor is between 0 and 1, so the product is at most 1 and below the first factor. The censorings do not appear as factors, but both reduce the number at risk at a later failure time. A common mistake is to use \(10\) as the denominator at all three failures; that would ignore who had already failed or been censored.
Worked Example: Estimating Survival at Two Requested Times
A hypothetical study starts with nine units. One fails at month 2, one is censored at month 3, one is censored at month 4, one fails at month 5, and one fails at month 8. The remaining four units are censored after month 8. Calculate the Kaplan-Meier estimates at months 6 and 8.
Method. Calculate each risk set from all earlier outcomes, then include only failure factors at or before the requested time.
At month 2, \(n_1=9\) and \(d_1=1\), giving the factor \(8/9\). At month 5, the month-2 failure and the two censorings at months 3 and 4 have left the risk set. Hence \(n_2=9-1-2=6\), with \(d_2=1\), giving the factor \(5/6\).
Month 6 is after the month-5 failure but before the month-8 failure. Therefore the estimate at month 6 includes only the first two factors:
At month 8, the month-5 failure has also left the risk set, so \(n_3=6-1=5\). One unit fails at month 8, giving the factor \(4/5\). Therefore,
Rounded to four decimal places, the estimates are \(0.7407\) at month 6 and \(0.5926\) at month 8. Check: the month-8 estimate is lower because it includes an additional factor below 1. A common mistake is to include the month-8 failure factor when estimating survival at month 6; the product includes only failure times at or before the requested time.
Worked Example: Several Earlier Exits Before a Later Failure
A hypothetical sample has seven units. One fails at month 2, one is censored at month 3, one fails at month 4, and one fails at month 6. The remaining three units are censored after month 6. Estimate survival through month 6.
Method. Calculate risk sets sequentially. An earlier failure and an earlier censoring each remove one unit from later risk sets, but only failures create product factors.
At month 2, all seven units are at risk, so \(n_1=7\), \(d_1=1\), and the factor is \(6/7\).
At month 4, the failure at month 2 and the censoring at month 3 have both occurred. Thus \(n_2=7-1-1=5\). One unit fails, giving the factor \(4/5\).
At month 6, the two earlier failures and the one earlier censoring have left four units at risk: \(n_3=7-2-1=4\). One fails, giving the factor \(3/4\).
Rounded to four decimal places, the estimate is \(0.5143\). Check: the risk sets decrease from 7 to 5 to 4, consistent with the three earlier exits before month 6. A common mistake is to omit the month-3 censoring when finding the month-4 risk set, which would use a denominator that is too large and produce the wrong product.
What Censoring Does—and Does Not Do
A censoring observation has two distinct roles. It contributes evidence that the event time exceeds the censoring time, but it does not identify an event at that time. In the product-limit calculation, this means the censoring observation is removed from risk sets after its censoring time, but it does not generate a survival factor at the censoring time.
For example, if a unit is censored at month 3 and the next failure is at month 5, that unit is not counted in the month-5 risk set. If the censoring is after the last failure of interest, it does not change any factor in the estimate through that last failure. It still matters to the observed follow-up, but not to a product factor already calculated.
| Observed outcome | Effect on the Kaplan-Meier calculation |
|---|---|
| Failure at \(t_j\) | Counts in \(d_j\), contributes a factor, and is removed from later risk sets |
| Censoring before a later failure time | Does not contribute a factor; is excluded from later risk sets |
| Censoring after the last failure time being used | Does not change the product through that failure time |
| No failures by the requested time | The empty product equals 1 |
The estimator is nonincreasing: each included factor satisfies \(0\leq 1-d_j/n_j\leq 1\). It stays unchanged between observed failure times because no new factor enters the product there. This basic behavior is useful when checking a calculation, but the estimator should not be interpreted as proof that no events occur after the last observed failure. If follow-up ends, the data may provide limited information about later survival.
Common Exam Traps
- Using the starting sample size for every denominator. The denominator is \(n_j\), the number at risk immediately before that specific failure time, not the original number enrolled.
- Counting censoring as failure. A censoring time does not add a factor such as \((n_j-1)/n_j\). It only removes that individual from later risk sets.
- Forgetting earlier censorings. A unit censored before a later failure is not at risk at that later time, even though its event status is unknown.
- Including a future failure factor. To estimate survival at \(t\), include factors only for failure times \(t_j\leq t\).
- Assuming unspecified follow-up status. A risk set cannot be reconstructed if the problem does not say whether other units remain under observation or are censored before the failure time in question. State what is known rather than silently assuming it.
Check Your Understanding
For each problem, identify the risk sets before multiplying. Assume all stated censoring times differ from failure times.
- A hypothetical study begins with eight units. One fails at month 2, one is censored at month 4, and one fails at month 5. The remaining five units are censored after month 5. Find the estimate through month 5. (Answer: \(35/48\approx0.7292\))
- Ten units enter follow-up. One fails at month 1; two are censored at months 3 and 4; one fails at month 6. The remaining six units are censored after month 6. Find survival through month 6. (Answer: \(27/35\approx0.7714\))
- Seven units are followed. One fails at month 2, one is censored at month 3, one fails at month 4, and one fails at month 6. The remaining three units are censored after month 6. Find survival through month 6. (Answer: \(18/35\approx0.5143\))
- Eight units are followed. Failures occur at months 1, 3, and 5; censorings occur at months 2 and 4; the remaining three units are censored after month 5. Calculate survival through month 5. (Answer: \(35/64\approx0.5469\))
- Ten units enter follow-up. Failures occur at months 1, 3, and 6, and one unit is censored at month 4. The remaining six units are censored after month 6. Find survival through month 6. (Answer: \(24/35\approx0.6857\))