Search

Search papers and lessons

Survival Function

Level 3 · 8 min read

The survival function gives the probability that something lasts longer than a given time, and it is the complement of the cumulative distribution function.

On this page

  • Colour = topic mix
  • Calculus
  • Probability
  • Discrete math
  • Sign in to see your progress

TL;DR

The survival function answers one question about a waiting time: what is the chance that it is still going after time tt? It is written S(t)S(t), and for any random waiting time TT it equals P(T>t)P(T \gt t). It is the mirror image of the cumulative distribution function, S(t)=1−F(t)S(t) = 1 - F(t), read from the other end.

Where you'll see it: in clinical trials that plot how many patients remain event-free over time, in reliability engineering that asks how long a component is expected to work, and in churn analysis that asks how long customers stay.

Intuition

Asking how many are still standing

Picture a row of light bulbs switched on together. At time zero all are burning. As time passes some fail. The survival function at time tt is the fraction still burning at tt. It starts at 1, because everything works at the start, and it can only fall as time goes on, because a bulb that has failed does not come back. It eventually drops toward 0 if every bulb eventually fails.

This framing is more useful than the density of failure times in many settings. A density tells you when failures are concentrated. A survival curve tells you how many units are left, and that is what people reading the plot want to know.

Why it is the complement, not a new object

The Cumulative Distribution Function F(t)F(t) already counts how much probability sits at or below tt. A bulb that has failed by time tt is counted there. A bulb still burning at tt is the rest. So S(t)S(t) is just the remaining probability, and nothing new has been introduced.

The reason it gets its own name is the question it answers. Studies of lifetimes care about the part of the distribution that is still alive, because that part is where the future lies.

flowchart LR
  T0[Start: all units alive, S = 1] -->|time passes| Mid[Some fail, S falls]
  Mid -->|time passes| Late[Few remain, S near 0]

The math

Let T≥0T \ge 0 be a random waiting time, with cumulative distribution function F(t)=P(T≤t)F(t) = P(T \le t).

Definition: Survival function
S(t)=P(T>t)=1−F(t),t≥0.S(t) = P(T \gt t) = 1 - F(t), \qquad t \ge 0.

S(t)S(t) is the probability that the event has not yet happened at time tt.

Properties

Every survival function satisfies these facts, which follow directly from the definition and the properties of FF:

  1. S(0)=1S(0) = 1, since T≥0T \ge 0 means the event has not happened at time zero (assuming TT has no atom at zero).
  2. SS is non-increasing: if a<ba \lt b then S(a)≥S(b)S(a) \ge S(b), because {T>b}\{T \gt b\} is contained in {T>a}\{T \gt a\}.
  3. S(t)→0S(t) \to 0 as t→∞t \to \infty for a lifetime that eventually ends.

Probabilities from SS

Most questions about a lifetime reduce to SS:

P(T>t)=S(t)P(s<T≤t)=S(s)−S(t)P(T≤t)=1−S(t)\begin{aligned} P(T \gt t) &= S(t) \\ P(s \lt T \le t) &= S(s) - S(t) \\ P(T \le t) &= 1 - S(t) \end{aligned}

The middle line is the chance the event falls in a window. It is the drop in the survival curve between ss and tt.

The median survival time

The median mm is the time at which half the population has failed. Solving S(m)=1/2S(m) = 1/2 gives mm directly, provided SS is continuous and strictly decreasing at that point. For a continuous lifetime this is the usual median of TT.

The hazard, briefly

The rate of failure at time tt, given survival to tt, is the hazard h(t)=f(t)/S(t)h(t) = f(t) / S(t), where ff is the density of TT. Since f(t)=−ddtS(t)f(t) = -\frac{d}{dt} S(t), the hazard is h(t)=−ddtlog⁡S(t)h(t) = -\frac{d}{dt}\log S(t). Knowing SS therefore determines the hazard, and the reverse also holds.

For the special case of a constant hazard h(t)=λh(t) = \lambda, integrating gives S(t)=e−λtS(t) = e^{-\lambda t}. This is the exponential lifetime model, where failure is equally likely at every moment. The curve is built from the Exponential Function exe^{x}.

Worked examples

Example
Exponential lifetime, mean two years

Suppose a component has a constant hazard of λ=0.5\lambda = 0.5 failures per year. Its lifetime TT is exponential, so S(t)=e−0.5tS(t) = e^{-0.5t}.

  1. Survival to one year: S(1)=e−0.5≈0.6065S(1) = e^{-0.5} \approx 0.6065.
  2. Survival to three years: S(3)=e−1.5≈0.2231S(3) = e^{-1.5} \approx 0.2231.
  3. Chance of failing between years one and three: S(1)−S(3)=0.6065−0.2231=0.3834S(1) - S(3) = 0.6065 - 0.2231 = 0.3834.
  4. Median: solve e−0.5m=1/2e^{-0.5m} = 1/2. Taking logs, −0.5m=log⁡(1/2)-0.5m = \log(1/2), so m=log⁡2/0.5≈1.386m = \log 2 / 0.5 \approx 1.386 years.
  5. Mean lifetime: 1/λ=21 / \lambda = 2 years. The median is below the mean, which is typical for a right-skewed lifetime.

