Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › The Survival Function and Event-Time Quantiles

Survival Models Review · Tutorial 95 of 697

The Survival Function and Event-Time Quantiles

Learn how the survival function relates to the event-time distribution and how to calculate survival probabilities, percentiles, and median survival from specified distributions.

Intermediate 9 min read

What You'll Learn

  • Define the survival function using the event time and distinguish it from the cumulative distribution function.
  • Convert between a specified event-time distribution and its survival probabilities.
  • Calculate event-time quantiles using the cumulative distribution or survival function.
  • Find median survival for continuous and discrete distributions.
  • Check distribution support, parameter units, and probability arithmetic when interpreting results.
  • Distinguish a survival probability at a fixed time from a median or a mean event time.

Why the Survival Function Matters

In a time-to-event analysis, a central question is often: what is the probability that the event has not happened by a particular time? The survival function answers this question at every time point. It describes the distribution of the event time from a perspective that is especially natural when the scientific interest is in remaining event-free, alive, or free of a particular outcome.

The event time is a quantity of interest even when it is not fully observed. As covered in the earlier material on event times, censoring can mean that a person's exact event time is unknown. The survival function is defined for the underlying event time, not merely for the recorded follow-up time. Here the focus is on its mathematical relationship to an event-time distribution and on calculating probabilities and quantiles when that distribution is specified.

Definition: Let \(T\) be a nonnegative random variable representing time from a defined origin to an event. The cumulative distribution function of \(T\) is \(F(t)=P(T\leq t)\). The survival function is \(S(t)=P(T>t)\), the probability that the event time is later than \(t\).

From the Event-Time Distribution to Survival

The events \(\{T\leq t\}\) and \(\{T>t\}\) are complements: exactly one of them occurs. Therefore, at every time \(t\),

$$ S(t)=1-F(t), \qquad F(t)=1-S(t). $$

This identity does not require a continuous distribution. In particular, \(F(t)\) includes the probability of an event occurring exactly at \(t\), while \(S(t)\) does not. The strict inequality in \(P(T>t)\) is important when the distribution has a point mass at \(t\). For a continuous event-time distribution, the probability of an event at any one exact time is zero, so the strict-versus-nonstrict distinction does not change the numerical probability.

Because \(F(t)\) is nondecreasing, \(S(t)\) is nonincreasing: as time passes, the probability of still being beyond that time cannot increase. If \(T\geq0\), then \(S(t)=1\) for \(t<0\). If the distribution has no immediate events at time zero, then \(S(0)=1\); if it assigns positive probability to \(T=0\), then \(S(0)<1\). For a proper distribution in which \(T\) is finite with probability one, \(S(t)\) approaches zero as \(t\) increases without bound.

Worked Example: Survival Probabilities From a Discrete Distribution

Suppose a hypothetical event time \(T\), measured in years, has the following distribution: \(P(T=1)=0.20\), \(P(T=2)=0.50\), and \(P(T=4)=0.30\). The probabilities sum to \(0.20+0.50+0.30=1.00\), as required.

At \(t=1\), survival means \(T>1\), so the event times 2 and 4 contribute:

$$ S(1)=P(T=2)+P(T=4)=0.50+0.30=0.80. $$

Equivalently, \(F(1)=P(T\leq1)=0.20\), and \(S(1)=1-F(1)=1-0.20=0.80\). At \(t=2\), only the outcome \(T=4\) is strictly greater than 2, so \(S(2)=0.30\). The mass at \(T=2\) is included in \(F(2)\), giving \(F(2)=0.20+0.50=0.70\), and again \(S(2)=1-0.70=0.30\). All probabilities are dimensionless; the times at which they are evaluated are in years.

Event-Time Quantiles and Median Survival

A quantile describes a location in the event-time distribution. For \(0<p<1\), define the \(p\)-quantile as the lower generalized inverse of the cumulative distribution function:

