Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Exact Relationship Between Kaplan-Meier and Nelson-Aalen

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

Exact Relationship Between Kaplan-Meier and Nelson-Aalen

Learn how the logarithm of the Kaplan-Meier product is formed from failure-to-risk-set ratios, and when that exact relationship is defined.

Intermediate 10 min read

What You'll Learn

  • Define the Kaplan-Meier and Nelson-Aalen contributions at each distinct failure time
  • Derive the exact logarithmic identity connecting the two estimators
  • Account for tied failures and changing risk sets after censoring
  • Calculate both estimates and check their relationship step by step
  • Recognize why the logarithmic identity fails as a finite expression when every person at risk fails
  • Avoid treating the Nelson-Aalen cumulative hazard as the negative logarithm of Kaplan-Meier survival

Why Relate the Two Estimates?

The Kaplan-Meier estimate records survival through a product of conditional survival factors. The Nelson-Aalen estimate records cumulative hazard through a sum of failure-to-risk-set ratios. These are different ways to accumulate information across event times. Taking the logarithm of the Kaplan-Meier product reveals an exact algebraic relationship between the two constructions, while also showing precisely why their accumulated values are not generally identical.

This relationship is useful when checking calculations, interpreting the contributions from individual event times, and identifying a boundary case where a logarithm is not finite. The identity is algebraic; it does not require a new probability model beyond the assumptions used to interpret Kaplan-Meier and Nelson-Aalen as estimators.

Definition: Suppose distinct observed failure times up to time \(t\) are \(t_1,\ldots,t_k\). At time \(t_j\), let \(n_j\) be the number at risk immediately before the failures are counted, and let \(d_j\) be the number of failures at that time. The Kaplan-Meier estimate is $$ \widehat S_{\mathrm{KM}}(t)=\prod_{j=1}^{k}\left(1-\frac{d_j}{n_j}\right), $$ and the Nelson-Aalen cumulative hazard estimate is $$ \widehat H_{\mathrm{NA}}(t)=\sum_{j=1}^{k}\frac{d_j}{n_j}. $$

These formulas use the same event times and the same risk-set quantities. A tied group of failures contributes one factor to the Kaplan-Meier product and one increment to the Nelson-Aalen sum; it is not split into an arbitrary sequence of individual failures. Censorings affect later risk sets, but a person censored at a failure time is included in the risk set used for that time's failure calculation, under the usual convention for censorings recorded at the event time.

For the estimates to have their usual survival-analysis interpretation, observations are right-censored and the censoring mechanism is non-informative for the failure process, subject to the study's modeling assumptions. The exact algebra below only requires that the same \(n_j\) and \(d_j\) be used in both estimates. For a positive finite logarithm, it additionally requires \(d_j<n_j\) at every included failure time.

Deriving the Exact Logarithmic Identity

Write the failure fraction at time \(t_j\) as \(q_j=d_j/n_j\). Each Kaplan-Meier factor is \(1-q_j\). When every factor is positive, the logarithm of a product is the sum of the logarithms of its factors:

$$ \begin{aligned} \log \widehat S_{\mathrm{KM}}(t) &=\log\left\{\prod_{j=1}^{k}(1-q_j)\right\}\\ &=\sum_{j=1}^{k}\log(1-q_j)\\ &=\sum_{j=1}^{k}\log\left(1-\frac{d_j}{n_j}\right). \end{aligned} $$

Negating this equation gives a useful exact form for the cumulative amount on the logarithmic scale. The Nelson-Aalen estimator, by contrast, sums the failure fractions themselves:

$$ -\log \widehat S_{\mathrm{KM}}(t) =\sum_{j=1}^{k}-\log\left(1-\frac{d_j}{n_j}\right), \qquad \widehat H_{\mathrm{NA}}(t) =\sum_{j=1}^{k}\frac{d_j}{n_j}. $$

Thus the exact relationship is a sum of transformed event-time contributions. Each Kaplan-Meier contribution to the negative log survival estimate is \(-\log(1-d_j/n_j)\); each Nelson-Aalen increment is \(d_j/n_j\). These expressions are not the same contribution in general. In particular, it is incorrect to replace the logarithmic term with the failure fraction as an exact identity.

1
Set the event-time risk sets.
For each distinct failure time, record \(n_j\) immediately before failures and \(d_j\) tied failures.
2
Form both event-time contributions.
Use \(1-d_j/n_j\) as the Kaplan-Meier factor and \(d_j/n_j\) as the Nelson-Aalen increment.
3
Accumulate, then take logs if needed.
Multiply the Kaplan-Meier factors, sum the Nelson-Aalen increments, and apply the logarithm-of-a-product identity when all factors are positive.

Worked Calculations

Worked Example: Two Failure Times with Intermediate Censoring

