Blog/Survival Analysis

Statistics

Survival Analysis

Modeling time until an event

SK

Skari Team

Skari

July 2026·13 min read

Survival Analysis

Kaplan-Meier curves track the share still 'surviving' over time; each step down is an event.

1.00treatedcontroltime →

Some outcomes aren't a yes or a no — they're a clock. How long until a customer churns? How many months until a part fails? When does a patient relapse? These are time-to-event questions, and they break the ordinary tools in a specific way: at the end of your study, many subjects simply haven't had the event yet.

That unfinished data is the whole reason survival analysis exists. You can't drop those subjects (they carry real information) and you can't pretend the event happened. Survival analysis is the family that uses them correctly.

Note

The defining challenge is censoring — knowing only that a subject survived at least up to some point, not when (or whether) the event eventually came. Handling it right is what separates survival analysis from a plain regression on durations.

Censoring: The Data You Can't Ignore

A subscriber who is still active when the study ends hasn't churned — but you don't know when they will. Deleting them biases the result toward early churners; treating them as churned is simply wrong. Censoring keeps their partial information without inventing an event.

Watch out

Averaging only the subjects who had the event throws away everyone still going — usually the healthiest, longest-lasting cases. That single mistake systematically underestimates survival.

The Survival Curve: Kaplan-Meier

The Kaplan-Meier estimator turns time-to-event data into a survival curve — the share of subjects still event-free at each point in time, stepping down at every event, as the chart above shows. It's the first thing to plot, and comparing two curves is often the whole analysis.

  • Each step down marks an event; flat stretches are event-free periods
  • Censored subjects are handled automatically at the moment they drop out
  • Median survival — where the curve crosses 50% — summarizes the typical time

To test whether two curves genuinely differ — treated vs control, plan A vs plan B — the log-rank test compares them across the whole timeline, not at a single point.

Adding Predictors: Cox Regression

A Kaplan-Meier curve compares groups; Cox proportional-hazards regression brings in predictors. It estimates how each variable changes the hazard — the instantaneous risk of the event — while handling censoring throughout.

Hazard ratioMeaning
Greater than 1Higher risk — the event happens sooner
Equal to 1No effect on timing
Less than 1Lower risk — the event is delayed

A hazard ratio of 1.5 means that predictor raises the risk of the event by about 50% at any given moment — the survival analogue of a regression coefficient.

Beyond the Basics

  • Competing risks — when more than one kind of event can occur (e.g. churn vs upgrade), and one prevents the others
  • Restricted mean survival time (RMST) — average event-free time up to a horizon, an interpretable summary when curves cross
  • Time-varying covariates — predictors that change during follow-up

Survival Analysis in the SKARI Statistical Lab

SKARI's Statistical Lab treats survival as its own family, with the full time-to-event toolkit and censoring handled for you.

  • Kaplan-Meier curves with median survival and the log-rank test
  • Cox proportional-hazards regression with hazard ratios
  • Competing-risks models when several event types compete
  • Restricted mean survival time (RMST) for an interpretable summary
  • Censoring handled correctly throughout, not silently dropped

Takeaway

You get the survival curve, the group comparison, and the predictor effects together — with the censored subjects counted properly rather than thrown away.

Frequently Asked Questions

Why not just run a regression on the durations?

Because of censoring. Ordinary regression can't use subjects who haven't had the event yet, and dropping them biases the result. Survival methods use their partial information.

What is a hazard ratio?

The multiplicative change in instantaneous event risk per unit of a predictor. Above 1 means faster to the event; below 1 means slower.

Kaplan-Meier or Cox?

Kaplan-Meier to describe and compare group curves; Cox regression to estimate the effect of one or more predictors while controlling for others.

Key Takeaways

Outcome

Time

until an event

Handles

Censoring

unfinished data

Describe

K-M

survival curve

Predict

Cox

hazard ratios

Survival analysis answers 'how long?' where other families can only answer 'whether?' Keep the censored subjects, plot the Kaplan-Meier curve, compare with the log-rank test, and model predictors with Cox — and time-to-event data finally gives up its full signal.

Takeaway

Don't discard the subjects who haven't had the event — they're the ones surviving longest, and survival analysis is how you count them.

Relationship Analysis

Regression, the Cox cousin

Group Comparison

Comparing groups the classic way

Hypothesis Testing Basics

The inference framework