Course contentsShow
← Data Science
Lesson 824 of 2,14521. Survival AnalysisFree lesson

Multiple Group Comparisons

Extending the log-rank test to compare more than two groups and post-hoc considerations.

Multiple Group Comparisons

You'll learn how to compare survival curves for three or more groups and handle the multiple testing challenge.


Extending Beyond Two Groups

So far you've used the log-rank test to compare survival between two groups (treatment vs. control, for example). But what if you have three cancer treatment protocols, four customer subscription tiers, or five different machine maintenance schedules?

The log-rank test naturally extends to multiple groups by comparing the observed versus expected events across all groups simultaneously. Instead of a single comparison, it tests the global null hypothesis: "All groups have the same survival distribution."

The Global Test

When comparing K groups (K > 2), the log-rank test produces a chi-square statistic with K-1 degrees of freedom. A significant result tells you at least one group differs from the others — but not which ones.

Think of it like ANOVA for survival data: you test whether any groups differ before investigating specific pairs.

The Multiple Comparisons Problem

Here's the catch: if your global test is significant, you might want to compare groups pairwise (Group A vs. B, A vs. C, B vs. C). But conducting multiple tests inflates your chance of false positives.

Post-hoc considerations include:

  • Bonferroni correction: Divide your significance level by the number of comparisons (e.g., α = 0.05/3 for three pairwise tests)
  • Stratified or adjusted approaches: More sophisticated corrections that balance power and error control
  • Planned vs. exploratory comparisons: Pre-specified contrasts vs. data-driven exploration

Always start with the global log-rank test. Only dive into pairwise comparisons if justified — and adjust for multiple testing when you do.

Key Takeaway: The log-rank test extends to multiple groups to detect any survival difference; follow up significant global tests with carefully controlled pairwise comparisons to identify which groups differ.