A hypothetical study begins with 12 subjects. At the first failure time, 3 fail. Before the second failure time, 2 of the remaining subjects are censored; at the second failure time, 1 subject fails. Calculate both estimates through the second failure time and verify the exact logarithmic identity.

Method and risk sets. At the first failure time, \(n_1=12\) and \(d_1=3\). After these failures, \(12-3=9\) subjects remain. Two are censored before the next failure time, so \(n_2=9-2=7\), with \(d_2=1\). The intermediate censoring changes the second risk set but is not a failure contribution.

Kaplan-Meier estimate. The two factors are \(1-3/12=9/12=3/4\) and \(1-1/7=6/7\). Therefore

$$ \widehat S_{\mathrm{KM}} =\frac{3}{4}\cdot\frac{6}{7} =\frac{18}{28} =\frac{9}{14} \approx 0.6429. $$

Nelson-Aalen estimate. Its two increments are \(3/12=1/4\) and \(1/7\), giving

$$ \widehat H_{\mathrm{NA}} =\frac{1}{4}+\frac{1}{7} =\frac{7+4}{28} =\frac{11}{28} \approx 0.3929. $$

Logarithmic check. Applying the log identity to the two factors gives

$$ \log\widehat S_{\mathrm{KM}} =\log\left(\frac{3}{4}\right)+\log\left(\frac{6}{7}\right) \approx -0.287682-0.154151 =-0.441833. $$

Thus \(-\log\widehat S_{\mathrm{KM}}\approx0.441833\), while \(\widehat H_{\mathrm{NA}}\approx0.392857\). The product check gives \(9/14\approx0.6429\), as above. The common mistake avoided here is using 9, rather than 7, as the second risk set: the two intervening censorings must be removed before the second failure time.

Worked Example: Tied Failures and Censorings at an Event Time

In a hypothetical follow-up, 15 subjects are at risk immediately before the first failure time. Three fail at that time, and 2 additional subjects are recorded as censored at that same time. At the next failure time, 2 of the remaining subjects fail. A final failure time has 1 failure among the remaining subjects, with no intervening censorings. Find both estimates through the third failure time and verify their logarithms.

Risk sets. At the first time, \(n_1=15\), \(d_1=3\). The two censorings at that time are included in the risk set for its failures. After the failures and censorings, \(15-3-2=10\) remain, so \(n_2=10\), \(d_2=2\). After the second failures, \(10-2=8\) remain, so \(n_3=8\), \(d_3=1\).

Kaplan-Meier estimate. The factors are \(12/15=4/5\), \(8/10=4/5\), and \(7/8\). Hence

$$ \widehat S_{\mathrm{KM}} =\frac{4}{5}\cdot\frac{4}{5}\cdot\frac{7}{8} =\frac{112}{200} =\frac{14}{25} =0.5600. $$

Nelson-Aalen estimate. The corresponding increments are \(3/15=1/5\), \(2/10=1/5\), and \(1/8\). Therefore

$$ \widehat H_{\mathrm{NA}} =\frac{1}{5}+\frac{1}{5}+\frac{1}{8} =\frac{8+8+5}{40} =\frac{21}{40} =0.5250. $$

Logarithmic check. Using the three Kaplan-Meier factors separately,

$$ \log\widehat S_{\mathrm{KM}} =2\log\left(\frac{4}{5}\right)+\log\left(\frac{7}{8}\right) \approx 2(-0.223144)-0.133531 =-0.579819. $$

The direct check is \(\log(14/25)\approx-0.579819\), so the event-time sum agrees with the log of the product. The risk-set check also agrees: the first two censorings reduce the next risk set from 12 to 10 after the three failures. The common mistake avoided is removing those censorings before calculating the first event-time ratio.

Worked Example: Reconstructing Survival from Event-Time Contributions

A hypothetical study has 20 subjects at risk at the first failure time, where 4 fail. Two subjects are censored before the next failure time, where 2 fail. Three more are censored before a third failure time, where 1 fails. Calculate the Kaplan-Meier estimate from its factors, the Nelson-Aalen estimate, and the exact negative-log sum.

Risk sets and factors. The first risk set is \(n_1=20\), \(d_1=4\), giving factor \(16/20=4/5\). After the first failures and 2 censorings, \(20-4-2=14\) are at risk at the second time, with \(d_2=2\) and factor \(12/14=6/7\). After the second failures and 3 more censorings, \(14-2-3=9\) are at risk at the third time, with \(d_3=1\) and factor \(8/9\).

Kaplan-Meier estimate.

$$ \widehat S_{\mathrm{KM}} =\frac{4}{5}\cdot\frac{6}{7}\cdot\frac{8}{9} =\frac{192}{315} =\frac{64}{105} \approx 0.6095. $$

