BIOSTATISTICS • REGRESSION & MODELING

Kaplan-Meier Curves

Estimating survival probabilities over time when not every subject reaches the endpoint.

Historical Context & Motivation

In clinical research and epidemiology, one of the most fundamental questions is deceptively simple: how long do subjects survive after a given intervention or diagnosis? Before the mid-twentieth century, researchers who wished to answer this question faced a stubborn methodological problem. Not every patient in a study could be followed until death or event occurrence—some patients dropped out, moved away, or were still alive when the study ended. These incomplete observations, known as censored data, meant that simply computing the proportion of survivors at each time point would systematically overestimate or underestimate the true survival experience. Early actuarial methods, such as the life-table approach, attempted to handle this by grouping time into intervals, but they sacrificed precision by binning continuous time data into arbitrary categories.

1693
Halley's Life Table
Edmund Halley constructed one of the earliest life tables using mortality data from the city of Breslau, laying the actuarial groundwork for all subsequent survival analysis.
1912
Böhmer's Product-Limit Idea
German statistician P.E. Böhmer first described the product-limit concept in an actuarial context, though the idea remained relatively obscure for decades.
1958
Kaplan & Meier's Landmark Paper
Edward Kaplan and Paul Meier published their seminal paper in the Journal of the American Statistical Association, providing a rigorous nonparametric estimator for the survival function that properly handles censored observations. This paper has become one of the most cited in all of statistics.
1966
Mantel's Log-Rank Test
Nathan Mantel introduced the log-rank test for comparing two or more Kaplan-Meier curves, enabling formal hypothesis testing of survival differences between treatment groups.
1972
Cox Proportional Hazards Model
Sir David Cox extended survival analysis into the regression framework, building on the Kaplan-Meier estimator to model the effect of covariates on survival.

The central question that the Kaplan-Meier estimator addresses is this: given a cohort of subjects who enter a study at potentially different times and who may leave before the event of interest is observed, how can we construct an unbiased estimate of the survival function S(t) — the probability of surviving beyond time t? The elegance of Kaplan and Meier's solution lies in its nonparametric nature: it makes no assumption about the underlying distribution of survival times, relying only on the observed data to build a step function that descends with each observed event.

Core Principles & Definitions

Before constructing a Kaplan-Meier curve, it is essential to define the key concepts that underpin survival analysis. The survival function, the event (or endpoint), and the mechanism of censoring together form the conceptual scaffold on which the entire estimator rests. The following grid summarizes the four foundational ideas you must master before proceeding to computation.

1

Survival Function S(t)

The probability that a subject survives (or remains event-free) beyond time t. Formally, S(t) = P(T > t), where T is the random variable representing time to event. S(t) is a non-increasing function starting at 1 and approaching 0.
2

Event (Failure)

The outcome of interest: death, disease recurrence, mechanical failure, or any well-defined endpoint. An observed event at time tᵢ causes the estimated survival curve to drop at that point.
3

Censoring

A subject is censored when the event time is unknown because observation ended before the event occurred. Right-censoring (the most common form) means the true event time is greater than the observed follow-up time. The KM estimator assumes censoring is non-informative.
4

Risk Set nᵢ

At each event time tᵢ, the risk set is the number of subjects who are still under observation and have not yet experienced the event or been censored. It is the denominator that makes the Kaplan-Meier estimator adapt to changing sample sizes over time.
KEY TAKEAWAY
Think of the Kaplan-Meier estimator like tracking runners in a marathon. At every mile marker, you record who is still running, who has dropped out (censored), and who has crossed the finish line (event). A runner who drops out at mile 15 still contributes information about the race for miles 1 through 15—you know they survived at least that far. The KM method uses every partial observation rather than discarding it, giving you the best possible picture of the race's difficulty at each segment.

A critical assumption underlying the Kaplan-Meier estimator is non-informative censoring: the fact that a subject was censored should carry no information about their likelihood of experiencing the event in the future. In other words, censored subjects should have the same survival prospects as those who remain under observation. When this assumption is violated—for example, if patients withdraw from a trial because they feel too sick—the Kaplan-Meier estimates become biased. Careful study design and sensitivity analyses are essential safeguards.

Visual Explanation

The hallmark of a Kaplan-Meier curve is its distinctive staircase shape. The survival probability remains constant between event times and drops at each observed event, producing horizontal segments connected by vertical drops. Censored observations are typically marked with small tick marks or crosses along the horizontal segments to indicate that a subject left the study without experiencing the event. The diagram below illustrates a hypothetical Kaplan-Meier curve for two treatment groups in a clinical trial.

