VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Why Mathematics? | Survival Analysis, Kaplan–Meier Curves and Censoring

Three students in school uniforms work through open books at a classroom table, with textbooks and stationery nearby and study notes on the whiteboard behind them.

Why is mathematics important for survival analysis? Because ordinary averages fail when people, machines or projects are followed for different lengths of time and some never experience the event before observation ends. Time-to-event methods use every valid follow-up interval while marking what is unknown. Kaplan–Meier curves multiply conditional survival probabilities across changing risk sets, and censoring rules protect incomplete observations from being treated as events.

“Survival” is a statistical term. The event may be relapse, equipment failure, customer churn or task completion, not only death. This article uses fictional data and does not provide medical or clinical advice.

**Choose a route**


Time-to-Event Data Need Two Variables

For each subject we need:

  • a duration from a defined time origin; and
  • an indicator showing whether the event occurred or observation was censored.

The time origin might be enrolment, installation, diagnosis or purchase. The event needs an operational definition. Changing either definition changes the analysis.

The survival function is:

S(t) = P(T > t)

It is the probability that event time T exceeds t. The cumulative distribution F(t) = P(T ≤ t), so S(t) = 1-F(t) when one event type and ordinary assumptions apply.

Why an ordinary mean fails

Suppose five items are observed for 2, 4, 5, 7 and 8 months. If the last two are still operating, treating 7 and 8 as failure times is wrong. Dropping them wastes evidence that they survived at least that long.

Censoring preserves the known lower bound without inventing the unknown future.

Hazard differs from probability

The hazard h(t) is an instantaneous event rate among those still event-free near t. It is not the probability of an event at exactly one instant.

Two groups can have similar survival at a milestone but different hazard patterns over time. A hazard ratio is not the same as a risk ratio or ratio of median times.


Censoring Is Partial Information

Right censoring occurs when a subject has not experienced the event by last contact or study end. We know T exceeds the observed follow-up time.

Left censoring means the event occurred before a known observation time but exact timing is unknown. Interval censoring means it occurred between two visits.

The PubMed-indexed review Methods to Analyse Time-to-Event Data explains right, left and interval censoring and the product of conditional survival probabilities.

Non-informative censoring assumption

Standard Kaplan–Meier interpretation assumes censoring is independent of future event risk, conditional on the analysis information. If high-risk subjects disproportionately disappear, the remaining risk set becomes unrepresentative and estimated survival can be too optimistic.

“Lost to follow-up” is not automatically harmless. Compare baseline characteristics, dropout reasons and sensitivity analyses.

Censoring is not an event

A Kaplan–Meier curve steps down at events, not at censoring times. Censoring removes a subject from later risk sets after contributing survival up to that time.


Worked Example: The Product-Limit Estimator

Use fictional observations sorted by time:

  • time 2: event
  • time 3: censored
  • time 5: event
  • time 5: event
  • time 7: censored
  • time 9: event

There are six subjects initially.

At time 2, n₁ = 6 at risk and d₁ = 1 event. Conditional survival is:

p₁ = (6-1)/6 = 5/6

So Ŝ(2) = 5/6 ≈ 0.833.

At time 3, one observation is censored. The curve stays 0.833. That subject is not in later risk sets.

At time 5, four subjects are at risk and two events occur:

p₂ = (4-2)/4 = 1/2

Cumulative survival becomes:

Ŝ(5) = (5/6)(1/2) = 5/12 ≈ 0.417

At time 7, one of the remaining two is censored. No step occurs.

At time 9, one subject remains at risk and has the event:

p₃ = 0/1 = 0

Ŝ(9) = 0.

The Kaplan–Meier estimator is:

Ŝ(t) = ∏_(t_j≤t)(1-d_j/n_j)

This is the product-limit estimator introduced by Kaplan and Meier. The original 1958 paper record emphasises estimation from incomplete observations and the independence assumption between lifetime and loss time.

Handling ties

When censoring and events share a recorded time, software uses a defined ordering convention. Often events are treated before censoring at that time because those censored are considered at risk just before t. Record the convention and time precision.

Median survival