Definition: The \(p\)-quantile of \(T\) is \(q_p=\inf\{t:F(t)\geq p\}\). Using \(S(t)=1-F(t)\), the same quantile can be written \(q_p=\inf\{t:S(t)\leq1-p\}\). The median event time is \(q_{0.5}\), the first time at which the cumulative probability is at least one half (equivalently, survival is at most one half).

The infimum convention matters for distributions with jumps. If \(F\) jumps across \(p\), the quantile is the time at which the jump occurs; it need not satisfy \(F(q_p)=p\). For a continuous distribution that reaches the quantile without a flat interval, \(F(q_p)=p\), and hence \(S(q_p)=1-p\). The median is commonly reported as median survival, with the time unit stated.

The relationship between the two quantile definitions follows directly from the complement identity. For every \(t\), \(F(t)\geq p\) if and only if \(1-F(t)\leq1-p\), which is equivalent to \(S(t)\leq1-p\). Thus the sets of times in the two definitions are identical, and their infima are identical as well. This also shows why one should use a threshold of \(0.5\) for median survival, but \(1-p\), not \(p\), when translating a general \(p\)-quantile into survival-function language.

Worked Example: Median and Upper Quantile Under a Uniform Distribution

Suppose a hypothetical event time \(T\), in weeks, is uniformly distributed between 2 and 8 weeks. Its density is \(1/6\) on that interval, so for \(2\leq t\leq8\),

$$ F(t)=\frac{t-2}{6}, \qquad S(t)=1-F(t)=\frac{8-t}{6}. $$

For times before 2 weeks, \(F(t)=0\) and \(S(t)=1\); after 8 weeks, \(F(t)=1\) and \(S(t)=0\). To find the median, solve \(F(t)=0.50\):

$$ \frac{t-2}{6}=0.50 \quad\Longrightarrow\quad t-2=3 \quad\Longrightarrow\quad t=5\text{ weeks}. $$

Checking with survival gives \(S(5)=(8-5)/6=3/6=0.50\). Thus the median event time is 5 weeks. For the 75th percentile, set \(F(t)=0.75\): \((t-2)/6=0.75\), so \(t-2=4.5\) and \(q_{0.75}=6.5\) weeks. Equivalently, \(S(6.5)=(8-6.5)/6=1.5/6=0.25=1-0.75\). The calculations use a continuous distribution, so the equality conditions hold at these quantiles.

A Parametric Example and a Calculation Check

For a specified parametric distribution, calculate survival by either taking the complement of its cumulative distribution function or using its stated survival formula. For example, if \(T\) has an exponential distribution with rate \(\lambda>0\), then \(F(t)=1-e^{-\lambda t}\) and \(S(t)=e^{-\lambda t}\) for \(t\geq0\). The rate has units of inverse time, so \(\lambda t\) is dimensionless. The median follows by solving \(e^{-\lambda t}=0.5\).

Worked Example: Survival Probability and Median Under an Exponential Distribution

Suppose, hypothetically, that event time \(T\), measured in months, follows an exponential distribution with rate \(\lambda=0.20\) per month. The model gives \(S(t)=e^{-0.20t}\). At 3 months,

$$ S(3)=e^{-(0.20)(3)}=e^{-0.60}\approx0.5488. $$

Thus, under this specified distribution, the probability that the event time exceeds 3 months is approximately 0.5488, or 54.88%. The cumulative probability by 3 months is \(F(3)=1-0.5488=0.4512\); these complementary probabilities sum to 1, up to rounding.

For the median, solve \(S(t)=0.50\):

$$ e^{-0.20t}=0.50 \quad\Longrightarrow\quad -0.20t=\ln(0.50) \quad\Longrightarrow\quad t=\frac{-\ln(0.50)}{0.20} =\frac{\ln(2)}{0.20} \approx3.466\text{ months}. $$

The median is approximately 3.466 months. Substitution checks the result: \(e^{-(0.20)(3.466)}\approx0.5000\), allowing for rounding. The rate is positive and has units per month, and the calculated time is nonnegative, so the model and parameter units are consistent with an event time measured in months.

Assumptions, Diagnostics, and Common Pitfalls