The cyan curve represents Treatment A with higher survival probabilities across all time points, while the pink curve represents Treatment B with steeper drops at early event times. Vertical tick marks on each curve indicate censored subjects—patients who were lost to follow-up or whose study period ended before the event occurred. Notice the characteristic step-function shape: survival probability is constant between events and drops only at observed event times.

Several features of this diagram deserve attention. First, both curves begin at S(t) = 1.0 because at time zero, all subjects are alive by definition. Second, the vertical drops occur only at times when an event is actually observed—if no one dies during a particular interval, the curve stays flat. Third, the magnitude of each drop depends on the size of the risk set at that moment: a death when only 5 patients remain produces a much larger drop than a death when 50 patients remain. Finally, the separation between the two curves suggests a difference in treatment efficacy, though a formal statistical test (such as the log-rank test) would be required to determine whether this difference is statistically significant.

Mathematical Framework

The Kaplan-Meier estimator is also called the product-limit estimator because it expresses the survival probability as a cumulative product of conditional survival probabilities at each event time. The idea is intuitive: to survive past time t, you must survive past every event time preceding t. The probability of achieving this is the product of the conditional probabilities of surviving each successive event time, given that you were at risk just before it.

KAPLAN-MEIER ESTIMATOR
Ŝ(t) = ∏ᵢ: tᵢ ≤ t (1 − dᵢ / nᵢ)
Where Ŝ(t) = estimated survival probability at time t, tᵢ = the i-th ordered event time, dᵢ = number of events (deaths) at time tᵢ, and nᵢ = number of subjects at risk just before time tᵢ. The product is taken over all event times up to and including t.

Each factor (1 − dᵢ / nᵢ) represents the conditional probability of surviving past event time tᵢ given that the subject was alive and under observation just before tᵢ. Censored subjects are removed from the risk set at their censoring time but are counted in the risk set for all event times prior to their departure. This mechanism is what allows the KM estimator to handle incomplete data without bias, under the non-informative censoring assumption.

GREENWOOD'S FORMULA (VARIANCE OF Ŝ(t))
Var[Ŝ(t)] = [Ŝ(t)]² × Σᵢ: tᵢ ≤ t dᵢ / [nᵢ × (nᵢ − dᵢ)]
Greenwood's formula provides the estimated variance of Ŝ(t), which is essential for constructing confidence intervals. Pointwise 95% confidence intervals are computed as Ŝ(t) ± 1.96 × √Var[Ŝ(t)], though log-transformed intervals are preferred in practice because they respect the [0, 1] bounds of a probability.
MEDIAN SURVIVAL TIME
t_median = min{t : Ŝ(t) ≤ 0.5}
The median survival time is defined as the earliest time at which the estimated survival function drops to or below 0.50. If the curve never reaches 0.50 (i.e., more than half the subjects are censored before the event), the median is undefined. This is a common occurrence in trials with long follow-up where many patients are still alive at the study's end.
🔗 Why a Product?
The product structure derives from the chain rule of conditional probability. Surviving past time t₃, for instance, requires surviving past t₁, then surviving past t₂ given survival past t₁, then surviving past t₃ given survival past t₂. Each factor in the product is one of these conditional probabilities: P(T > t₃) = P(T > t₁) × P(T > t₂ | T > t₁) × P(T > t₃ | T > t₂). This decomposition is exact, not an approximation.

Step-by-Step Construction & the Survival Table

Constructing a Kaplan-Meier curve from raw data requires building a survival table — a tabular record that tracks the risk set, events, and cumulative survival at each observed event time. The following table illustrates this construction for a small dataset of 10 patients. An asterisk (*) after a time value denotes a censored observation. The raw data (in months to event) are: 2, 3*, 5, 7, 8*, 10, 12*, 15, 18*, 22.

Survival table for 10 hypothetical patients showing how censored observations reduce the risk set without triggering a drop in Ŝ(t).
Time tᵢnᵢ (At Risk)dᵢ (Events)Censored Before Next tᵢ1 − dᵢ/nᵢŜ(tᵢ)
010001.000
21011 (at t=3)9/10 = 0.9000.900
58107/8 = 0.8750.788
7711 (at t=8)6/7 = 0.8570.675
10511 (at t=12)4/5 = 0.8000.540
15311 (at t=18)2/3 = 0.6670.360
221100/1 = 0.0000.000
This diagram plots the survival table from the 10-patient example above. Red dots mark each event (where the curve drops), and cyan tick marks indicate censored observations. Notice how the survival probability labeled at each step matches the cumulative product computed in the table. The curve reaches zero only because the last remaining patient experienced the event at month 22.

Observe how censored subjects affect the curve's construction. The patient censored at month 3 reduces the risk set from 9 to 8 before the next event at month 5, but does not cause a drop in the survival estimate. This means the denominator shrinks at the next event, making each subsequent event produce a proportionally larger drop. This is the core mechanism by which censoring is incorporated: the partial information from censored subjects narrows the risk set, changing the conditional probabilities at subsequent event times.