Median survival is the earliest time when Ŝ(t) is at or below 0.5. In the example it is time 5. If a curve never reaches 0.5, the median is not reached—not zero and not the maximum follow-up.

**Did You Know?** The horizontal parts of a Kaplan–Meier curve do not prove risk is zero between events. They indicate no recorded event caused the estimator to step during that interval.


Numbers at Risk and Confidence Intervals

A survival graph should include numbers at risk at useful times. Late estimates based on very few subjects are unstable even if the curve looks smooth.

Greenwood’s formula estimates variance:

Var[Ŝ(t)] ≈ Ŝ(t)² Σ d_j/[n_j(n_j-d_j)]

The sum runs over event times up to t. Confidence intervals often use log or complementary-log-log transformations to stay within 0 and 1.

Small risk sets widen uncertainty

At time 2 in the example, one event among six produces a modest step. At time 9, one event among one produces a total drop. Same event count, different denominator.

Pointwise versus simultaneous bands

A 95% pointwise interval addresses one selected time. A simultaneous band aims to cover the curve over a range. Do not label one as the other.

Restricted mean survival time

When median is not reached or proportional hazards is doubtful, the area under the survival curve up to a pre-specified horizon τ gives restricted mean survival time:

RMST(τ) = ∫₀^τ S(t)dt

The difference in RMST between groups has time units and can be interpretable. The horizon must be chosen responsibly and supported by follow-up.


Comparing Curves and Reporting Effects

The log-rank test compares observed and expected event counts across risk sets under a null hypothesis of equal survival functions. It gives evidence about a difference but not its size or direction alone.

Plot curves, numbers at risk and confidence intervals. Report milestone survival or RMST when meaningful.

Cox proportional hazards model

A Cox model writes:

h(t|x) = h₀(t)exp(βx)

For a one-unit change in x, hazard ratio is exp(β) if proportional hazards holds.

A hazard ratio of 0.70 does not mean “30% more people survive” or “survival time is 30% longer.” It is a ratio of instantaneous hazard rates under the model.

Proportional hazards

If hazards cross or treatment effects change strongly over time, one constant hazard ratio can hide the pattern. Inspect Schoenfeld residuals, time interactions or alternative summaries.

Adjustment and causality

Regression can adjust measured covariates, but observational comparisons may retain confounding. Statistical adjustment does not create randomisation.


Competing Risks

If the event is failure from cause A, failure from cause B may prevent A from occurring. Treating B as ordinary independent censoring can violate assumptions.

For cumulative incidence of cause A, one-minus-Kaplan–Meier can overestimate risk because it imagines subjects with competing events remain able to experience A.

A cumulative incidence function accounts for competing events:

F_A(t) = P(T≤t, cause=A)

The choice between cause-specific hazards, subdistribution methods and cumulative incidence depends on the question.

Multi-state thinking

Some processes move through states: healthy → ill → recovered, or operating → degraded → failed. A single first-event curve discards transitions after the first event. Multi-state models can preserve them.


Where Kaplan–Meier Can Mislead

Informative loss to follow-up

If dropout relates to prognosis, standard censoring assumptions fail. Sensitivity analysis and stronger data collection are needed.

Delayed entry

Subjects may enter the risk set after time zero. Left truncation requires risk-set accounting that includes them only after entry.

Recurrent events

Kaplan–Meier usually handles time to first event. Repeated hospitalisations or failures need recurrent-event methods.

Interval-censored timing

If an event is discovered at visits, exact time is not known. Assigning it to a visit date and using ordinary right-censor methods misstates information.

Competing events

Censoring a competing event as though independent can distort incidence.

Curves from different calendar eras

Changes in diagnostics, maintenance, follow-up or background risk can make groups incomparable even if curves are computed correctly.


Common Misconceptions

“Censored means missing and should be deleted”

A censored record contributes known event-free time and later leaves the risk set.

“A flat curve means no risk”

It means no observed events caused a step in that interval. The risk set may be small.

“Median survival is the average”

It is the time where estimated survival first reaches 0.5.

“Hazard ratio 0.5 means twice the survival time”

No. Hazard ratio and survival-time ratio are different quantities.

“Crossing curves can be summarised by one log-rank p-value”

