Survival Analysis
Kaplan-Meier survival curves, median survival, and the log-rank test for time-to-event data
Time-to-event data - survival, disease onset, time to failure - is special because not every subject reaches the event by the end of the study. Kaplan-Meier handles that censoring honestly, and the log-rank test compares curves between groups.
What it measures
- The survival curve. The probability of remaining event-free over time, stepping down at each event and accounting for subjects censored along the way.
- Median survival. The time at which half the group has reached the event, with a confidence interval.
- Group differences. The log-rank test for whether two or more survival curves differ, and the hazard ratio between them.
Data you upload
- A time column - how long each subject was observed.
- An event column - 1 if the event occurred, 0 if the subject was censored (lost to follow-up or still event-free at study end).
- An optional group column to compare cohorts.
What you get back
- A Kaplan-Meier step plot, one curve per group, with censoring ticks and a confidence band.
- Median survival per group with 95% CI.
- The log-rank χ² statistic and p-value for the group comparison.
- A hazard ratio with CI when two groups are compared.
Method note
Survival probabilities use the Kaplan-Meier product-limit estimator; the confidence band is computed on the log-log scale so it stays within [0, 1]. The log-rank test weights every event time equally and is the standard non-parametric comparison of survival distributions. Censored observations contribute information up to the point they leave the study rather than being dropped - that is the whole reason to use this method over a naïve proportion.
Related
For comparing groups on a continuous outcome (not time-to-event), see Group Comparison. For binary classifier performance over a threshold, see ROC Analysis. For colony survival fractions after a dose, see Clonogenic Survival.