The log-rank test compares survival experience through the allocation of events within the successive risk sets. Its null is equal hazard functions between the groups over follow-up, with independent individuals and noninformative censoring within groups. At each distinct event time , let be the numbers at risk immediately before that time, and let be event counts. Under the null, conditional on the total , the expected number of A events is .
The signed log-rank statistic is the observed-minus-expected scoreA positive score indicates relatively more A events than expected, hence a higher event hazard for A; B's score is its negative. Censoring times do not produce score terms, but remove people from all later risk sets.
At each event time the conditional null allocation is hypergeometric, as if the events were sampled without replacement from the risk set. Its variance gives the score-increment variance, with the finite-population correction for ties. Summing these conditional variances gives , since distinct-time martingale score increments have zero cross covariance under the null. For sufficiently many informative events, is approximately standard normal and approximately chi-squared with one degree of freedom. In the no-tie case, each variance contribution is . A time at which only one group remains at risk contributes no comparative information.
The numerical parts below report signed-score and variance contributions after day 160. They cannot be added as separate chi-squared statistics to the earlier follow-up: add the scores and variances first, and standardize once for the complete dataset. The log-rank test is particularly effective for proportional hazards alternatives; crossing hazards can produce cancelling score contributions.
At day 165 there are two A and two B individuals at risk. The event is in A, with expected A count , so its score contribution is and its variance contribution is . The remaining A individual is censored at 173 and leaves the risk set before either later event. The risk-set calculations are
ThusThe positive score indicates higher A event hazard in this late contribution. Although B has more observed events, its two events occur with no A individual at risk, so those times do not compare the groups. This is why raw event totals alone are insufficient for the log-rank test.
Keeping the event-free A individual under observation through day 193 leaves them in the risk set at both later B events. Now the calculations are
ThereforeThe negative score now indicates lower A event hazard, relative to B, in the contribution after day 160. The observed event counts have not changed. The change is in what events A was expected to contribute: its additional event-free exposure makes the two later B events informative comparisons, producing negative A score terms. No conclusion about the complete study's significance follows from this late contribution without the earlier scores and variances.
Articles by others on the same topic
There are currently no matching articles.