The test may have low power or obscure time-varying effects. Show the curves and alternative summaries.

“Kaplan–Meier adjusts for confounding”

It is an unadjusted estimator unless stratification or other modelling is added.


How Students Can Learn This Mathematics Well

Make six fictional time/event pairs and sort them.

Before each event, count the risk set by hand. Remove censored subjects only after their censor time.

Multiply conditional survival factors. Never add step percentages.

Draw a right-continuous step curve and mark censoring.

Change one censoring time. Observe which later risk sets change.

Keep an analysis card:

  • time origin;
  • event definition;
  • censor types;
  • follow-up end;
  • tie convention;
  • delayed entry;
  • competing events;
  • groups and covariates;
  • numbers at risk;
  • interval method;
  • software version; and
  • missing-data and sensitivity plans.

For related probability thinking, read Hemodialysis, Clearance and Exponential Concentration Decay and RNA Sequencing, Count Normalisation and Differential Expression. The Mathematics Learning Hub supports probability and statistics foundations.


Guidance for Students and Families

Use fictional or properly de-identified open data. Do not interpret private health records or make treatment conclusions.

Ask:

  • What starts the clock?
  • What counts as the event?
  • Why was each record censored?
  • How many remain at risk late in follow-up?
  • Is censoring plausibly independent of risk?
  • Are there competing events?
  • Does a hazard ratio match the verbal claim?
  • Is the conclusion descriptive, predictive or causal?

A careful analysis respects uncertainty and the people represented by each row.


A Deeper Time-to-Event Audit

Reconstruct every risk set

For each unique event time, list who is at risk immediately before that time, who has the event and who is censored. Multiply the conditional factors by hand for a small subset and compare with software.

If the curve drops at a censor time or the risk table removes someone too early, the implementation is wrong. Risk-set reconstruction is the survival-analysis equivalent of checking units: it exposes errors before sophisticated modelling hides them.

Audit the time origin

Subjects must have comparable clocks. “Time since database entry” can differ from time since diagnosis, installation or exposure. Immortal-time bias can arise when membership in a group requires surviving long enough to qualify.

Draw a timeline for each design group showing eligibility, treatment assignment, entry, event and censoring. If follow-up begins at different biological or operational stages, the curves may compare clocks rather than outcomes.

Describe censoring patterns

Plot censoring counts over time and by group. Compare measured baseline risk factors for censored and retained subjects. Record reasons: administrative study end, withdrawal, loss of contact or competing event.

Administrative censoring at a common end date may be more plausibly independent than dropout caused by worsening condition. No graph proves independence, but patterns can reveal a fragile assumption. Sensitivity analyses should describe how conclusions change under plausible departures.

Keep late tails humble

Mark numbers at risk below the plot and predefine a minimum-support rule for interpretation. A dramatic late separation based on two subjects should not dominate the conclusion.

Consider truncating visual emphasis at a time supported by adequate follow-up while retaining the full record transparently. Report confidence intervals and follow-up distribution. The reverse Kaplan–Meier method can estimate potential follow-up in some settings, but its definition should be stated.

Compare absolute and relative summaries

Alongside a hazard ratio, report survival probabilities at meaningful times, risk differences and possibly RMST through a common horizon. Relative effects can look impressive when absolute risk is small; absolute differences can vary across time.

Choose the horizon before seeing the desired separation. Ensure both groups have support through it. A collection of aligned summaries helps readers understand the event process without making one statistic carry every meaning.

Challenge competing-risk handling

Create a three-column event code: no event, event of interest and competing event. Calculate ordinary one-minus-Kaplan–Meier after censoring competitors, then compare with cumulative incidence.

The gap shows the fictional world implied by ordinary censoring: subjects who experienced the competitor remain conceptually able to experience the target later. Decide whether the question concerns cause-specific rate, real-world probability or another estimand. Method choice follows the question, not habit.

Preserve analysis provenance

Archive the data dictionary, date rules, event adjudication, censoring reasons, tie handling, software, code and pre-specified analysis plan. Keep changes to endpoints or horizons in a dated record.

Time-to-event results are especially sensitive to seemingly small definition changes. Reproducibility is therefore not an optional technical detail; it is part of the ethical care owed to the people or systems represented by the timeline.

