How Time-to-Event and Survival Analysis Work | Censoring, Risk Sets, Kaplan–Meier Curves and Hazards

A machine is switched on and observed for a year. It has not failed when the study ends. How long does it last?

The honest answer is not “one year”. We know it lasted at least one year. The eventual failure time remains unknown. Throwing the machine away from the analysis wastes information; pretending its lifetime was exactly one year invents an event that did not occur.

Time-to-event analysis studies both whether an event occurs and how long it takes to occur, while preserving partial information from observations whose event time is not fully observed. Survival analysis is the traditional name, but the event need not be death. It can be machine failure, customer departure, completion of a task, recovery, relapse, first purchase, archive deterioration, school withdrawal or any other clearly defined transition through time.

This article explains the evidence chain: time origin → event definition → follow-up → event or censoring → risk set → survival or hazard estimate → comparison or model → assumption check → decision. The worked examples use fictional machines and services so that the method remains general. Clinical uses remain with Medicine and relevant specialist guidance.

Reading route: start with the event and time origin, work through censoring and the Kaplan–Meier example, distinguish survival from hazard, then move to Cox regression, competing risks, recurrent events and the reporting contract.

Define the event before measuring the time

“Time until failure” is incomplete until failure is operationally defined. Does a machine fail when output stops completely, when performance falls below tolerance, when an operator removes it from service, or when a component alarm first appears?

Those events can occur at different times. Changing the definition changes the outcome.

The same discipline applies to people and organisations. “Time to completion” could mean submission, approval or final archival deposit. “Time to churn” could mean last activity, account cancellation or expiration of a paid period.

Write the event as a reproducible rule that another analyst could apply to the record without guessing your intention.

The time origin is part of the outcome

A duration needs a starting point. Time from manufacture differs from time from installation. Time from enrolment differs from time from first lesson. Time from first publication differs from time from the latest edition.

If different units enter observation at different stages, careless time origins can create incomparable durations. The analysis should state whether the clock begins at a common event, calendar date, age, exposure or study entry.

Time scale can also matter. A reliability study may use operating hours rather than calendar days. A seasonal process may require calendar time. Choose the scale that matches the mechanism.

Censoring preserves what is known about an incomplete event time

Right censoring occurs when an observation is known to remain event-free up to a certain time but its later event time is not observed. A study ending while a machine is still functioning is a standard example.

NIST’s Engineering Statistics Handbook discussion of censoring uses reliability tests to show how units that have not failed by the end of a test still contribute information about lifetime.

Censoring is not the event. A censored unit has not been observed to fail at the censoring time. Treating censoring as failure shortens estimated durations; discarding censored units ignores the evidence that they survived at least that long.

Censoring has several forms

Right censoring means the event occurs, if at all, after the observed time. Left censoring means the event occurred before observation could locate the exact time. Interval censoring means the event is known to have occurred between two observation times.

These structures require different methods. An annual inspection that discovers a component failed sometime since last year produces interval-censored information, not an exact event date.

Do not convert an interval to its midpoint merely because ordinary software wants one number. That is an imputation assumption, not a measurement.

Administrative censoring is different from loss to follow-up

When a study reaches its planned end date, units still under observation can be administratively censored. The reason is external to their event process if the study end was fixed independently.

Loss to follow-up is more difficult. A customer may disappear because service failed; a device may stop transmitting shortly before physical failure; a learner may stop responding because participation has become difficult.

Time-to-event methods commonly require censoring assumptions. If the probability of being censored depends on the unobserved event process even after relevant observed information is considered, naive estimates can be biased.

This connects to Missing Data Analysis: censoring is structured incomplete information, not permission to ignore why observation ended.

The risk set is the population still capable of the event at a time

Time-to-event methods repeatedly ask who is still under observation and event-free immediately before each event time. Those units form the risk set.

A unit that failed earlier has left the risk set. A unit censored earlier has also left because its later status is unknown. A unit that has not yet entered observation should not be included before entry.

Many formulas that look specialised become intuitive once the risk set is visible: each event occurs among the units that were still eligible to experience it at that moment.

A worked Kaplan–Meier example

Consider six fictional machines observed from the same starting point. One fails at time 2, one is censored at 3, one fails at 4, one is censored at 5, one fails at 6 and one is censored at 8.

Constructed time-to-event record
TimeObservationAt risk just before time
2Failure6
3Censored5
4Failure4
5Censored3
6Failure2
8Censored1

The Kaplan–Meier survival estimate multiplies conditional survival proportions at observed event times. At time 2, estimated survival becomes 5/6 ≈ 0.833. The censoring at time 3 does not make the curve drop; it reduces the later risk set.

