Skip to content
tezvyn:
Menu

Survival Analysis: Predicting When, Not Just If

Source: Wikipedia: Survival analysisHardHow cards are made

Survival analysis predicts *when* an event like user churn will happen, not just *if*. It's used to model customer lifetime or hardware failure rates. The key mistake is using simple averages, which are skewed by users who haven't churned yet (censored data).

Why it exists

Simple metrics like "average user lifetime" are often wrong. Calculating an average today ignores all the users who are still active and haven't churned. This artificially lowers the average and gives a misleading picture of retention. We need a method that correctly incorporates the information from subjects who have not yet experienced the event.

The mental model

Think of predicting a lightbulb's lifespan. You can't wait for every bulb in a batch to burn out; it could take years. Instead, you test them for 1000 hours. Some fail, and you record when. The rest are noted as having survived at least 1000 hours. Survival analysis is the statistical engine that takes both the failure times and these survival times to build an accurate model of reliability. Your active users are the lightbulbs that are still shining.

How it works

Survival analysis uses techniques like the Kaplan-Meier estimator to generate a survival curve, which plots the probability of surviving (e.g., not churning) over time. Instead of a single, misleading average, you get a function that answers questions like, "What percentage of users are still active after 6 months?" It correctly handles "right-censored" data—observations from subjects who drop out of the study before the event occurs (for instance, your analysis period ends while they are still a customer).

When to use it

Use it whenever you are analyzing time-to-event data, especially with censored observations. Three key places this shows up: first, modeling user churn or feature adoption in product analytics; second, A/B tests where the metric is time-to-conversion; and third, hardware reliability engineering for predictive maintenance.

When not to use it

If you only care about if an event happens (like a simple conversion rate), not when, this is overkill. It's also unnecessary if your dataset has no censoring—meaning you have observed the final outcome for every single subject. In that case, simpler descriptive statistics are sufficient.

One canonical example

A SaaS company wants to understand churn. Instead of calculating an average subscription length (which is skewed low by current users), they use a Kaplan-Meier curve. The curve reveals the median survival time is 8 months, meaning 50% of users churn by then. It also shows a 30% probability that a new user will still be subscribed after 12 months. This is far more actionable for financial forecasting than a single, incorrect average.

Interview question

What is the primary reason survival analysis is preferred over simple average calculations for analyzing time-to-event data with ongoing observations?

  • a.It generates a single, more robust average time-to-event by removing incomplete data.
  • b.It can predict the precise future event time for every individual subject.
  • c.It effectively incorporates data from subjects who have not yet experienced the event.Correct
  • d.It is significantly less computationally intensive for large datasets.
Why?

Survival analysis's core advantage is its ability to correctly handle 'right-censored' data, which are observations from subjects who have not yet experienced the event. Simple average calculations ignore these ongoing observations, leading to a misleadingly low average, whereas survival analysis incorporates them to build a more accurate model, often a survival curve, not just a single average.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on statistics — each one lists the topics its interview covers.

See open roles