Translate the curve into a transparent result

Begin the results paragraph with the cohort, time origin, endpoint and censoring date. State group sizes and event counts before presenting percentages. Then give survival estimates at pre-specified, well-supported times with confidence intervals and numbers at risk. If median survival is not reached, say exactly that rather than projecting the curve beyond observation.

If groups are compared, separate description from causal interpretation. A log-rank test can assess a particular contrast between curves, but it does not remove confounding in an observational study. A Cox model adds covariates under assumptions, including proportional hazards for the usual constant hazard-ratio summary. Plot or test diagnostics and consider time-varying effects when the assumption is doubtful. No adjustment can repair an ill-defined time origin or an outcome measured differently across groups.

Pre-specify the analysis horizon. Restricted mean survival time is the area under the survival curve up to that horizon and has units of time, making it an interpretable complement when proportional hazards is questionable. But the horizon must lie within adequate follow-up for all compared groups. Choosing it after seeing where curves separate turns a clear summary into a selective one.

Students can practise with a ten-subject table: manually construct risk sets, multiply Kaplan–Meier factors, add censor marks and calculate an RMST by summing rectangular areas between event times. Then change one subject from censored to event and trace every affected risk set. This exercise shows why incomplete observation is not simply missing data and why a seemingly local record change can alter all later estimates.

Conclude with limitations in plain language. Name sparse late follow-up, uncertain censoring assumptions, competing risks, multiplicity or model dependence where relevant. A strong survival analysis does not sound certain merely because it uses advanced notation. Its strength comes from aligning the clock, the event, the risk set and the question.

Treat ties and intervals deliberately

Several events can share the same recorded time because dates are rounded to days or visits occur on a schedule. Kaplan–Meier handles tied events by using the risk set immediately before that time and applying the combined event count. Regression software may use exact, Breslow or Efron handling for ties; the choice should be recorded, especially when ties are common.

Sometimes the event is only known to occur between two visits. Calling the later visit date an exact event time discards interval-censoring information and can bias fine-grained summaries. Use methods suited to interval-censored data when the distinction matters. Mathematics helps by matching the observation statement—exact, right-censored, left-censored or interval-censored—to an analysis that genuinely represents what was observed.

Calendar time can matter too. Recruitment over several years may expose subjects to changing practice, technology or background conditions. Administrative censoring then gives early entrants longer potential follow-up than late entrants. Record entry dates and examine recruitment cohorts where relevant. A Kaplan–Meier curve aligns people by elapsed time, which is useful, but that alignment can hide historical changes unless the study design and analysis explicitly consider them.

Always preserve the analysis population rule. Excluding subjects after looking at follow-up can alter risk sets and comparability. A clear flow diagram should show eligibility, exclusions, group assignment, events and censoring. Reconcile those counts with the data used to generate the curve. When totals disagree, pause before interpreting any separation.


Frequently Asked Questions

What is a Kaplan–Meier curve?

It is a stepwise estimate of the probability of remaining event-free beyond time t, built from conditional survival across risk sets.

What is right censoring?

The event has not been observed by the subject’s last known follow-up, so event time is known only to exceed that time.

Does censoring make the curve drop?

No. Events create drops. Censoring reduces later risk sets.

What is median survival?

The earliest time when estimated survival reaches or falls below 0.5.

Why show numbers at risk?

They reveal how much evidence supports late parts of the curve.

What does a hazard ratio mean?

It compares instantaneous event rates under a model. It is not directly a probability ratio or survival-time ratio.

Can this article interpret a clinical trial?

No. Trial analysis requires a pre-specified protocol, validated data, specialist statistics, ethics and regulatory context.


Next Reading

Continue with Comparing Percentages Fairly to strengthen denominator reasoning, or return to the Mathematics Learning Hub. Survival analysis is a humane mathematical idea: it uses what is known, labels what is not known and refuses to turn incomplete follow-up into a false event.


A Practical Investigation Studio

Use synthetic or openly released teaching data. These investigations reveal assumptions and error signals; they do not replace marine forecasting, pharmacological research, accredited metrology or clinical analysis.

