The Kaplan–Meier estimator constrained to have survivor function value at maximizes the right-censoring log-likelihood subject to the displayed constraint. Here is the discrete hazard, the event count and the risk set size. In an interior event-time solution, a Lagrange multiplier gives before the constrained time, with afterwards. The multiplier is chosen to satisfy the product constraint. It is essential to allow a zero-event jump at the constrained time or another relevant cell boundary: a constraint can require mass outside observed event times. A general implementation instead maximizes the concave probability-mass log-likelihood with total mass one and mass above equal to , allowing all relevant cells and a terminal tail. This also handles unobserved tails and boundary solutions without imposing unjustified event-only support.
Cumulative hazard function Created 2026-09-24 Updated 2026-10-14
Suppose has an absolutely continuous probability distribution, with survival function . On an interval where , its cumulative hazard is
Here is the hazard function; its integral is dimensionless because the units of rate and time cancel. The identity follows by integrating the derivative of , so mere continuity of the survival function is not enough: the absolute continuity assumption supplies a probability density function. If reaches zero, interpret as . The normalization also matters; an initial probability mass at zero would require an initial term .
Accumulating hazard functions adds on the scale and multiplies survival factors on the scale. For and ,
For instance, a cumulative hazard increment of gives event probability , rather than a probability of . With per year, and . With the increasing hazard function per year when is expressed in years, , so gives . Its coefficient has units of inverse years squared.
Figure 1.
Constant and increasing hazard functions, their cumulative hazards, and their survival functions
. Details.
The constant hazard function produces an exponential distribution; the increasing example is a Weibull distribution. Their survival functions both decrease, although one hazard function stays constant and the other increases. At year ten both have and despite different earlier histories. The accumulation identity is described in Lu Tian's Stanford notes, Section 1.1.
For a discrete hazard at each possible event time , the exact counterpart is . Taking its negative logarithm sums , rather than . Therefore exponentiating a Nelson–Aalen estimator does not give exactly the Kaplan–Meier estimator; small-jump comparison of cumulative hazard estimators quantifies the difference.
Discrete hazard Created 2026-10-07 Updated 2026-10-14
At ordered possible failure times , the discrete hazard is . Its survival function satisfies , and hence . Estimating by the observed number of failures divided by the risk set size under independent censoring yields the Kaplan–Meier estimator. Unlike a continuous-time hazard rate, a discrete hazard is a probability between zero and one.
Hazard function Created 2026-09-24 Updated 2026-10-25
For a survival time with an absolutely continuous probability distribution, probability density function , and survival function , the hazard function is
where , with the derivative identity holding almost everywhere. At points where the local limit exists, equivalently
The hazard function measures an instantaneous conditional rate. If time is in years, its units are inverse years, and its value can exceed one. A probability for a short interval is approximately , not ; for an absolutely continuous probability distribution, the probability of an occurrence at the single exact time is zero. The discrete hazard, by contrast, is a conditional probability at a possible event time.
The factorization distinguishes a probability density function for the original population from a hazard function for those still event-free. With an exponential distribution of rate per year, per year but per year: the latter also accounts for the probability of reaching year five. The exponential survival risk over an interval example computes finite-horizon probabilities from this rate.
Kaplan–Meier estimator Created 2026-09-24 Updated 2026-10-14
At distinct observed event times , let be the risk set size immediately before , and let count events at . The Kaplan–Meier estimator of the survival function is
The empty product is one. Each factor estimates a conditional survival probability among those still observed and event-free; their product joins the successive steps. This is nonparametric statistics: no specified shape for the survival distribution is imposed. Use independent censoring and the appropriate risk sets to interpret the result as an estimate for the intended population.
The Kaplan–Meier estimator is a right-continuous function with downward jumps at event times. Right censoring changes later denominators without causing a jump. A tick on the curve marks right censoring, rather than a failure. For a tied group of events, use the one factor ; subjects right-censored at that recorded time remain in for this factor. The fraction estimates a discrete hazard, not a continuous hazard function in inverse-time units. With no censoring, the factors telescope to the fraction of the original cohort whose observed survival times exceed , the complement of its empirical distribution function.
Edward L. Kaplan and Paul Meier published [ref]. Their paper addresses lifetime estimation when observation ends before failure and explicitly calls attention to the assumption of independence between lifetime and potential observation loss. The date 1958 is the original publication year; the publisher's later online-posting date is not the discovery date.
In his [ref], Kaplan traces Meier's interest to cancer-duration data in 1952 and his own to the lifetimes of vacuum tubes in undersea telephone-cable equipment a year later. The journal encouraged them to combine their manuscripts. The shared mathematical question was how to estimate a survival function when some lifetimes are still running or disappear from observation.
Memorylessness of the geometric distribution Created 2026-10-14 Updated 2026-10-20
For the positive-integer geometric distribution with success probability , the displayed identity holds for nonnegative integers whenever the conditioning event has positive probability. The first attempts have failed; future independent attempts use the same success probability. Equivalently, divide the tail by . For a zero-based failures count , use . Constant success probability and independence are essential: accumulated wear or learning would require a different model.
The full remaining-count law is unchanged, not only one tail probability. With , after failures set on the event . For , its probability mass function under this conditional probability is
Here independence makes the future trials unaffected by the observed failures, and the unchanged success probability makes their law identical to the original one. Consequently , while . For the constructed mechanism, five failures leave a mean of more attempts, making the conditional mean total ; the five already spent are still counted.
Figure 1.
Conditioning on five failures, renormalizing, and resetting the count gives the original geometric law
. Details.
The same mechanism has constant discrete hazard:
Thus each reached attempt has the same chance of success. This differs from the decreasing unconditional probability : later success requires surviving earlier attempts. At , only conditioning on an event of positive probability is allowed: permits only , and only .
Among proper laws on the positive integers, memorylessness of the geometric distribution also characterizes the geometric distribution. Write . The identity gives ; if , both sides vanish anyway. Since , induction yields . Properness excludes , so setting recovers the geometric distribution, including .[ref]
The retry example stipulates independent Bernoulli trials with a known constant ; it is not evidence that a real retry system behaves this way. Shared changing conditions or adapting attempts can alter the next success probability. Even constant individual success probabilities alone do not imply independence.
For an original contrasting model, uniformly shuffle one success card and three failure cards, then draw by sampling without replacement. Its success position has the discrete uniform distribution on . Initially the success probability is ; after one failure it is . In particular,
This shows concretely why sampling without replacement need not be independent and why the remaining wait can change. Every draw still has unconditional success probability when all four positions are considered; the relevant discrete hazard changes after failures.
Use , a nonincreasing right-continuous survivor function. The empirical likelihood treats an exact event as a probability mass rather than maximizing an unrestricted probability density function at isolated data points. Under a noninformative observation mechanism, the event-time likelihood contributions are
The second, third and fourth rows account for right censoring, left censoring and interval censoring, respectively. A censoring mechanism with unknown dependence on cannot simply be dropped; these are the event-time factors under independent censoring or another ignorable mechanism.
There is a useful finite-dimensional reduction before optimization. Let be the set in which observation tells us its event time lies. Partition the time axis using all observed endpoints, keeping endpoint singletons when required. Within each cell, membership in every is constant. Assign cell masses , with , including a tail cell when necessary, and let be the cell-membership indicator. Then
Mass locations within a cell are not identifiable and need not be separate parameters. Repeated observation sets can be grouped and their factors raised to their counts. Cells with the same membership column can also be combined. If one column is componentwise dominated by another, transferring its mass to the dominating column weakly increases every factor; hence an unconstrained maximizing distribution can omit the dominated cell. This proves likelihood support reduction under censoring directly. The remaining log-likelihood is a concave function of the probability masses on a simplex, often far smaller than the original unrestricted distribution problem. Added constraints can restrict which transfers remain permissible.
For right censoring alone, take a grid of all distinct observation times and initially allow a discrete hazard
Let be the number of events at and the risk set immediately before that time. For tied recorded times, use the convention that events precede censoring, so those censored at remain in this risk set. The mass at is , and the probability of surviving past is . Substitution into the exact-event and right-censoring factors yields
The exponent counts all observed individuals whose information requires survival beyond that jump. In particular, censoring observations affect the risk set even though they give no event factor.
Each factor can now be maximized separately. For , its derivative is , giving ; the second derivative is negative. The same result holds at the boundaries: if , and if . The Kaplan–Meier estimator is therefore
Only event times contribute nontrivial factors. Residual mass after the last observation may be placed anywhere later without changing the empirical likelihood. A terminal plateau is therefore not evidence of permanent survival; the tail is unobserved.
For a constrained Kaplan–Meier estimator with , first split the support cells at . In the probability-mass representation the exact optimization problem is
The last sum excludes a singleton mass at , because . This is a concave maximization with linear equality constraints, so it directly gives a constrained nonparametric maximum-likelihood estimator. It also handles a time lying between observed events or beyond all follow-up.
An equivalent hazard formulation adds to the grid, permits zero-event jumps when needed, and imposes
For an interior solution using only positive-event jumps before , add to the log-likelihood. Differentiating gives
The multiplier is found by solving the scalar equation
with denominators and fitted hazards in their admissible ranges. On an admissible event-only interior branch, this product is increasing in , making a one-dimensional root search straightforward.
A constraint can require mass at a time with no observed event. The event-only multiplier equation must not be used blindly. To include boundary cases, put . Before , the constraint becomes , and each contribution is
For its multiplier equation again gives . For , its derivative is , so the maximum has when , and may have when . Such a jump supplies mass needed by the constraint; an unobserved tail with is included by the same rule. For example, if every observation is right-censored after and there are no events, the ordinary estimate has . To impose , put mass at and the remaining after all censoring times. The maximized likelihood is , although there are no event-time factors at all. The mass-constrained optimization above automatically accounts for this possibility and for any remaining tail nonuniqueness.
Let and . Since , the discrete hazard satisfies . Hence
Starting from and iterating, the survival function is
Under independent censoring, the risk set just before gives the binomial conditional failure likelihood , whose maximizer is . This gives the Kaplan–Meier estimator
Failures at exactly are included because the target is . Censored subjects contribute to earlier risk sets and leave before later ones; they do not create a failure factor. The usual convention includes a subject censored at a tied failure time in the risk set for that failure. Estimation beyond the last observed failure is limited by the available follow-up.