Time-to-Event Data
Survival analysis addresses a fundamental question in medicine: how long until an event occurs? The event might be death, disease recurrence, recovery, or any well-defined transition. Unlike ordinary regression, survival data has a unique feature — censoring. Not every patient experiences the event during the study period, and we cannot simply discard these observations or treat them as events. The Kaplan-Meier estimator elegantly handles this by updating survival probability only at times when events actually occur.
Reading the Survival Curve
The visualization shows two step-function curves — treatment (cyan) and control (red) — each stepping down whenever a death occurs. Tick marks indicate censored observations (patients who dropped out or were still alive at data cutoff). The vertical distance between curves at any time point represents the survival advantage of treatment. The shaded regions show 95% confidence intervals, which widen as patients are lost to follow-up and the estimate becomes less precise.
Hazard Ratio and Clinical Significance
The hazard ratio is the most important summary statistic from a survival analysis. In this simulation, an exponential survival model generates event times with a constant hazard, making the hazard ratio the simple ratio of median survival times inverted. Real clinical data often shows non-proportional hazards — the treatment effect may emerge slowly or diminish over time — requiring more sophisticated models like the Cox proportional hazards regression.
From Statistics to Patient Impact
Statistical significance (p < 0.05) tells us the observed difference is unlikely due to chance, but clinical significance asks: is the difference large enough to matter? A drug that extends median survival by 2 weeks at the cost of severe side effects may be statistically significant with a large sample but clinically meaningless. The simulation lets you explore how sample size, effect size, and censoring interact to determine what studies can actually detect.