Assume independent individuals and independent censoring conditional on their explanatory variables, with the censoring mechanism carrying no parameter . A failure contributes its failure-time probability density function , while a censored observation contributes the survival function because its failure time exceeds . Terms from the censoring distribution then factor out of the survival-parameter likelihood. Thus the survival likelihood and its logarithm are
The individual subscripts allow the same parameter vector to act through different covariate values.
Let be an event time and a potential censoring time. Under independent censoring, observe and . For an exponential distribution of rate , an observed failure contributes to the survival likelihood, whereas a right-censored observation contributes . The censoring-law factors may be discarded when they are independent of . Thus, writing and for total observed person-time,
For the unique maximum-likelihood estimate is
Censored times belong in : they record time during which failure was not observed. With and , the likelihood decreases with , so the supremum is at the boundary ; there is no positive interior estimate. This is exponential-rate estimation from censored exposure.
Uninformative censoring means that the potential censoring time supplies no information about the latent failure time after conditioning on the modeled variables. A study ending at a fixed follow-up duration independent of prognosis is an example of administrative censoring. Informative censoring occurs, for example, when a seriously deteriorating patient withdraws because of that deterioration and the prognostic information is omitted from the model. Under informative censoring, those remaining in the risk set are selected by their future failure propensity, so the ordinary survival likelihood and its estimate need not target the true rate.
Using the reported durations and flags as though they were valid right-censored records gives
Treating all durations as failures instead gives
Relabelling has halved the event count without shortening any observed follow-up. The resulting estimate is therefore exactly half the complete-data estimate.
This is not a simulation of uninformative ordinary right-censoring. For a record declared censored at , ordinary right censoring requires ; the construction instead took to be the simulated failure time itself. Keeping a failure time and hiding only its flag does not produce the minimum of that time and an independent earlier censoring time. Even choosing labels at random does not fix this: independence of a flag from the recorded duration is different from independent censoring of a latent event time. Indeed the labelled durations still have mean one while the failure fraction is one half, so their ordinary censored estimate converges to , not the generating rate one. Thus it is not a valid uninformative censoring scheme for the intended failure distribution; strictly, it has not implemented ordinary right-censoring of those simulated failure times at all. One could reproduce the randomly labelled record distribution with independent latent event and censoring times both of rate , but that would be a different failure model, not the claimed rate-one model. Calling the flags random is therefore insufficient to justify the target distribution or its censored likelihood. This is the random relabelling is not independent right censoring issue.
A valid simulation draws independently and , and records . Since
it gives independent censoring with the requested probability. Equivalently generate and from independent uniform random numbers. Another valid choice is fixed censoring at , since . These give a random censored fraction with expectation one half; they do not promise exactly 500 censored records. For the independent-exponential scheme, observed durations have rate two and mean one half, so correctly converges to one.
Let count observed failures and let be the at-risk process, counting subjects under observation and still alive immediately before . Under independent censoring, a short interval of length has conditional expected failure count . The estimating equation obtained by replacing the count expectation by its observation is . Each distinct failure gives and , so the Nelson–Aalen estimator is
The same increment maximizes the local working likelihood for a Poisson distribution with mean : differentiating gives . The counting-process derivation explains why the risk set, rather than the initial sample size, supplies the denominator.
Assume independent individuals and independent censoring: conditional on any modelled covariates, the censoring mechanism gives no additional information about the latent event time and has no parameter shared with its survival distribution. An observed event at contributes the probability density function . A right-censored observation contributes the survivor function , since it establishes only .
More formally, let be an independent censoring time with density and survivor function . The observed pair , has a parameter-dependent factor if and if . The factors involving only the censoring distribution can be omitted from the event-time likelihood. Thus
Using also gives the useful survival likelihood form
Every individual therefore contributes survival exposure, whether or not an event is observed. These formulas do not justify ignoring informative censoring; that situation requires a model for the observation mechanism as well.
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.
The log-rank test compares event counts with their conditional expectations under equal group hazard functions, using the individuals currently in each risk set. Assume the usual independent censoring conditions and independent strata. At pooled event time , let be the group numbers at risk, , and let be the event counts with total . Under the null hypothesis, conditioning on the risk counts and total events gives the hypergeometric distribution
Thus the null expected A count and its conditional variance are
When there is only one person at risk, the event allocation is deterministic and its variance is zero. The unstandardized log-rank statistic is , with variance estimate . Under standard large-sample conditions, is approximately standard normal under the null; the test detects systematic group differences in event rates. It is particularly effective for proportional-hazards alternatives, while crossing effects can cancel in the score.
For a stratified log-rank statistic, construct these risk sets and observed-minus-expected differences separately within each stratum , then sum:
This allows different baseline hazard functions between strata and avoids comparing an event with individuals in another stratum. The null is equal A and B hazards within each stratum, together with a censoring mechanism that does not invalidate the within-risk-set comparison.
In a paired stratum, both individuals initially form the risk set. A first event while both are still observed gives one nontrivial event allocation. After either individual leaves, every subsequent event is certain to belong to the only remaining group and has observed count equal to expected count. Therefore each pair supplies at most one informative table. A pair supplies none if the first exit is censoring before either observed event, if neither has an event during their joint follow-up, or if both fail simultaneously so that the tied event allocation is fixed. An event-censoring tie needs a specified convention; with events processed before same-time censoring, the other individual remains at risk for that event and the pair is informative. The untied continuous-time case avoids this ambiguity.
If A has the informative first event, the table at that time is
The phrase in the second column refers only to this event time; it does not mean that B can never fail. The expected A count is , so this table contributes to , with variance . An informative B-first pair contributes . All other tables contribute zero. Therefore the requested unnormalized score is
A positive score means more observed early events on A. There is no need to standardize it to answer the question.
To obtain an exact conditional law, put . Under the within-pair equal-hazard null, conditional on an event while both are at risk, either subject supplies it with probability . Equivalently, before the pair's first exit, the cause-specific event intensities for A and B are equal; integration over the common period of joint observation gives equal probabilities for the two informative outcomes. This argument requires noninformative observation of the failure process, not just equality of unadjusted marginal survival curves. Different independent pairs then have independent fair signs when informative. Conditioning on the set of informative pairs gives independent Bernoulli outcomes with probability ; conditioning only on their count mixes identical binomial laws and gives the same result:
This proves the paired log-rank reduction to a sign test. The conditional mass function is , , so an exact two-sided p-value sums the masses for with . If , there is no information for a treatment comparison. Failure-time distances beyond their ordering play no role in this paired score.
Use the usual semiparametric Cox proportional-hazards model with observed covariates :
The covariates are implicit in the question's regression fit, even though the displayed data notation only lists exit times and event indicators. Assume entry at a common origin, time-constant covariates, distinct observed times and independent censoring. Write and . Conditional on a single event at in its risk set, the chance that individual supplies it is
The baseline hazard cancels. Consequently estimate by maximizing Cox partial likelihood
For example, the score and information of Cox partial likelihood follow by differentiation. Define , and . Then
When a finite identifiable maximum exists, iterate until convergence. The Observed Fisher information also gives the usual asymptotic coefficient uncertainty. Censored subjects enter the relevant risk sets, even though they supply no numerator event factor.
After fitting , estimate the cumulative hazard of the reference subject by the Breslow estimator
Its jump at an event is the observed event count divided by the total fitted hazard multiplier at risk. The estimate is an integrated baseline hazard, with hazard represented by a measure placing these jumps at observed event times. If a smooth ordinary hazard function is wanted, smooth these increments with a chosen kernel and bandwidth; differentiating the step function as an ordinary function would incorrectly give zero away from the jumps. The fitted individual cumulative hazard is over that individual's follow-up. The invariances below concern this Cox partial likelihood fit and this Breslow estimator; they need not hold for a fully parametric proportional-hazards fit or an arbitrarily smoothed hazard estimator.
With right censoring, an event has not occurred by the last observation time , so the data establish only . One records and , distinguishing an observed event from a censored exit. A business still operating at the follow-up deadline is administratively right-censored. Its observed age is a lower bound on its lifetime, not its eventual closure age. Standard survival analysis requires suitable independent censoring, possibly conditional on the fitted covariates.
Under independent censoring conditional on the modelled covariates, an observed event contributes , and a right-censored observation contributes . Factors from the censoring distribution may be omitted when they contain no survival-model parameters. The survival likelihood and log-likelihood are therefore
Censored individuals still contribute their observed exposure through ; they are not deleted from the analysis.
Let be the distinct observed event times, with individuals at risk just before and events there. Parameterize the event-time distribution by the conditional failure probabilities . Under independent censoring, the survival part of the nonparametric likelihood groups into factors
An individual still under observation at contributes either a failure factor or a survival factor; later-censored individuals contribute the latter factors until censoring. Maximizing each factor independently gives , including the boundary solutions when or . Multiplying the conditional survival probabilities yields the Kaplan–Meier estimator
The notation here denotes the survivor function, as in the question. The estimator is constant between event times. Under the usual simultaneous-event convention, individuals censored at remain in its risk set while events are processed, and are then removed.
The Cox proportional-hazards model specifies
where is an unspecified common baseline hazard and is the individual's covariate vector. The hazard ratio for two fixed covariate vectors is , constant in time. Assume independent subjects and independent censoring conditional on their covariates, and use the question's absence of tied events.
Let be an event time, its failing subject, and the risk set immediately before that time. In a short interval of length , the conditional probability that subject fails, given one failure among those at risk, is
The baseline hazard cancels. Multiplying the successive conditional event-identity factors gives the Cox partial likelihood for :
This is a partial likelihood, not the full survival likelihood for the unspecified . Risk sets evolve with the observed history; the derivation uses their successive conditional hazards, rather than assuming the risk sets themselves are independent.
Define and . For component ,
Differentiating again gives
Thus the score and information of Cox partial likelihood are the sum of event-minus-risk-mean contrasts and the sum of risk-weighted covariance matrices, respectively. The Hessian is negative semidefinite; the likelihood is concave, with strict identifiability requiring variation in the relevant risk-set covariates.
Write the Cox proportional-hazards model as , where is the hazard multiplier and is the unspecified baseline hazard. At an untied event time , let be the risk set immediately before the event and its failing individual. With independent censoring conditional on the covariates, the conditional probability that individual supplies the next event, given an event at that time and the risk set, is obtained by dividing its instantaneous event rate by the aggregate rate:
More precisely this is the limit of the conditional probability for one event in a short interval; simultaneous events have smaller-order probability in the continuous model. Multiplication of these successive conditional contributions gives the Cox partial likelihood
Censored individuals remain in each risk set until their censoring time but supply no numerator. Conditioning removes the baseline hazard; this is a partial likelihood for , rather than a complete likelihood for event and censoring times.
Ties require an observation model or an approximation. Suppose a recorded tie hides the order of continuous events, with no intervening entry or censoring. Put for the tied event set and . An exact marginal contribution for the coarsened ranks is the sum of the ordinary rank contributions over every possible order:
For example, if fail together while remains at risk, the two possible orders give
The risk set is depleted after the first of the two events. This expression concerns the missing event order; it is not the full likelihood of an interval in which the events occurred.
Convenient alternatives are the Breslow approximation for tied event times and the Efron approximation for tied event times:
The first keeps the initial denominator at every event; the second removes an average share of the tied-event multipliers successively. In the example their denominators are and . These conventional partial-likelihood factors omit multiplicities independent of , which do not affect its estimate; they should not be mistaken for normalized probabilities of the unordered event set.
For genuinely discrete event times there is another exact construction. If individual event odds are proportional to , conditioning on exactly events gives the exact tied-set conditional likelihood
For the same three individuals this is . It is not generally equal to the continuous-time rank sum: the assumptions differ.
Large tie groups make naive summation over orders or subsets impractical. Recursion helps with the subset denominator, and Breslow or Efron avoids exhaustive enumeration. However, extensive ties can also indicate that time is measured too coarsely for an exact continuous-time ordering to be a useful target.
For example, if patients are assessed only at annual visits, use one row per patient-year still at risk and model the probability of an event in that interval. A grouped proportional-hazards model follows directly by integrating the hazard over the interval, with covariates constant there:
Fit the resulting person-period likelihood, with Bernoulli distributions for the interval event indicators and interval-specific intercepts. Many events in the same year are then ordinary observations rather than a combinatorial ordering problem. This requires a compatible interval-observation scheme and appropriate independent censoring; it avoids pretending that unobserved within-year event times are known.
Let count observed events and count individuals still in the risk set just before . Under a common hazard function and independent censoring, the expected event count over a short interval, conditional on the observed past, is
Here is the integrated hazard. Thus an estimating increment for is , on the range where the risk set is nonempty. Accumulating these increments gives the Nelson–Aalen estimator
The observation times include both events and censorings, , and is one for an event and zero for censoring. Without ties each event adds ; censoring changes later risk sets but adds nothing immediately. Equivalently, the local event fraction estimates the local hazard increment, and summing those estimates produces the integrated hazard. The counting-process intensity in survival analysis justifies this estimating equation; it does not imply exact finite-sample unbiasedness after the risk set can become empty.
Define the individual background survivor function and common excess component by
Integrating the additive hazard function decomposition gives
The relative survivor function therefore compares actual survival with the survival expected from background mortality, and is common across individuals under this model. If , it is the survivor function of a hypothetical process having only the excess hazard. If excess mortality can be negative, the ratio may exceed one and lacks an ordinary survival-probability interpretation.
To estimate it, let indicate that individual is in the risk set, let , and let count all observed deaths. Assume appropriate independent censoring. The aggregate event intensity is
Consequently the background correction must use the current risk-set average
only on the observed range where . Dividing the event count by estimates the total hazard there. Subtracting the known average background gives the offset-adjusted cumulative hazard estimator
Here is the event count at and ; under an untied scheme . One possible estimate is .
A product-limit version retains the full event fraction, which is especially relevant when the excess mortality is not small. Estimate the relative-survival differential equation by
At an event time it multiplies the curve by . Between events it solves . Starting at one therefore gives the risk-set-adjusted relative survivor estimator
The Kaplan–Meier estimator factor accounts for observed all-cause mortality; the continuous multiplier corrects for known background mortality. The exponential cumulative-hazard version instead has event jumps ; it is close when event fractions are small but is not identical to this product-limit version.
Even if each background hazard is small, its accumulated contribution over long follow-up cannot simply be discarded. Nor should the excess contribution be linearized merely because the background is small. Using the known background integral inside the exponential avoids both errors. The average is over the evolving risk set: replacing it by an initial-cohort mean, or dividing by an arbitrary average of individual background survivor functions, is generally wrong when the background hazards differ. Censoring and deaths change which individuals contribute to the background correction.
Assume independent individuals and independent censoring, with the censoring law not involving the event-rate parameters. If is the survival time and its censoring time, we observe and . The exponential distribution gives
An observed event contributes , while a right-censored observation contributes , because it only says the event has not occurred by . Multiplying these survival likelihood contributions and omitting censoring factors independent of the parameters gives
Without independent censoring the censoring factors cannot generally be discarded in this way.
Let be the observed event count and the total person-time in group . Both groups are present; suppose each has . The grouped log-likelihood is
When , its derivative is and its second derivative is . Therefore the maximum-likelihood estimates are
Both events and censored observations contribute to . If , the likelihood decreases with the positive rate: its supremum is at the boundary , rather than at a finite strictly positive estimate. Writing then describes the closure estimate.
Under the null hypothesis of a common rate, the same maximization gives
Let and . The maximized linear terms cancel, since and . Thus the likelihood-ratio test uses
Interpret a zero-event summand by continuity as zero. If , both likelihood suprema are equal and : no rate comparison is informed by observed events.
Under positive common hazard, independent censoring and the usual increasing-information conditions in both groups, Wilks theorem gives , because the unrestricted model has two rate parameters and the null has one. Reject for large ; at 5%, the usual cutoff is approximately . The chi-squared calibration is asymptotic and can be poor with sparse event counts or boundary estimates.