Investigation 1: Event table

Create fictional follow-up times and event indicators. Define time origin and event before sorting. Use synthetic or openly released teaching data. Begin by naming the response variable, input variables, units and prediction before calculating. Preserve raw values and unrounded intermediates in a table, then make one graph whose axes communicate the model clearly. Add an independent hand estimate and a dimensional or limiting-case check. Deliberately introduce one unit error and describe the numerical signature rather than merely correcting it. Label every quantity observed, assumed, fitted or derived. Record the model domain and one condition that would require a richer model. Ask a peer to reproduce the result from the written procedure without seeing the answer. If the reproduction differs, locate whether the ambiguity arose in definitions, units, rounding or software defaults. End by explaining the result to a younger student in three sentences. This remains a classroom calculation, not professional validation or a safety, production or security decision.

Investigation 2: Risk sets

Count those at risk immediately before each event time. Handle ties with a declared convention. Create a data dictionary before entering a spreadsheet or script. State how each row was obtained, which values are exact by definition and which are measurements or simulated observations. Calculate once with full precision and once with premature rounding, then compare the final difference. Vary the principal input across at least five sensible values and look for linearity, curvature or instability instead of reporting only two endpoints. Keep signed residuals if a model is fitted, because absolute errors hide direction. Include a graph and a small results table that another person can audit. Write a one-paragraph uncertainty note distinguishing input uncertainty from model-form limitations. A peer should be able to reconstruct one row from the formula and raw data alone. State what evidence would falsify the interpretation. Do not present the exercise as a certified engineering, manufacturing, metrology or cryptographic assessment.

Investigation 3: Product limit

Multiply conditional survival factors. Verify that censoring alone does not create a step. Treat the investigation as a comparison of hypotheses, not a hunt for an attractive number. Write a baseline model and at least one plausible alternative, then predict where their outputs should diverge. Hold all unrelated inputs fixed while varying the chosen factor. Preserve coordinate, sign, phase, size-weighting or bit conventions beside the data. Use a ratio, residual or normalised error that has a declared denominator. Repeat the calculation with that denominator changed and explain why the percentage changes. Check one extreme case where the answer should approach zero, unity or another known limit. Make the graph before writing the conclusion and note any outlier without deleting it. Separate repeatability of one prepared sample from coverage across positions, times or populations. The final claim should match the observed range and must not be extrapolated into real operational approval.

Investigation 4: Censor marks

Plot censored observations on a step curve. Keep them in the risk set until censoring. Plan the computation so that errors leave visible fingerprints. Save the raw input, transformed input, intermediate result and final result in separate columns or variables. Insert one deliberate sign reversal, one missing observation and one hidden reset, each in a separate copy, and document how the plots or checks respond. Compare an analytical shortcut with the more complete calculation over a range where the shortcut is expected to fail. Report the largest absolute difference and where it occurs. Include conservation, balance, boundedness or monotonicity checks appropriate to the topic. If a fitted curve is used, inspect residual clusters and changing spread instead of relying on one fit statistic. Have a peer review only the assumptions first, then the arithmetic. Keep the conclusion educational and conditional on the fictional data.

Investigation 5: Median survival

Find the earliest time the curve reaches 0.5. Report not reached when appropriate. Build a sensitivity map rather than changing several settings at once. Choose a baseline, vary one input downward and upward, and express output change in both original units and a dimensionless ratio. Then select a second input and repeat. If interactions seem likely, test a small two-dimensional grid and identify where the one-factor interpretation breaks down. State why the chosen ranges are plausible for the teaching model. Preserve failed or surprising runs and annotate them. Compare computational resolution or sample length at three levels so numerical artefacts are not confused with physical behaviour. Provide a hand estimate for the order of magnitude. Finish with a decision table using cautious language—stable, sensitive or unresolved—rather than safe or unsafe. Classroom evidence cannot authorise a product, structure, process or security control.

Investigation 6: Greenwood interval

