AI Glossary / Statistics and probability / Intermediate
Survival analysis
Definition
Survival analysis is the branch of statistics concerned with time until a defined event. It handles the timing of outcomes and observations whose event times are only partly known, especially because follow-up ends before the event occurs. Despite its name, it applies to events such as equipment failure, customer departure, or task completion as well as death.
What it means
Knowing whether an event occurred is often insufficient. A customer leaving after one week and another leaving after three years have different histories. Meanwhile, a customer still active when data collection ends has an event time that is unknown, rather than infinite or zero.
Survival methods use the information that such a customer remained event-free for the observed period. This distinguishes them from an analysis that simply discards incomplete histories or labels every unobserved future event as a permanent non-event.
How it works
Define the event, time origin, time scale, and population at risk. For customer departure, specify whether departure means cancellation, inactivity, or another operational rule. Align the start of follow-up so durations are comparable.
Record follow-up time together with an event indicator. Under right censoring, the recorded duration is the earlier of the event time and the censoring time. The indicator distinguishes a known event from the end of observation without that event.
Recognize other observation patterns. Interval censoring means the event is known to occur between two assessments. Delayed entry means a unit enters observation after the chosen time origin, conditional on remaining eligible until entry. These require appropriate methods rather than being treated as ordinary complete durations.
For one event type, the survival function describes the probability of remaining event-free beyond each time. The Kaplan-Meier estimator combines conditional survival proportions at observed event times, using the relevant risk set just before each event.
Censoring removes a unit from later risk sets but does not create a survival-curve drop by itself. Standard interpretations require suitable independent-censoring assumptions, potentially conditional on modeled information. Informative loss of observation can undermine them.
Regression methods relate time-to-event patterns to predictors. A Cox model typically assumes proportional hazards for covariates included with constant coefficients. Parametric and accelerated failure-time models make different assumptions. Choose the method for the question and check its suitability.
Distinguish hazards, survival probabilities, and average event times. A hazard ratio is not generally a risk ratio or a ratio of survival times. Report absolute probabilities or time-based summaries when they better match the business decision.
Competing events and recurrent events need additional care. Treating every alternative event as ordinary censoring may misrepresent the probability of the event of interest. Repeated events within a unit also introduce dependence and a different target.
Evaluate prediction at appropriate time horizons, accounting for censoring and data leakage. A model trained with information recorded after the prediction time cannot support a valid prospective decision merely because its fit looks strong.
Three practical examples
- Customer retention: estimate time until a clearly defined cancellation event.
- Reliability: analyze device lifetimes while retaining units still functioning at study end.
- AI operations: model time until a monitored system requires intervention, with a specified intervention definition and follow-up policy.
Think of it this way
Think of watching several races but leaving before every runner finishes. For an unfinished runner, you know the finishing time exceeds the time already observed. Survival analysis preserves that partial information instead of pretending the runner never finishes or deleting them from the study.
Worked example
Consider an original six-unit example with a common time origin. Events occur at times 2, 5, and 6. One unit is censored at time 3, and the other two are censored at times 8 and 9. Assume censoring is appropriate for a standard Kaplan-Meier analysis.
At time 2, six units are at risk and one has an event, so estimated survival becomes 5/6. The censoring at time 3 leaves survival unchanged but removes that unit from later risk sets.
At time 5, four units are at risk and one has an event. Survival becomes (5/6)(3/4) = 5/8. At time 6, three remain at risk and one has an event, so survival becomes (5/8)(2/3) = 5/12, approximately 41.67%.
The estimated median event time is 6, the first event time at which survival is at most 50%. This tiny illustration provides no precision assessment and should not be treated as a dependable operational forecast. The two final censorings do not imply events at times 8 or 9.
Illustrative case study
Fictional case: Pine Services compares customer retention across signup cohorts. Its first report averages cancellation times only among customers who already left, making newer cohorts appear to leave sooner. Analysts rebuild the data with signup as time origin, include still-active customers as censored observations, and compare suitably defined survival estimates. They also check whether accounts disappear from tracking for reasons related to dissatisfaction. The revised analysis makes incomplete follow-up visible instead of silently excluding it.
Common misconceptions and mistakes
Do not discard every censored observation. Do not code censoring as an event. A survival curve does not describe the proportion of observed records still present without accounting for follow-up. Proportional hazards is an assumption, not a universal property. A predictive association between a feature and departure does not prove that changing the feature would prevent departure.
Business use
Use survival analysis when timing and incomplete follow-up affect decisions. It supports retention planning, maintenance scheduling, and horizon-specific risk estimates. Define the operational event carefully and present uncertainty, follow-up duration, and numbers at risk so managers can judge where estimates are well supported.
People also ask
Must the event be harmful?
No; it may be recovery, purchase, or completion.
Does censoring mean missing all information?
No; it usually preserves a bound on the event time.
Can ordinary regression always replace survival analysis?
Not safely when it ignores incomplete event times or relevant observation mechanisms.
Check your understanding
Why does censoring at time 3 not lower the curve?
Answer: It records observation ending without an event.
What is survival after time 6 in the example?
Answer: 5/12.
Why is the estimated median 6?
Answer: That is the first time estimated survival reaches or falls below one half.
Related terms
- Survival function
- Censoring
- Time origin
- Risk set
- Kaplan-Meier estimator
- Cox model
- hazard
- competing risks
Learn next
Study risk-set construction and Kaplan-Meier curves, then compare Cox and accelerated failure-time models. Learn how competing events and informative censoring change the interpretation of estimated probabilities.
More in Statistics and probability
- Surrogate data testing - Surrogate data testing is a hypothesis-testing approach that compares a statistic from observed data with values computed from artificial datasets generated...
- Survey - A survey is a planned process for collecting information about a population through observations or responses from its units.
- Survey errors - Survey errors are discrepancies or uncertainties that can arise when a survey's results differ from the quantities it is intended to measure.
- Survival time - Survival time is the elapsed time from a defined starting point to a specified event.
- Symmetric distribution - A symmetric distribution has the same probability pattern on either side of a central value.
- Symmetric relationships - Symmetric relationships, in the log-linear modeling sense used here, are associations among categorical variables analyzed jointly without designating one...
Sources
Harrell, Glossary of Statistical Terms: https://hbiostat.org/glossary/ Therneau, survival package vignette: https://cran.r-project.org/web/packages/survival/vignettes/survival.pdf The six-unit Kaplan-Meier calculation is original.
Previous: Survey propagation Next: Survival function