Worked Example

Consider a small clinical trial with 8 patients enrolled to study time to disease recurrence after surgery. The observed times (in weeks) are: 4, 6+, 9, 11+, 14, 17, 20+, 25, where + indicates a censored observation. We wish to compute the Kaplan-Meier survival estimate and identify the median recurrence-free survival time.

Computing the Kaplan-Meier Estimate for 8 Patients
1
Step 1 — Sort and Classify ObservationsArrange all times in ascending order and classify each as an event (E) or censored (C): 4 (E), 6 (C), 9 (E), 11 (C), 14 (E), 17 (E), 20 (C), 25 (E). There are 5 events and 3 censored observations.
Event times: t₁ = 4, t₂ = 9, t₃ = 14, t₄ = 17, t₅ = 25
2
Step 2 — Determine the Risk Set at Each Event TimeAt t₁ = 4: all 8 patients are at risk, so n₁ = 8. One event occurs, and one patient is censored at week 6 before the next event. At t₂ = 9: n₂ = 8 − 1 (event at 4) − 1 (censored at 6) = 6. One event occurs, and one censored at 11. At t₃ = 14: n₃ = 6 − 1 − 1 = 4. At t₄ = 17: n₄ = 4 − 1 = 3. At t₅ = 25: n₅ = 3 − 1 (event at 17) − 1 (censored at 20) = 1.
Risk sets: n₁ = 8, n₂ = 6, n₃ = 4, n₄ = 3, n₅ = 1
3
Step 3 — Compute Conditional Survival ProbabilitiesAt each event time with dᵢ = 1: (1 − d₁/n₁) = 1 − 1/8 = 0.875. (1 − d₂/n₂) = 1 − 1/6 = 0.833. (1 − d₃/n₃) = 1 − 1/4 = 0.750. (1 − d₄/n₄) = 1 − 1/3 = 0.667. (1 − d₅/n₅) = 1 − 1/1 = 0.000.
Conditional probabilities: 0.875, 0.833, 0.750, 0.667, 0.000
4
Step 4 — Multiply to Obtain Cumulative SurvivalŜ(4) = 0.875. Ŝ(9) = 0.875 × 0.833 = 0.729. Ŝ(14) = 0.729 × 0.750 = 0.547. Ŝ(17) = 0.547 × 0.667 = 0.365. Ŝ(25) = 0.365 × 0.000 = 0.000.
Ŝ(t): 0.875, 0.729, 0.547, 0.365, 0.000
5
Step 5 — Identify the Median Survival TimeThe median survival time is the smallest t at which Ŝ(t) ≤ 0.50. Ŝ(9) = 0.729 > 0.50 and Ŝ(14) = 0.547 > 0.50, but Ŝ(17) = 0.365 ≤ 0.50. Therefore, the median recurrence-free survival time is 17 weeks.
Median recurrence-free survival = 17 weeks
⚠️ Note on Tied Event Times
If two or more events occur at the same time, all events are counted as dᵢ in that single row of the survival table. Similarly, if an event and a censoring occur at the same time, the convention is to treat the event as occurring first—the censored subject is assumed to still be at risk at that event time. Different software packages may handle ties slightly differently, so always verify the convention used.

Strengths, Limitations & Comparisons

The Kaplan-Meier estimator occupies a central position in survival analysis due to its simplicity, broad applicability, and minimal distributional assumptions. However, like all statistical tools, it has limitations that must be understood to avoid misinterpretation. The table below contrasts the KM estimator's strengths and limitations, while also positioning it relative to competing methods.

Summary of the Kaplan-Meier estimator's advantages and disadvantages
StrengthsLimitations
Nonparametric: No assumption about the shape of the survival distribution (exponential, Weibull, etc.).No covariate adjustment: Cannot model the effect of multiple predictors (age, stage, treatment) simultaneously.
Handles censoring: Properly incorporates right-censored data, maximizing use of available information.Assumes non-informative censoring: If patients drop out because they are sicker, estimates become biased.
Intuitive visualization: The step-function plot is easy to interpret for clinicians and non-statisticians alike.Unreliable at the tail: When the risk set becomes very small, the estimates become highly variable and the confidence intervals widen dramatically.
Well-established: Universally accepted in biomedical research; required in FDA submissions.Only one event type: Not designed for competing risks scenarios without modification (use cumulative incidence functions instead).
KEY TAKEAWAY
The Kaplan-Meier estimator is the descriptive workhorse of survival analysis—analogous to computing a mean and plotting a histogram before running a regression. It gives you the lay of the land: the overall shape of survival, the median, and a visual comparison between groups. But when you need to adjust for confounders or quantify the independent effect of a predictor, you graduate to the Cox proportional hazards model, which builds on the same event-by-event logic but adds covariates.

