Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › The Kaplan-Meier Product-Limit Estimator

Exam ASTAM · Kaplan-Meier and Nelson-Aalen · Tutorial 231 of 979

The Kaplan-Meier Product-Limit Estimator

Build and interpret Kaplan-Meier survival estimates by calculating the conditional survival factor at each failure time and multiplying those factors.

Intermediate 11 min read

What You'll Learn

  • Define the Kaplan-Meier product-limit estimator at observed failure times
  • Identify the number at risk and number of failures at each event time
  • Calculate how censoring changes later risk sets without directly changing the estimate
  • Compute the estimated survival probability through a specified time
  • Recognize common risk-set and follow-up-status errors

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.

Definition: Let \(T\) be a nonnegative time to an event, and let \(t_1<t_2<\cdots<t_k\) be the distinct observed failure times. At \(t_j\), let \(n_j\) be the number of individuals at risk immediately before \(t_j\), and let \(d_j\) be the number of observed failures at \(t_j\). The Kaplan-Meier estimate of the survival function is
$$ \widehat{S}_{KM}(t)=\prod_{j:\,t_j\leq t}\left(1-\frac{d_j}{n_j}\right) =\prod_{j:\,t_j\leq t}\frac{n_j-d_j}{n_j}. $$
If there has been no observed failure by \(t\), the product is empty and is defined to equal 1.

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.

Justification: Immediately before \(t_j\), there are \(n_j\) individuals still under observation and \(d_j\) of them fail at \(t_j\). The observed fraction of that risk set that passes the failure time without failing is therefore \((n_j-d_j)/n_j\). If the estimated survival up to just before \(t_j\) is the product of the earlier factors, multiplying by this new fraction updates survival through \(t_j\). Repeating the update at each failure time gives the product-limit formula.

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.

1
Order the observed failure times.
List the distinct event times up to the time at which survival is requested.
2
Construct each risk set.
For every failure time, count individuals still under observation immediately before that time. Remove earlier failures and earlier censorings.
3
Calculate the survival factor.
At \(t_j\), calculate \(1-d_j/n_j\), where \(d_j\) is the number of failures and \(n_j\) the number at risk.
4
Multiply through the requested time.
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

$$ 1-\frac{1}{10}=\frac{9}{10}. $$

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\).

$$ \widehat{S}_{KM}(7) =\frac{9}{10}\cdot\frac{7}{8}\cdot\frac{5}{6} =\frac{315}{480} =\frac{21}{32} =0.65625. $$

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:

$$ \widehat{S}_{KM}(6) =\frac{8}{9}\cdot\frac{5}{6} =\frac{40}{54} =\frac{20}{27} \approx 0.7407. $$

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,

$$ \widehat{S}_{KM}(8) =\frac{8}{9}\cdot\frac{5}{6}\cdot\frac{4}{5} =\frac{16}{27} \approx 0.5926. $$

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\).

$$ \widehat{S}_{KM}(6) =\frac{6}{7}\cdot\frac{4}{5}\cdot\frac{3}{4} =\frac{72}{140} =\frac{18}{35} \approx 0.5143. $$

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 outcomeEffect 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 timeDoes not contribute a factor; is excluded from later risk sets
Censoring after the last failure time being usedDoes not change the product through that failure time
No failures by the requested timeThe 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.
Key takeaway: At each failure time, use the number at risk immediately beforehand and the number of failures then observed. Multiply the corresponding conditional survival factors through the requested time; censorings change subsequent risk sets but do not directly reduce the estimate.

Check Your Understanding

For each problem, identify the risk sets before multiplying. Assume all stated censoring times differ from failure times.

  1. 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\))
  2. 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\))
  3. 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\))
  4. 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\))
  5. 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\))
Clinical Biostats