A survival probability or quantile calculated from a specified distribution is conditional on that distribution being an appropriate description of the event time. The basic complement identity itself needs no parametric assumption; it holds for any probability distribution. Parametric calculations, by contrast, depend on the selected model, its parameter values, and its support. The time origin and units must also be clear: changing the origin or expressing the same time in days rather than months changes the numerical inputs and may change how the parameters are represented.

  • Check probability arithmetic. Probabilities at distinct possible event times must sum to one. A discrete survival probability includes only masses at times strictly greater than the time being evaluated.
  • Check the support and endpoints. For a nonnegative event time, a proposed quantile cannot be negative. For a proper finite-event-time distribution, \(S(t)\) should remain between 0 and 1, be nonincreasing, and approach 0 in the far tail.
  • Check units inside formulas. In an exponential model, the product of the rate and time must be dimensionless. A rate stated per week cannot be multiplied directly by a time stated in months without converting units.
  • Check for jumps. In a discrete distribution, a quantile may fall at a jump where \(F(q_p)>p\); insisting on exact equality can give the wrong answer.
  • Separate the underlying event time from its observation. A censored follow-up time does not establish that the event happened at that time. A probability calculated from a specified distribution describes \(T\), not automatically the recorded follow-up value.

Common mistake: A student finds that \(F(2)=0.70\) in the discrete example and reports \(S(2)=0.70\), reasoning that both quantities describe outcomes “by two years.” The correction is to keep the events distinct: \(F(2)=P(T\leq2)=0.70\), whereas \(S(2)=P(T>2)=1-0.70=0.30\). Including the event at exactly two years in survival would contradict the definition \(P(T>t)\).

Choosing the Right Summary

The survival function, a quantile, and a mean answer different questions. \(S(t)\) gives the probability of remaining beyond one specified time and can be evaluated at many times to describe the distribution. The median gives one central time threshold: at least half the event-time distribution is at or before the median under the generalized-inverse definition. The mean is an average over the full distribution and may be strongly affected by a long right tail. A mean is not generally interchangeable with a median, and neither alone gives the full curve of survival probabilities.

In joint modeling, the event-time distribution is considered alongside a longitudinal outcome, such as a repeatedly measured biomarker. The survival function supplies a clear way to express event-time probabilities, but a marginal survival probability by itself does not describe how event time is associated with the evolving biomarker. That association requires additional modeling.

A practical calculation sequence is to state the event time and its units, identify the distribution and its support, write \(F(t)\) or \(S(t)\), and then compute the requested probability or quantile. Finally, verify that \(F(t)+S(t)=1\), that survival is nonincreasing, and that any reported time has the correct units. These checks catch many errors without requiring a more elaborate method.

Check Your Understanding

Try each question, then compare your reasoning with the solutions below.

  1. A continuous event-time distribution has \(F(10)=0.35\), where time is measured in days. Find \(S(10)\) and interpret it.
  2. For a discrete event time, \(P(T=1)=0.10\), \(P(T=3)=0.60\), and \(P(T=5)=0.30\), with time in years. Find \(S(3)\) and the median event time.
  3. An event time is uniform on the interval from 0 to 12 months. Find its 25th percentile and verify the corresponding survival probability.
  4. An exponential model has rate \(0.10\) per week. Find the median event time, in weeks, using the survival function.

Solutions. (1) \(S(10)=1-F(10)=1-0.35=0.65\). Under the distribution, the probability that the event time exceeds 10 days is 0.65. (2) \(S(3)=P(T>3)=P(T=5)=0.30\). The cumulative probability reaches 0.10 at year 1 and 0.70 at year 3, so \(q_{0.5}=3\) years. (3) For a uniform distribution on \([0,12]\), \(F(t)=t/12\) on that interval. Solving \(t/12=0.25\) gives \(q_{0.25}=3\) months, and \(S(3)=1-3/12=0.75=1-0.25\). (4) Set \(e^{-0.10t}=0.50\), giving \(t=\ln(2)/0.10\approx6.931\) weeks. Substitution gives \(S(6.931)\approx0.50\), as required.

Clinical Biostats