Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 30

Survival and Hazard Functions

Recommended resources

Welcome to our next lesson in the fundamentals of survival analysis. In our previous discussions, we established the core ideas of time-to-event data, censoring, and began exploring how to quantify risk. We used the concept of a derivative to understand instantaneous risk and the integral to understand accumulated risk over time, which led us to the cumulative hazard function, .

Today, we will formally define and interpret two of the most essential functions in survival analysis: the survival function, , and the hazard function, . The survival function provides the answer to the most intuitive question: "What is the probability of surviving past a certain time?" The hazard function, which you've had a brief introduction to, answers a more nuanced question: "What is the risk of the event happening right now, given survival up to this moment?" Understanding these two functions is fundamental to interpreting almost any survival model.

The Survival Function: Quantifying "Event-Free" Time

The most direct way to describe the outcome in a time-to-event study is by tracking the proportion of a population that remains free of the event over time. This is precisely what the survival function does.

The survival function, denoted as , is the probability that the time-to-event, , is greater than some specified time .

In simple terms, it's the probability of "surviving" past time . The "event" doesn't have to be death; it could be machine failure, disease recurrence, or customer churn.

  • At the start of the study (), no one has experienced the event, so .
  • As time progresses, individuals experience the event, so the probability of survival can only decrease or stay the same. Therefore, is a non-increasing function.
  • Theoretically, if you follow the population long enough, everyone will experience the event, and the survival function will approach .

The following video provides an excellent visual introduction to the survival function and its relationship to the cumulative distribution function (which tracks the proportion who have experienced the event).

The Statistics of Life and Death | Survival Analysis

This video from the "Very Normal" channel, titled "The Statistics of Life and Death," introduces the survival function in a clear, conceptual way.

Please watch the section from the start of the discussion on functions. Focus on how the survival function is framed as a more natural way to ask about time-to-event probabilities (e.g., "probability of living past 75") and how to interpret its decreasing shape.

To solidify this definition, let's look at a more formal description.

Chapter 4: Probability Models in Survival Analysis

This chapter provides the formal definition of the survival function and its properties.

Please read the subsection 4.1.1 Survivor Function. Pay attention to the three properties that all survivor functions must satisfy and the two interpretations given: the probability for a single item and the expected fraction for a population.

As the text mentions, the survival function is also called the reliability function in engineering or the complementary cumulative distribution function, since , where is the probability of the event happening by time .


The Hazard Function: The Instantaneous Risk

While the survival function tells us about the overall probability of remaining event-free, the hazard function, , gives us a more dynamic, moment-to-moment measure of risk.

The hazard function, , represents the instantaneous potential for an event to occur at time , given that the individual has survived up to time .

This conditional nature is the most important concept to grasp. The hazard is not the overall probability of failure at time ; it's the risk at time for those still at risk at that moment.

Think back to our speedometer analogy. The hazard function is the "risk speedometer." It tells you how high the risk is at any specific instant. Because it's a rate (events per unit of time), its value is not bounded between 0 and 1; it can be greater than 1.

The video below gives an excellent explanation of this conditional concept and how the hazard function is calculated and interpreted.

Hazard and Survival Functions - [Survival Analysis 5/8]

This video from zedstatistics, "Hazard and Survival Functions," masterfully builds the intuition behind the hazard function.

Watch the segment from the introduction of the hazard function. The key takeaways are: How your risk changes depending on how long you've already survived (the conditional part). The formula: h(t) = \frac{\text{probability density function}}{\text{survival function}}. How to interpret the hazard value (e.g., 0.5 means a rate of 0.5 deaths per year for those currently alive).

Interpreting the Shape of the Hazard Function

The real power of the hazard function comes from its shape over time, which tells a story about the nature of the risk. Different processes have characteristically different hazard shapes.

This graph shows four common patterns for hazard functions: decreasing, constant, increasing, and a bathtub shape.
  1. Increasing Hazard (Curve 2): The risk of the event increases over time. This is typical of "wear-out" phenomena. The risk of engine failure in a car increases as it ages. For humans, the risk of death from age-related disease increases throughout adulthood. This is often called an Increasing Failure Rate (IFR).

  2. Decreasing Hazard (Curve 4): The risk of the event is highest at the beginning and decreases over time. This pattern is common in post-surgical survival, where the immediate post-operative period is riskiest. In your field of computer information systems, this is analogous to software bugs: many bugs are found and fixed shortly after a new release, so the "hazard" of encountering a critical bug decreases as the software matures. This is known as a Decreasing Failure Rate (DFR).

  3. Constant Hazard (Curve 3): The risk of an event is the same at all times, regardless of how long an item has survived. This implies a "memoryless" process. An example is the decay of a radioactive atom; its probability of decaying in the next second is constant, no matter how long it has already existed. This corresponds to the Exponential distribution, a key model in survival analysis.

  4. Bathtub Shape (Curve 1): This is a composite shape. There's an initial period of high risk due to "infant mortality" or manufacturing defects (decreasing hazard). This is followed by a period of low, relatively constant risk. Finally, risk begins to increase due to wear-out (increasing hazard). This is a very common model for human lifetimes and for the reliability of complex electronic or mechanical systems.

The following text provides more detail on these hazard shapes and their real-world applications.

Chapter 4: Probability Models in Survival Analysis

This section of the textbook gives a thorough treatment of the hazard function and its interpretation.

Please read the subsection 4.1.3 Hazard Function. Focus on the discussion of the different hazard shapes (increasing, decreasing, and bathtub). The examples provided for each will help solidify your understanding.


The Relationship Between Survival and Hazard

The survival and hazard functions are two sides of the same coin. They are intrinsically linked: a higher hazard rate will cause the survival probability to decrease more rapidly.

  • When the hazard is high, the survival curve will be steep.
  • When the hazard is low, the survival curve will be relatively flat.

The following graph shows this relationship clearly.

This plot shows a survival function (dashed line, right y-axis) and a corresponding hazard function (solid line, left y-axis) for gestational age. Notice that where the hazard rate is low and flat, the survival probability barely changes. As the hazard rate begins to climb steeply (around day 33), the survival probability starts to drop sharply.

As you can see, the survival probability remains very high and stable while the hazard rate is close to zero. As the hazard rate increases, indicating a rising risk of the event, the survival curve begins to slope downwards more steeply.


Conclusion

In this lesson, we have formally defined the two most important functions for describing time-to-event data.

Key Takeaways:

  • The Survival Function gives the probability of remaining event-free beyond time . It is a probability, ranging from 1 down to 0, and is always non-increasing.
  • The Hazard Function represents the instantaneous risk of an event at time , conditional on having survived up to that point. It is a rate (not a probability) and its shape over time (increasing, decreasing, constant, etc.) reveals the nature of the risk.
  • The two functions are inversely related: a higher hazard leads to a more rapid decline in survival.

We have now defined the core concepts needed to model survival data: the survival function to describe outcomes, and the hazard function to describe risk. In our next lesson, we will complete this foundational picture by exploring the precise mathematical relationships that link , , the probability density function , and the cumulative hazard function . This will equip you with a complete theoretical framework for understanding survival models.