Interpretation: about 61 percent of components survive their first year, and about 38 percent fail in years one to three. Half fail before roughly 1.4 years. The gap between the median and the mean shows that a few long-lived components pull the average up.

Example
Five observed lifetimes, read off the curve

Five units fail at 2, 3, 3, 5 and 8 months, with no censoring so every failure is seen. The empirical survival function is the fraction still alive after each time.

  1. At time 0 all five are alive: S(0)=1S(0) = 1.
  2. After time 2, the units with lifetimes above 2 are 3, 3, 5 and 8. That is 4 of 5, so S(2)=0.8S(2) = 0.8.
  3. After time 3, the units above 3 are 5 and 8. That is 2 of 5, so S(3)=0.4S(3) = 0.4.
  4. After time 5, only the unit at 8 remains. So S(5)=1/5=0.2S(5) = 1/5 = 0.2.
  5. After time 8, none remain, so S(8)=0S(8) = 0.

Interpretation: the curve is a staircase that drops at each observed failure. The empirical median is the smallest time at which the curve is at or below one half, which here is 3 months, since S(3)=0.4≤0.5S(3) = 0.4 \le 0.5. With five units this is a rough picture, but it is exactly the object that larger samples estimate.

Tradeoffs and failure modes

The survival function is simple to define and easy to misread. The usual trouble is in what the data actually shows.

SituationWhat goes wrongBetter choice
Some units have not yet failed when the study endsA plain fraction still alive undercounts failures and biases the curveUse an estimator that handles Censored Data, such as the Kaplan–Meier Estimator
Assuming a constant hazard without checkingAn exponential S(t)S(t) may badly misstate long-term survivalCheck whether the hazard rises or falls, and use a more flexible model
Reading S(t)S(t) as a probability about a fixed unitS(t)S(t) describes the population distribution, not a specific unit's futureBe explicit about the reference population
Comparing curves that crossOne group can be better early and worse late, so a single summary misleadsShow the full curves, not just the median
Using the median for a heavy-tailed lifetimeThe median can look reassuring while a long tail carries most of the expected durationReport the mean or a restricted mean alongside the median

The first row matters most in practice. Real studies end before everything fails, so the units still running at the end carry information that a plain count throws away.

History

Early versions of the idea predate the name. Edmond Halley published a life table in 1693 that tabulated how many people in a city survived to each age, which is the survival function written as a table. Actuaries used such tables to price annuities and insurance through the eighteenth and nineteenth centuries.

The modern estimator that handles incomplete data came in 1958. Edward Kaplan and Paul Meier published a method for estimating the survival curve when some observations are cut short, and it is now the standard way to draw survival curves in medical and reliability studies. The term "survival function" became common as survival analysis spread from actuarial work into biology, medicine and engineering in the decades after.

Check yourself

QuestionRecall: how is the survival function related to the cumulative distribution function?Show answer

S(t)=1−F(t)S(t) = 1 - F(t). The CDF gives the probability the event has happened by time tt, and the survival function gives the probability it has not. They are complements, so knowing one determines the other.

QuestionComputation: a lifetime has S(t)=e−0.2tS(t) = e^{-0.2t}, with tt in years. What is the probability it fails between years two and four?Show answer
  1. S(2)=e−0.4≈0.6703S(2) = e^{-0.4} \approx 0.6703.
  2. S(4)=e−0.8≈0.4493S(4) = e^{-0.8} \approx 0.4493.
  3. The probability of failure in the window is S(2)−S(4)=0.6703−0.4493=0.2210S(2) - S(4) = 0.6703 - 0.4493 = 0.2210.

About 22 percent of units fail between years two and four.

QuestionWhy: why does the survival curve have to be non-increasing?Show answer

Once the event has happened, it cannot un-happen, so the set of units still alive can only shrink. Formally, {T>b}\{T \gt b\} is contained in {T>a}\{T \gt a\} when a<ba \lt b, so P(T>b)≤P(T>a)P(T \gt b) \le P(T \gt a). A rising survival curve would mean probability is being assigned to a unit coming back to life, which is not a lifetime.

QuestionApplied: a reliability team reports that half of a batch of parts fail within 500 hours. A colleague says the parts last 500 hours on average. What is the error, and what would settle it?Show answer

The 500 hours is the median, the time at which SS crosses one half. The mean lifetime is the area under the whole survival curve, ∫0∞S(t) dt\int_0^\infty S(t)\,dt, and it can be quite different from the median if the lifetime distribution is skewed. If the failure times have a long tail, the mean could be well above 500 hours even though half fail earlier. Settling it requires either the full survival curve or the estimated mean from the data, with a note on any parts still working when the test stopped.

Sources