No history yet

Introduction to Survival Analysis

What is Survival Analysis?

How long will a new phone battery last before it stops holding a charge? After a cancer diagnosis, what is the probability a patient will survive for five years? How long will a customer keep their subscription before they cancel?

These questions all deal with the same fundamental problem: measuring the time until a specific event happens. This is the core idea behind survival analysis. It's a set of statistical tools for analyzing "time-to-event" data.

Every survival analysis problem has two key components:

  1. Survival Time: The duration until the event occurs. This could be measured in days, years, or miles.
  2. Event: The specific outcome of interest. This could be death, a machine failure, or a customer churning.

While it's called "survival" analysis, the event doesn't have to be death. It can be any well-defined endpoint.

This method is crucial in many fields. Medical researchers use it to evaluate new treatments, engineers use it to predict when parts will fail (a field called reliability analysis), and businesses use it to understand customer behavior. The common thread is the focus on when things happen.

The Challenge of Incomplete Data

A major reason survival analysis is so useful is that it's designed to handle incomplete data. Imagine a five-year medical study testing a new drug. When the study ends, some patients might still be alive. We don't know their exact survival time, but we know they survived for at least five years.

This situation is called censoring. The most common type is right-censoring, where the event of interest has not happened by the end of the observation period. It can also happen if a participant moves away or withdraws from a study. Their data isn't useless; it's just incomplete. We know something valuable: they survived up to a certain point.

Standard statistical methods, like calculating an average, would be misleading here. If we ignored the censored patients, our average survival time would be too low. If we included them as if they had the event at the end of the study, it would be inaccurate. Survival analysis provides the right tools to incorporate information from both censored and uncensored observations.

Describing Survival Patterns

To understand time-to-event data, we use two fundamental functions: the survival function and the hazard function.

Survival Function

noun

The probability that the time to the event (T) is greater than some specified time (t). It represents the likelihood of 'surviving' past a certain point.

The survival function, denoted as S(t)S(t), is a cornerstone of survival analysis. It answers the question: What's the chance the event has not happened yet by time tt?

Mathematically, it's written as:

S(t)=P(T>t)S(t) = P(T > t)

Here, TT is the random variable representing the event time. The function S(t)S(t) always starts at 1 (at time 0, the probability of having survived is 100%) and decreases over time as more events occur. It can never increase.

While the survival function gives a broad overview, the hazard function, h(t)h(t), provides an instantaneous perspective.

Hazard Function

noun

The instantaneous rate at which the event occurs at time t, given that it has not occurred before t. It measures the immediate risk of the event happening.

The hazard function answers a more specific question: If an individual has survived up to time tt, what is the risk of the event happening in the very next instant? Unlike the survival function, the hazard function is a rate, not a probability, and its value can be greater than 1. It can increase, decrease, or stay constant over time, describing how the risk evolves.

For example, the risk of a new car failing is highest in the first few months (due to manufacturing defects) and again much later as parts wear out. The hazard function would capture this changing risk profile. Together, the survival and hazard functions provide a complete picture of time-to-event data.

Quiz Questions 1/5

What is the primary goal of survival analysis?

Quiz Questions 2/5

In a five-year medical study, some participants move away and are lost to follow-up before the study concludes. Their data is considered 'right-censored'.