Connection to Advanced Survival Methods

The Kaplan-Meier estimator is a gateway to a rich family of survival analysis techniques. Understanding how it relates to more sophisticated methods clarifies both its role and its boundaries. The table below contrasts the KM approach with three advanced extensions that you are likely to encounter in graduate-level biostatistics coursework or applied clinical research.

Comparison of survival analysis methods in order of increasing parametric assumptions
FeatureKaplan-MeierCox Proportional HazardsParametric Models
TypeNonparametricSemi-parametricFully parametric
CovariatesNone (stratification only)Multiple continuous and categoricalMultiple continuous and categorical
Distributional assumptionNoneProportional hazardsSpecified distribution (Weibull, exponential, log-normal, etc.)
Primary outputŜ(t) curve, median survivalHazard ratios, adjusted Ŝ(t)Hazard ratios, smooth Ŝ(t), predictions
Best used forDescriptive analysis, single group or stratified comparisonsMultivariable regression with time-to-event outcomeExtrapolation, precise probability prediction when distribution is known

Two additional extensions merit brief mention. The log-rank test is the natural companion to the Kaplan-Meier curve for hypothesis testing: it compares two or more KM curves under the null hypothesis that the survival functions are identical, weighting each event time equally. For situations where the proportional hazards assumption fails—for instance, when two treatment curves cross—the restricted mean survival time (RMST) offers a useful summary measure: it computes the area under the KM curve up to a specified time horizon, providing an interpretable metric of average event-free survival without relying on proportional hazards.

🔭 Looking Ahead
If you plan to pursue clinical research or epidemiology, mastering the Kaplan-Meier estimator is the prerequisite for understanding Cox regression, competing risks analysis, and time-varying covariates. The product-limit logic you have learned here—conditioning on the evolving risk set at each event time—reappears in the partial likelihood of the Cox model and in the Nelson-Aalen estimator of the cumulative hazard.

Practice Problems

PROBLEM 1CONCEPTUAL
A Kaplan-Meier curve drops only at times when events are observed, not when censorings occur. Explain why a censored observation does not trigger a drop in the estimated survival function, even though it does change the subsequent shape of the curve.
PROBLEM 2BASIC CALCULATION
Five patients enter a study. Their times (in days) to event or censoring are: 3, 5+, 8, 12+, 15, where + denotes censoring. Compute Ŝ(t) at each event time.
PROBLEM 3INTERMEDIATE
A study reports the following Kaplan-Meier survival estimates: Ŝ(6) = 0.85, Ŝ(12) = 0.68, Ŝ(18) = 0.51, Ŝ(24) = 0.40. (a) What is the estimated median survival time? (b) What is the estimated conditional probability of surviving from month 12 to month 18, given that a patient has already survived to month 12?
PROBLEM 4APPLIED
A randomized trial of 200 patients (100 per arm) produces the following 2-year survival estimates: Treatment A has Ŝ(24) = 0.72 with standard error 0.045, and Treatment B has Ŝ(24) = 0.58 with standard error 0.050. Construct 95% confidence intervals for each group's 2-year survival, and discuss whether the difference appears clinically meaningful.
PROBLEM 5CRITICAL THINKING
Suppose that in a cancer clinical trial, 40% of the patients in the control arm cross over to receive the experimental treatment after disease progression. The Kaplan-Meier overall survival curves for the two arms are nearly identical. A colleague argues that the experimental treatment is ineffective because the KM curves overlap. Critique this reasoning and propose a more appropriate analytical strategy.

Lesson Summary

The Kaplan-Meier estimator is a nonparametric method for estimating the survival function S(t) from time-to-event data that may include right-censored observations. It works by computing a cumulative product of conditional survival probabilities at each observed event time, using the formula Ŝ(t) = ∏(1 − dᵢ/nᵢ), where dᵢ is the number of events and nᵢ is the risk set at time tᵢ. The resulting step-function curve drops at each event time and remains flat between events, with censored subjects reducing the risk set without triggering a drop.

Key outputs include the median survival time (where the curve crosses 0.50) and confidence intervals via Greenwood's formula. The critical assumption is non-informative censoring: censored subjects must have the same future survival prospects as those remaining under observation. When comparing groups, the log-rank test provides formal hypothesis testing, and the Cox proportional hazards model extends the framework to handle covariates. Mastery of the KM curve is foundational for any work in clinical trials, epidemiology, or reliability engineering.

Varsity Tutors • Biostatistics • Kaplan-Meier Curves