Conditional on an event and the immediately preceding history, probabilities are proportional to the three instantaneous hazards. Put . The two zero-covariate subjects each have weight one, and the one-covariate subject has weight . The common baseline hazard cancels. Thus
Each individual with zero covariate has probability ; the first boxed probability is their combined probability. Conditioning on an event at a specified continuous time can be understood by the limiting conditional event probabilities in a short interval.
The hazard-weighted covariate mean is , so the Schoenfeld function at the true coefficient is
Multiplying by the two conditional probabilities gives
This verifies the score-centering property directly for this risk set.
For an event at from subject , with covariate vector , define the Schoenfeld function
The second term is the hazard-weighted mean covariate in the risk set just before the event. The Schoenfeld residual is this function evaluated at the fitted coefficient, . Calculate one residual vector per event, using every at-risk subject, including those who will subsequently be censored. There is no ordinary event residual assigned at a right censoring time.
The Cox partial likelihood score function is . At the true constant coefficient in a Cox proportional-hazards model, the conditional event subject is selected with weights proportional to , so each Schoenfeld function has conditional mean zero. If the coefficient varies with time, that centering changes. Plot residuals against event time or a transformation of it, smooth them, and investigate departures from zero. Scaled Schoenfeld residuals account for the risk-set covariate variance and can display departures in coefficient units; score function tests based on residual-time association provide a formal check. Risk-set composition affects unscaled residual variance, and the total residual score function can be zero by fitting even when a time trend is present.
If the risk set has two subjects with covariate zero and one with covariate one, its hazard-weighted mean is . A zero-covariate event has Schoenfeld function , while a one-covariate event has function . At the true coefficient their probabilities are and , so the conditional expected function is zero.