At time 4, three of the four units at risk remain event-free through that event, so survival becomes (5/6) × (3/4) = 0.625. After censoring at 5, two units remain at risk at time 6; one fails, so survival becomes 0.625 × 1/2 = 0.3125.

NIST’s Kaplan–Meier documentation gives the product-limit form used in reliability analysis. The worked arithmetic here is original and intentionally small enough to audit by hand.

A Kaplan–Meier curve falls at events, not censoring marks

The curve begins at one when every observed unit is event-free at the defined origin. It steps downward when events occur. Censoring marks show where units leave observation without an observed event.

A flat tail does not mean late events are impossible. It may simply mean few units remain at risk. Always show the number at risk below the plot or at informative time points.

When only one or two units remain, the estimated tail can look visually stable while carrying enormous uncertainty. Do not let a smooth plot outrun the remaining evidence.

Median event time is a property of the estimated survival curve

The median time-to-event is commonly defined as the earliest time at which the estimated survival function reaches 0.5 or below. In the six-machine example, the curve is 0.625 after time 4 and 0.3125 after time 6, so the Kaplan–Meier median is time 6.

If the survival curve never drops to 0.5 during follow-up, the median is not observed from that study. Reporting the last follow-up time as the median would invent an event distribution beyond the evidence.

Survival probability and hazard are related but not the same

The survival function S(t) describes the probability of remaining event-free beyond time t under the model. The hazard describes the instantaneous event rate among units that have remained event-free up to that time.

A hazard is not an ordinary probability and can exceed one when expressed as a rate per unit time. Its meaning depends on the time scale.

The recent methodological review Time-to-event analysis explains survival functions, hazards, proportional-hazards issues and competing risks in a clinical research context. The definitions are statistical; domain-specific interpretation remains with the relevant subject owner.

A hazard ratio is not a ratio of event probabilities

A hazard ratio compares instantaneous event rates between groups under a model. It is not generally equal to the ratio of cumulative event probabilities at a chosen time, nor does a hazard ratio of 0.5 mean that half as many events will occur by every time point.

The relationship between hazard and cumulative probability depends on the entire time path. When hazards vary differently over time, a single ratio can be particularly hard to interpret.

For decisions, complement relative measures with survival probabilities, event probabilities or restricted mean times at meaningful horizons where appropriate.

The Cox model estimates covariate associations with hazard

The Cox proportional hazards model relates covariates to the hazard without specifying a full parametric form for the baseline hazard. It has become one of the most widely used tools for time-to-event regression.

Under the standard proportional-hazards form, covariate effects multiply the hazard and the corresponding hazard ratios are assumed constant over time. A 2024 Royal Statistical Society article on fifty years of the Cox proportional hazards model reflects its lasting influence.

The model is not a universal default. Its assumptions and the target estimand must fit the question.

Proportional hazards is an assumption about the time pattern

If one option performs better early and worse later, the hazard ratio may change through time. A single proportional-hazards coefficient can then compress a changing relationship into a summary that needs careful interpretation.

Check graphical diagnostics and residual-based tests where appropriate, but do not turn assumption testing into a ritual threshold. Consider whether the scientific mechanism itself makes proportionality plausible.

If proportional hazards is not suitable, alternatives include time-varying effects, stratified models, accelerated failure-time models, flexible parametric approaches or direct summaries such as restricted mean event-free time.

Restricted mean time can answer a direct horizon question

The restricted mean survival time up to a horizon τ is the area under the survival curve from zero to τ. In a general time-to-event setting, it can be interpreted as expected event-free time accumulated during that fixed horizon.

Comparing restricted means can remain interpretable when proportional hazards does not hold. The horizon must be chosen and reported because changing it changes the quantity.

A method is valuable when it matches the decision. If an organisation cares about keeping a service active for twelve months, a twelve-month event-free time summary may be more directly useful than one hazard ratio over an irregular follow-up period.

Left truncation is not the same as left censoring

Left truncation, or delayed entry, occurs when a unit enters the observed risk set only after surviving event-free to an entry time. A study of existing machines may enrol units only if they are still functioning at age five.

Those machines were not under observation from age zero. Including them in the age-zero risk set would give them immortal time before they were even eligible to enter the sample.

Correct risk-set construction lets each unit contribute only after its entry condition is satisfied.

Immortal time bias arises when exposure definition guarantees event-free time

Suppose a customer is classified as a “long-term programme user” only after completing three months of use, but the analysis counts those first three months as exposed time. Anyone in that group had to remain event-free long enough to qualify. The classification has created immortal time.

Time-varying exposure definitions or landmark designs can address such structures when appropriate. The deeper rule is to align each period of person- or unit-time with the exposure state that genuinely existed then.

This is an identification issue as well as a time-to-event issue. Route causal claims through Causal Inference.

