Concept Architecture
Concept
Theoretically, the Log-Rank Test is a non-parametric hypothesis test used to compare survival distributions between two or more independent groups. It is based on the null hypothesis that the hazard functions are identical across groups throughout the follow-up period. The test exists to determine whether observed differences in survival are greater than would be expected by chance while appropriately accounting for censored observations.
Mathematically, the log-rank test compares the observed number of events in each group with the number expected under the null hypothesis at every observed event time. These differences are summed across all event times and standardised by their variance to produce a test statistic that follows an asymptotic chi-square distribution. The method is equivalent to the score test from the Cox proportional hazards model when only a group indicator is included.
In practice, the log-rank test is calculated using Kaplan-Meier survival data and event counts at each failure time. Statistical software estimates the expected events, variance and chi-square statistic while accommodating right-censored observations. In health economics, the test is routinely applied to compare survival between treatment groups before selecting or fitting parametric survival models for economic evaluation.
Purpose
Used to compare survival experience between independent groups, evaluate treatment effects on time-to-event outcomes and provide statistical evidence supporting survival analyses used in health economic modelling.
Mathematical Formulae
Primary Formula
?� = (O ? E)� / V
where:
O = observed number of events
E = expected number of events under the null hypothesis
V = variance of (O ? E)
Supporting Formulae
E? = (n? ? d) / n
V = ?((n?n?d(n ? d)) / (n�(n ? 1)))
where:
n?, n? = numbers at risk in each group
d = total number of events at a given time
n = total number at risk
?� ~ ?�? (for comparison of two groups)
Related Mathematical Methods
- Kaplan-Meier Estimator
- Cox Proportional Hazards Model
- Score Test
- Survival Function
- Hazard Function
- Maximum Likelihood Estimation
Example
A clinical trial compares overall survival between standard care and a new therapy. Across all event times, the standard care group records 82 observed deaths compared with 70.4 expected deaths under the null hypothesis. The estimated variance is 12.4.
?� = (82 ? 70.4)� / 12.4 = 10.85
Comparing this value with a chi-square distribution with one degree of freedom yields a statistically significant difference in survival, indicating evidence that the treatment groups have different survival experiences.
Excel Implementation
| Function | Example Formula | Health Economics Application |
|---|---|---|
| SUM | =SUM(B2:B50) | Calculate observed or expected event totals. |
| CHISQ.DIST.RT | =CHISQ.DIST.RT(10.85,1) | Calculate the p-value for the log-rank statistic. |
| COUNTIFS | =COUNTIFS(A:A,">="&A2,C:C,"Group A") | Determine numbers at risk at each event time. |
| IF | =IF(P2<0.05,"Significant","Not Significant") | Interpret hypothesis test results. |
VBA (Optional)
Automate log-rank tests across multiple treatment comparisons and generate summary tables with chi-square statistics and p-values.
Sources
- Collett D. Modelling Survival Data in Medical Research.
- Klein JP, Moeschberger ML. Survival Analysis: Techniques for Censored and Truncated Data.
- Hosmer DW, Lemeshow S, May S. Applied Survival Analysis.
- Kleinbaum DG, Klein M. Survival Analysis: A Self-Learning Text.
- NICE. Health Technology Evaluation Manual.
- Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation.
Related Concepts (2)
Library
Publications
1
NICE DSU Technical Support Document 15: Cost-effectiveness modelling using patient-level simulation — Davis, Stevenson, Tappenden & Wailoo, TSD 15 ed., 2014 (NICE Decision Support Unit (University of Sheffield))
Guidance on individual patient-level (microsimulation) cost-effectiveness modelling — when to use it in preference to cohort models, how to structure it, and how to handle the associated computational and uncertainty challenges.
Frequently Asked Questions (6)
What is the log-rank test?
A hypothesis test comparing survival distributions between groups by comparing observed and expected event counts at each event time.
Source: Mantel 1966
Why is the log-rank test most powerful under proportional hazards?
The log-rank test gives equal weight to differences between the groups at every event time, which makes it most sensitive when the gap between the groups is consistent throughout, the situation described by proportional hazards. When the curves cross or the difference is concentrated in one period, this even weighting can dilute a real effect, and the test loses power. It is therefore well matched to steadily separating curves and less suited to other patterns. Bland and Altman (2004) explain this property.
Source: Bland & Altman 2004
How does the log-rank test work?
The log-rank test works by, at each event time, computing the number of events expected in each group under the null hypothesis of equal survival, based on the numbers at risk, and comparing these with the observed events. The differences are accumulated across all event times into a test statistic that, under the null, follows a chi-squared distribution. A large statistic indicates the observed events depart from those expected under equal survival, so the survival distributions differ between the groups.
Source: Mantel 1966
What assumptions underlie the log-rank test?
The log-rank test assumes that censoring is non-informative and that, for greatest power, the hazards are proportional between groups, meaning the ratio of hazards is roughly constant over time. It gives equal weight to events at all times. When hazards are proportional, the log-rank test is the most powerful rank test for detecting a difference, but when they are not, for instance if survival curves cross, it can lose power, so its assumptions and the pattern of the curves are considered.
Source: Kalbfleisch & Prentice 2002
When is the log-rank test used?
The log-rank test is used to compare survival between groups, such as treatment arms in a clinical trial, when a non-parametric test of whether the survival distributions differ is wanted. It is the standard test accompanying Kaplan-Meier curves. It is most appropriate when hazards are proportional, and it tests for a difference without quantifying its size, for which the Cox model is used. Where the treatment effect varies over time or curves cross, weighted variants may be preferred.
Source: Mantel 1966
What are the limitations of the log-rank test?
The log-rank test tests whether survival distributions differ but does not quantify the size of the difference, for which a measure such as a hazard ratio is needed. It is most powerful under proportional hazards and can lose power when hazards are non-proportional or survival curves cross, since its equal weighting of events may then miss differences concentrated in a period. It also assumes non-informative censoring. These limitations mean it is complemented by regression models and, where appropriate, weighted tests.
Source: Mantel 1966
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 22 Oct 2025
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/log-rank-test
- Term code
- HE-EM-SM-049
Stable URI · Machine-readable · Resolvable · CC BY 4.0