Nelson-Aalen estimate. The increments are \(4/20=1/5\), \(2/14=1/7\), and \(1/9\). Their sum is

$$ \widehat H_{\mathrm{NA}} =\frac{1}{5}+\frac{1}{7}+\frac{1}{9} =\frac{63+45+35}{315} =\frac{143}{315} \approx 0.4540. $$

Exact negative-log check.

$$ -\log\widehat S_{\mathrm{KM}} =-\log\left(\frac{4}{5}\right) -\log\left(\frac{6}{7}\right) -\log\left(\frac{8}{9}\right) \approx 0.223144+0.154151+0.117310 =0.494605. $$

Directly, \(-\log(64/105)\approx0.494605\), confirming the calculation. The Nelson-Aalen sum is \(0.4540\), not \(0.4946\): it adds the three ratios, whereas the exact negative-log identity adds the three transformed factors. This example also checks that each censoring adjustment is made before forming the next risk set.

Boundary Case and Common Exam Trap

If \(d_j=n_j\) at some failure time, every subject in that risk set fails. The corresponding Kaplan-Meier factor is zero, so \(\widehat S_{\mathrm{KM}}(t)=0\) from that time onward. Its logarithm is not a finite real number. The Nelson-Aalen increment at that time is \(d_j/n_j=1\), which is finite. Therefore the displayed logarithmic identity applies as a finite equality only when \(d_j<n_j\) at every included failure time. In the all-fail case, the log survival is understood as tending to negative infinity, not as an ordinary finite sum.

Common mistake. A tempting but incorrect shortcut is to claim that \(-\log\widehat S_{\mathrm{KM}}=\widehat H_{\mathrm{NA}}\), or equivalently to recover the Kaplan-Meier estimate by exponentiating the negative Nelson-Aalen estimate. For the first worked example, that shortcut would give \(-\log\widehat S_{\mathrm{KM}}=11/28\approx0.3929\). The actual value is \(-\log(9/14)\approx0.4418\). The correction is to use the exact event-time transformation:

$$ -\log\widehat S_{\mathrm{KM}} =\sum_j-\log\left(1-\frac{d_j}{n_j}\right), \quad\text{not}\quad \sum_j\frac{d_j}{n_j}. $$

The distinction matters in calculations and interpretation: one estimate is built from multiplicative survival factors and the other from additive hazard increments. The exact logarithmic identity connects them without making their accumulated values interchangeable.

Key takeaway: At each failure time, Kaplan-Meier uses \(1-d_j/n_j\), while Nelson-Aalen uses \(d_j/n_j\). When all Kaplan-Meier factors are positive, the logarithm of the product is exactly the sum of the logarithms of those factors. It is not, in general, the negative of the Nelson-Aalen sum.

Check Your Understanding

For each problem, use the risk set immediately before each failure time and distinguish the Kaplan-Meier factor from the Nelson-Aalen increment.

  1. A hypothetical group has 8 subjects at risk at the first failure time, where 2 fail. One subject is censored before the next failure time, where 1 of the remaining subjects fails. Find both estimates through the second failure time. (Answer: \(\widehat S_{\mathrm{KM}}=0.6000\), \(\widehat H_{\mathrm{NA}}=0.4500\), and \(-\log\widehat S_{\mathrm{KM}}\approx0.5108\).)
  2. At a first event time, 18 subjects are at risk and 3 fail. Three others are censored before the next event time, where 2 of the remaining subjects fail. Find both estimates and the negative-log identity sum. (Answer: \(\widehat S_{\mathrm{KM}}=25/36\approx0.6944\), \(\widehat H_{\mathrm{NA}}=1/3\approx0.3333\), and \(-\log\widehat S_{\mathrm{KM}}=2\log(6/5)\approx0.3646\).)
  3. At the first failure time, 10 subjects are at risk and 2 fail. Two are censored before the second time, where 1 fails; at a third time, 2 of the 5 remaining subjects fail. Calculate the estimates and check the product. (Answer: \(\widehat S_{\mathrm{KM}}=0.4000\), \(\widehat H_{\mathrm{NA}}=23/30\approx0.7667\), and \(-\log\widehat S_{\mathrm{KM}}\approx0.9163\).)
  4. At a first time, 5 subjects are at risk and 2 fail. At the next failure time, all 3 remaining subjects fail. State the Kaplan-Meier estimate, the Nelson-Aalen cumulative hazard estimate, and what happens to the finite logarithmic identity. (Answer: \(\widehat S_{\mathrm{KM}}=0\), \(\widehat H_{\mathrm{NA}}=2/5+1=1.4\), and the log of Kaplan-Meier survival is not finite; the finite identity does not apply.)
Clinical Biostats