From Observed Times to Two Survival Estimates
A right-censored observation gives a time and an indicator: the subject either experienced the event at that time or was still event-free when observation ended. To estimate survival from such data, the calculation must distinguish failures from censoring and track how many subjects remain under observation just before each failure time. The same risk sets support both the Kaplan-Meier survival estimate and the Nelson-Aalen cumulative hazard estimate.
The calculations below use a hypothetical study with a common time origin, no delayed entry, and complete observation of each subject until failure or right censoring. We assume censoring is non-informative for the event time: conditional on the information represented by the study, censoring does not select subjects with systematically different future event times. These conditions let the observed risk sets represent the subjects still at risk. A different entry structure or informative censoring requires additional treatment.
The distinction between the estimates is in how they combine the risk-set fractions. Kaplan-Meier multiplies conditional survival factors; Nelson-Aalen adds hazard increments. At a tied failure time, all \(d_j\) failures are handled together using the same risk set \(n_j\). A censoring mark at that time does not count as a failure.
Why the Two Formulas Have These Forms
Among \(n_j\) subjects at risk immediately before \(t_j\), the observed fraction failing at that time is \(d_j/n_j\). The corresponding conditional fraction surviving past that time is \(1-d_j/n_j\). Survival past successive failure times requires surviving each conditional step, so the step factors multiply. This gives the Kaplan-Meier product-limit formula.
The Nelson-Aalen estimate instead accumulates the observed hazard increments \(d_j/n_j\). Thus its increment at \(t_j\) is \(\Delta\widehat H_{NA}(t_j)=d_j/n_j\), and increments are summed over failure times. A censoring time contributes no increment because it records the end of observation, not an observed failure.
For a restricted mean survival time through horizon \(\tau\), the empirical estimate is the area under the Kaplan-Meier curve from time zero to \(\tau\): \(\widehat{\operatorname{RMST}}(\tau)=\int_0^\tau \widehat S_{KM}(t)\,dt\). Between observed failure times the Kaplan-Meier curve is constant, so this integral is a sum of interval widths multiplied by the survival level on each interval.
Worked Example: Constructing Both Estimates From Eight Records
A hypothetical study follows eight subjects from time zero. Their records are: failures at times 1, 1, 2, 4, 4, and 6; censoring at times 2 and 5. Construct the risk sets and calculate the Kaplan-Meier survival and Nelson-Aalen cumulative hazard after every observed failure time.
Method. Sort the distinct failure and censoring times. At each failure time, count everyone still under observation immediately before that time, calculate \(d_j/n_j\), and update both estimates. If a failure and censoring occur at the same time, include the censored subject in that time's risk set, then remove both the failures and censoring from subsequent risk sets.
At time zero, all 8 subjects are at risk. At time 1, two fail, so \(n_1=8\), \(d_1=2\), and 6 remain. At time 2, one of those 6 fails and one is censored. Both are in the risk set immediately before time 2, leaving 4 subjects afterward. At time 4, two of those 4 fail, leaving 2. One is censored at time 5, leaving 1 at risk for the failure at time 6.
| Time | At risk \(n_j\) | Failures \(d_j\) | Censored | Kaplan-Meier after time | Nelson-Aalen increment | Nelson-Aalen cumulative |
|---|---|---|---|---|---|---|
| 1 | 8 | 2 | 0 | \(1(1-2/8)=3/4\) | \(2/8=1/4\) | \(1/4\) |
| 2 | 6 | 1 | 1 | \((3/4)(1-1/6)=5/8\) | \(1/6\) | \(5/12\) |
| 4 | 4 | 2 | 0 | \((5/8)(1-2/4)=5/16\) | \(2/4=1/2\) | \(11/12\) |
| 5 | 2 | 0 | 1 | \(5/16\), unchanged | 0 | \(11/12\) |
| 6 | 1 | 1 | 0 | \((5/16)(1-1/1)=0\) | 1 | \(23/12\) |
For example, the cumulative hazard after time 4 is \(1/4+1/6+1/2=3/12+2/12+6/12=11/12\). The Kaplan-Meier estimate after time 4 is \((6/8)(5/6)(2/4)=3/4\cdot5/6\cdot1/2=5/16\). At time 6, the one remaining subject fails, so the final Kaplan-Meier factor is zero and the estimated survival drops to zero.
Check. After the tied failures at time 4, the risk set falls from 4 to 2. The censoring at time 5 reduces it to 1 before time 6. All eight records are therefore accounted for: six failures and two censorings. The estimates use failures, not censorings, for their time-specific increments.
Reading the Risk Set Correctly When Times Tie
A risk set is a count immediately before a failure time, not a count after removing subjects who leave observation at that same time. This is essential when failures and censoring share a recorded time. With the usual right-censoring convention, subjects censored at \(t_j\) are considered under observation through \(t_j\), and therefore belong in \(n_j\) for failures at \(t_j\). They leave only after those failures have been processed.
The same rule applies when several failures share a time: use one pre-event risk-set count for all of them, and use their total number as \(d_j\). Do not calculate a sequence of separate one-failure fractions at the same time, because that would change the risk set partway through a tied event and produce a different, inappropriate estimate.
Worked Example: A Failure and Censoring at the Same Time
In a separate hypothetical cohort, 10 subjects are at risk immediately before time 3. Two fail at time 3, and one other subject is censored at time 3. Just before time 5, the remaining subjects include 7 at risk; one fails at time 5. Calculate the Kaplan-Meier estimate after time 5 and the Nelson-Aalen cumulative hazard through time 5.
Step 1: Process time 3. The risk set is \(n_1=10\), and the tied failure count is \(d_1=2\). The censoring at time 3 is also in the risk set, but is not included in \(d_1\). The Kaplan-Meier estimate after time 3 is \(1-2/10=8/10=4/5\). The Nelson-Aalen increment is \(2/10=1/5\).
Step 2: Process time 5. The problem states that 7 are at risk immediately before time 5, so use \(n_2=7\) and \(d_2=1\). The Kaplan-Meier factor is \(1-1/7=6/7\), giving \((4/5)(6/7)=24/35\). The Nelson-Aalen increment is \(1/7\), so the cumulative hazard is \(1/5+1/7=7/35+5/35=12/35\).
Answer and check. The Kaplan-Meier estimate after time 5 is \(24/35\), approximately 0.6857; the Nelson-Aalen cumulative hazard is \(12/35\), approximately 0.3429. The risk set at time 5 was supplied directly, so it should not be reconstructed by subtracting only the failures at time 3 and forgetting the censoring there.
Calculating a Restricted Mean From the Estimated Curve
The restricted mean through \(\tau\) is not the area under the Nelson-Aalen curve. It is the area under the Kaplan-Meier survival curve. Between failure times the Kaplan-Meier estimate is flat; censoring times alone do not create a vertical drop. If the horizon lies between failures, use only the portion of the final flat interval up to that horizon.
Worked Example: Restricted Mean Through a Horizon Between Failures
Use the eight-subject study from the first example to calculate the estimated restricted mean survival time through \(\tau=3.5\).
Step 1: Identify the curve levels and interval lengths. The Kaplan-Meier estimate is 1 from time 0 to 1, \(3/4\) from time 1 to 2, and \(5/8\) from time 2 to 4. The horizon 3.5 falls between the failure times 2 and 4, so the final interval contributes only \(3.5-2=1.5\) time units.
Step 2: Add the rectangular areas. The first interval contributes \((1-0)(1)=1\). The second contributes \((2-1)(3/4)=3/4\). The final partial interval contributes \((3.5-2)(5/8)=(3/2)(5/8)=15/16\). Therefore,
Answer and check. The estimated restricted mean is 2.6875 time units. The Kaplan-Meier level used from time 2 onward is \(5/8\), the estimate after the failure at time 2; the later failure at time 4 is beyond the integration horizon and does not affect the area.
Common Exam Trap: Removing a Tied Censor Too Soon
In the first example, a common incorrect calculation at time 2 removes the subject censored at time 2 before forming the risk set. That would use \(n_2=5\) instead of 6, and give the time-2 Kaplan-Meier factor \(1-1/5=4/5\). Combining it with the correct time-1 factor gives \((3/4)(4/5)=3/5\), or 0.6000, after time 2.
The correction is to include the tied censored subject in the risk set at time 2. The proper factor is \(1-1/6=5/6\), so the estimate is \((3/4)(5/6)=5/8=0.6250\). The censoring affects later risk sets, but it is not a failure at time 2. Another error is to treat \(d_j/n_j\) as the Kaplan-Meier survival factor; it is the failure fraction, while the survival factor is \(1-d_j/n_j\).
Check Your Understanding
For each problem, use the stated right-censoring convention and give the requested estimate.
- There are 12 subjects at risk immediately before time 2. Three fail then, with no censoring at that time. What are the Kaplan-Meier estimate after time 2 and the Nelson-Aalen increment? (Answer: \(\widehat S_{KM}=0.7500\); \(\Delta\widehat H_{NA}=0.2500\).)
- There are 9 subjects at risk before time 1. One fails and one is censored at time 1. What is the Kaplan-Meier estimate immediately after time 1, and how many subjects remain at risk afterward? (Answer: \(\widehat S_{KM}=8/9\); 7 subjects remain at risk.)
- A cohort has 8 at risk at time 1, when 2 fail; 6 are then at risk at time 3, when 2 fail. Calculate the Kaplan-Meier estimate and Nelson-Aalen cumulative hazard after time 3. (Answer: \(\widehat S_{KM}=(6/8)(4/6)=0.5000\); \(\widehat H_{NA}=2/8+2/6=7/12\).)
- The Kaplan-Meier estimate is 1 on \([0,2)\), \(3/4\) on \([2,5)\), and \(1/2\) on \([5,7)\). Calculate the restricted mean through time 6. (Answer: \(2(1)+3(3/4)+1(1/2)=19/4=4.7500\) time units.)
- At time 4, 5 subjects are at risk; 2 fail and 1 is censored. At time 6, 2 are at risk and 1 fails. Calculate Kaplan-Meier survival after time 6. (Answer: \((1-2/5)(1-1/2)=3/10=0.3000\).)