Time-dependent covariates can change during follow-up

Temperature, workload, medication, inventory, subscription status or system configuration may change while a unit is at risk. Assigning only the baseline value can misrepresent the exposure history.

Time-dependent covariates allow the model to use updated values. But a variable that changes in response to earlier outcome risk can create time-dependent confounding, which requires more than a routine Cox model.

Always draw the time order: what was known, what changed, what could influence future exposure and when the event became possible.

Competing risks change what “event probability” means

A machine can permanently leave service because its motor fails or because the entire product line is retired. If retirement occurs first, that machine can no longer experience the motor-failure event in the observed system.

Treating every competing event as ordinary independent censoring and then reading one minus the Kaplan–Meier curve as the real-world cumulative probability of the target event can overstate incidence when competing events are meaningful.

Competing-risk analysis distinguishes cause-specific hazards from cumulative incidence. The 2025-accessed tutorial Time-to-event analysis discusses this distinction and why non-proportional hazards and competing risks require special care.

The event system should decide the method. A competing event is not merely a nuisance record to delete; it can change the probability that the target event is ever observed.

Cause-specific hazard and cumulative incidence answer different questions

A cause-specific hazard asks about the instantaneous rate of one event among units that are still free of any event that removes them from risk. Cumulative incidence asks for the probability that a particular event has occurred by time t in the presence of competing events.

A covariate can move these quantities differently because it may affect both the target event and its competitors. Always name the estimand rather than calling every competing-risk output “risk”.

Some events can happen more than once

Machines can fail and be repaired. Customers can leave and return. Students can submit several assignments late. A first-event analysis intentionally ignores later events after the first one.

That may be the correct question. If the operational burden comes from total failures, however, recurrent-event methods or count-process models may be more relevant.

Repeated events within the same unit are dependent, linking this article to Clustered and Multilevel Data. The event definition and dependence structure must be aligned.

Multi-state models represent transitions rather than one terminal event

A process may move from active → degraded → repaired → active → retired. Collapsing everything into time to retirement can be useful but discards intermediate dynamics.

Multi-state models represent possible transitions and their timing explicitly. They are valuable when pathways matter, not only the final state.

The added complexity should pay for itself in a real question. Do not build a multi-state model merely because the software can display a more elaborate diagram.

Parametric models trade flexibility for structure

Exponential, Weibull and other parametric lifetime models assume a particular functional form for the event-time distribution or hazard. When suitable, they can produce smooth estimates, extrapolation and interpretable parameters.

The price is stronger structural assumption. A good in-sample fit does not guarantee credible long-horizon extrapolation.

NIST’s reliability handbook chapter provides an engineering route into lifetime distributions, censoring and failure-rate modelling.

Calendar changes can violate stationarity

A service launched in 2022 and the same service launched in 2026 may face different user expectations, infrastructure and alternatives. Pooling their durations without accounting for calendar period can mix different systems.

Cohort effects, seasonality and changing policies can alter event rates. Time-to-event analysis measures duration; it does not make the world stationary.

Where current conditions matter, include calendar time, stratification or cohort structure as appropriate and state the evidence freeze.

Missing covariates and censoring are separate incomplete-data problems

A unit can have a censored event time and also lack a baseline predictor. Standard survival software may then drop the row because of the missing predictor, even though the censored follow-up still contains useful event-time information.

Handle missing covariates according to a defensible missing-data strategy. Do not assume that a survival model automatically solves every kind of missingness because it handles right censoring.

Prediction needs calibration at the time horizon people use

A model can rank units by hazard reasonably well while misestimating absolute event probabilities. Discrimination and calibration are different properties.

For a decision at twelve months, check predicted versus observed twelve-month event probabilities in relevant groups and time periods. A concordance measure alone does not establish that the stated probabilities are trustworthy.

For deployment in a new population, route the transfer question through External Validity and Evidence Transfer.

Validation must respect time

Randomly splitting historical rows into train and test sets can leak calendar regimes across both samples. If the model will predict future events, a temporal holdout can better represent the deployment challenge.

Repeated events, site clustering and censoring can further complicate validation. The split unit and censoring mechanism should reflect the target prediction task.

A time-to-event curve is not a forecast of one individual

A survival curve describes a population quantity under stated conditions. It does not reveal the exact event time of one unit.

Even a unit with predicted 80% event-free probability at one year can experience the event tomorrow. Probability is not a hidden schedule.

Communicate this distinction when outputs are used by non-specialists. A probabilistic model should not be translated into deterministic language merely because a decision system prefers one date.

Visualisation should show the shrinking evidence base

Plot censoring marks and numbers at risk. Add confidence bands where appropriate. Do not extend the x-axis far beyond the period where meaningful numbers remain under observation.

