Arte SheetsLearn. Try. Understand.

Statistical & Mathematical Formulas

Log-Rank (Mantel-Cox) Survival Test: Chi-Square & Hazard Ratio

Compare two censored Kaplan-Meier survival curves across discrete event times via the Mantel-Cox Log-Rank test χ^2 = (Σ O_1j - Σ E_1j)^2 / Σ V_j with exact hypergeometric tie variance.

How Oncology Phase III trials compare two censored survival curves!

When patients leave a clinical trial early (right-censoring), comparing raw death percentages with a single 2×2 chi-square table distorts follow-up time! Nathan Mantel (1966) and David Cox (1972) constructed a separate 2×2 risk-set table at EVERY distinct event time t_j: with n_1j and n_2j patients at risk (N_j = n_1j + n_2j) and d_1j + d_2j = D_j total events, Group 1’s expected events under equal hazards are E_1j = n_1j * D_j / N_j with exact hypergeometric variance V_j = n_1j * n_2j * D_j * (N_j - D_j) / (N_j^2 * (N_j - 1))!

Summing across all event rows yields the 1-degree-of-freedom Log-Rank statistic χ^2 = (Σ d_1j - Σ E_1j)^2 / Σ V_j (significant at α = 0.05 whenever χ^2 > 3.8415)! Across 4 trial event intervals where Treatment sees Σ O_1 = 6 deaths vs Σ E_1 = 14.034 expected (Σ V = 5.907), Log-Rank χ^2 = 10.927 (> 3.8415, p < 0.001!) and Pike’s log-rank Hazard Ratio estimate (O_1 / E_1) / (O_2 / E_2) confirms major risk reduction!

Event Interval jAt Risk (n1, n2)Deaths (d1, d2)Expected E1j & Hypergeometric Vj
Interval 1 & 2(40, 40) -> (38, 35)(2, 5) -> (1, 6)E1 = 3.500 + 3.644; V = 1.617 + 1.594
Interval 3 & 4(37, 29) -> (35, 24)(2, 5) -> (1, 4)E1 = 3.924 + 2.966; V = 1.564 + 1.132
Totals Across All 4 IntervalsΣ O1 = 6 DeathsΣ E1 = 14.034Σ V = 5.907 -> χ^2 = 10.927 (p < 0.001)

1-df Mantel-Cox Log-Rank Chi-Square Statistic χ^2

Computes (SUM(B2:B5) - SUM(E2:E5))^2 / SUM(F2:F5) from observed deaths B2:B5, expected deaths E2:E5, and hypergeometric variances F2:F5.

=IF(SUM(F2:F5) <= 0, "Zero Variance", ROUND(((SUM(B2:B5) - SUM(E2:E5)) ^ 2) / SUM(F2:F5), 3))

Two-Sided α = 0.05 Significance Decision (Critical χ^2 = 3.8415)

Compares the 1-df Log-Rank statistic against 3.8415 (and 6.6349 for α = 0.01) without needing statistical add-ins.

=IF(SUM(F2:F5) <= 0, "Zero Variance", IF(((SUM(B2:B5) - SUM(E2:E5)) ^ 2) / SUM(F2:F5) >= 6.6349, "Significant Survival Difference (p < 0.01)", IF(((SUM(B2:B5) - SUM(E2:E5)) ^ 2) / SUM(F2:F5) >= 3.8415, "Significant Survival Difference (p < 0.05)", "Not Statistically Significant (p >= 0.05)")))

Try the example

Use the original values or change them to test your understanding.

Further reading