Calculate a teaching standard error. State the transformation and small-sample limits. Make uncertainty visible at every stage. Assign each input a source and a plausible interval, then identify which inputs are correlated rather than automatically treating them as independent. Propagate uncertainty with a simple high-and-low calculation or transparent simulation, and retain the seed or full synthetic samples for reproduction. Compare the spread caused by measurement variation with the shift caused by changing the model assumption. Plot both if possible. Explain why more decimal places do not narrow an interval supported by weak inputs. If a result lies near a fictional decision boundary, rewrite the conclusion to reflect the chance of crossing it. Ask a peer to challenge the largest assumed uncertainty and rerun the analysis. Report the conclusion as evidence about the model, never as professional certification.

Investigation 7: Two groups

Construct two Kaplan–Meier curves from synthetic data. Display numbers at risk. Audit representation choices. Recalculate after changing the coordinate origin, phase wrapping convention, histogram bins, mesh labels or binary mapping while preserving the underlying situation. A correct physical or probabilistic conclusion should change only where the definition genuinely changes. Show one example where a visual choice exaggerates or hides a pattern. Use identical axes for fair comparison and include sample count or resolution in captions. Test an invariant such as total mass, probability, force, energy sign or average ratio. Where values are averaged, identify whether the mean is number-, mass-, volume-, time- or state-weighted. Ask another student to explain the plot without reading the conclusion; revise labels if their interpretation differs. The display supports reasoning but cannot replace domain review.

Investigation 8: Log-rank idea

Compare observed and expected events over risk sets. Avoid equating significance with treatment effect. Separate verification from validation. First verify arithmetic or code against a case with a known answer, including units and at least one manually calculated row. Next ask whether the teaching model represents the intended phenomenon and list the omitted mechanisms. Refine numerical resolution or increase synthetic sample length and record whether the chosen quantity stabilises. A stable answer can still arise from an unrealistic model, so compare with an alternative assumption or openly documented benchmark. Record software version, solver or library settings and stopping rules. Avoid tuning settings after seeing the desired result; predeclare the comparison instead. Summarise numerical error, input uncertainty and model-form uncertainty separately. No classroom agreement with a benchmark should be described as product or system validation.

Investigation 9: Informative censoring

Simulate dropout related to hidden risk. Show the direction of bias. Design the investigation to reveal dependence over position, time or sequence order. Keep the original ordering, then compare with a deliberately shuffled copy and explain which statistics change. Examine at least two lags, locations or neighbourhood scales rather than only the overall average. Plot local values alongside the aggregate so compensating errors are visible. State whether successive observations are plausibly independent and why that matters to the calculation. If repeated measurements share one specimen, source or initial state, do not count them as independent coverage. Add a block or subgroup analysis and note any drift. Preserve the random seed for simulated data but use more than one seed before generalising. The conclusion should describe detected structure without claiming causation from the pattern alone.

Investigation 10: Competing event

Replace a censored competing event with a cumulative-incidence approach. Explain why one-minus-KM can overestimate risk. Create an adversarial edge-case test. Identify the smallest, largest, most symmetric and most irregular inputs allowed by the classroom model, predict the expected behaviour, and then compute it. Include zero or a limiting value only when mathematically meaningful. Watch for division by a small number, logarithms of invalid values, wrapped angles, negative geometry, impossible probabilities or solver singularities. Replace silent software errors with explicit checks and explanatory messages. Compare the edge cases with the ordinary baseline on the same scale and describe why a method that works in the middle may fail near a boundary. Record the first assumption that breaks. The exercise is about model literacy; it is not permission to explore hazardous physical extremes.

Investigation 11: Reproducible report

Archive data definitions, code and assumptions. Have a peer reconstruct one curve step. Prepare a compact reproducibility package: raw synthetic data, formulas or code, version information, one chart, a results table and a short read-me file. Give every file and column a meaningful name and avoid values copied manually between tools. Re-run from a clean state and confirm that outputs are regenerated rather than cached. Ask a peer to alter one declared input and predict the direction of change before execution. Compare the prediction with the result and investigate any disagreement. Add a limitations section naming data coverage, numerical resolution, model assumptions and the next useful measurement. Archive corrections instead of erasing them so the reasoning trail remains visible. Conclude with what the calculation demonstrates, what it does not demonstrate and which qualified professional or authoritative standard would govern a real application.