When curves cross, do not summarise them with “Group A survives longer” without specifying the time range or summary measure. Inspect the event process, not only the area of coloured separation.

Use Data Visualisation for the broader principle that charts should expose uncertainty and denominator changes rather than hide them.

Sensitivity analysis should target censoring and model assumptions

Ask how conclusions change under alternative functional forms, time-varying effects, plausible censoring mechanisms, different horizons or competing-risk definitions. The choice should be motivated by an identified vulnerability.

A result that reverses under a modest, plausible change deserves different language from one that remains stable across relevant alternatives.

Route the general methodology to Sensitivity Analysis and Robustness Checks.

The reporting contract for time-to-event evidence

State the event definition, time origin, time scale, follow-up window and censoring rules. Report how many events occurred and how many observations were censored, with reasons where relevant.

For Kaplan–Meier estimates, show numbers at risk and the time points used for summaries. For regression, state the model, covariates, handling of time-varying quantities, proportional-hazards assessment and any clustering or stratification.

For competing risks, identify all competing events and distinguish cause-specific hazards from cumulative incidence. For recurrent events, state whether only first events or all events were analysed.

Report the data edition and analysis horizon. A time-to-event result can change when follow-up matures, so later editions should preserve the earlier evidence freeze rather than silently replacing history.

A learner’s seven-question time check

  1. What event ends the clock?
  2. When does the clock start?
  3. Which observations are censored, and why?
  4. Who is in the risk set at each event time?
  5. Is the reported quantity survival probability, hazard, cumulative incidence or mean event-free time?
  6. Could a competing event or changing exposure alter the interpretation?
  7. Does the model remain supported at the time horizon being used?

These questions turn a specialised statistical technique into a general habit of temporal reasoning.

Where this article sits in the eduKate Library

This article owns the general statistical problem of incomplete event times and risk sets. It does not own clinical prognosis, medical treatment, biological survival or veterinary outcomes. Those remain with their specialist canonical owners. The same mathematical machinery can be explained here because it also applies to engineering reliability, service duration and other non-clinical event processes.

Use Missing Data Analysis for broader incomplete-data mechanisms, Clustered and Multilevel Data for dependent event records, and Statistical Inference and Uncertainty for inferential foundations.

Sources and further reading

Source pages were checked for this edition on 5 September 2026. The six-machine Kaplan–Meier calculation is an original illustration. Medical tutorials are cited only for statistical explanation; no clinical recommendation is made here.

Continue through the Library: Missing Data Analysis → Statistical Inference and Uncertainty → Causal Inference → Research Collections Directory.

Explore the connected learning guides

Choose the question that brought you here. Open one useful guide, try a small task, and stop when you have what you need.

Take one question further

The same learning habit can travel across subjects, while each subject keeps its own methods. These routes help you notice a difficulty, understand one part of it, and return to something you can do.

A word is familiar, but using it is difficult.

Move from recognising a word to retrieving it in a new context. Understand vocabulary plateaus.

Try it without the guide: Choose one word you already know. Close the guide and use it in a new sentence. Explain why it fits; try another context tomorrow.

A piece of writing has ideas, but the reader loses the thread.

Make the order of events and the links between sentences clear. Explore composition writing.

Try it without the guide: Choose one short paragraph. Read the relevant explanation, close it, and revise the paragraph. Ask someone to tell you what happened and why.

The Mathematics seems familiar, but marks still disappear.

Find the first point where the working stops being reliable. Find Secondary 4 A-Math mark leakage.

Try it without the guide: For a Secondary 4 A-Math question you have attempted, locate the first uncertain line. Repair that step, then try a comparable question without the worked answer.

A Science fact is remembered, but the explanation is incomplete.

Connect the evidence to a scientific idea and the resulting change. Follow the Primary Science learning route.

Try it without the guide: Choose a familiar Primary Science example. Explain the evidence, the idea and the result without notes. Then change one condition and explain your prediction.

Two accounts of the world seem to disagree.

Check the question, source, date and evidence before combining claims. Explore the World Knowledge research library.

Try it without the guide: Take one claim. Find the source best placed to support it, note its date, and state what remains uncertain. Return to your original question.

There is plenty of help, but independence is hard to see.

Check what the learner can understand and do after support is removed. Understand how education works.

Try it without the guide: Choose one small task the child has practised. Agree on a calm, brief attempt without prompts. Use what happens to choose one next step, then stop.

For the structure behind these connections, read the eduKateSingapore runtime manifest and the eduKate ecosystem boot contract. The reader map describes public navigation; those manifests preserve the wider ownership and return rules.

Discover more from eduKate Singapore

Subscribe now to keep reading and get access to the full archive.

Continue reading