top of page
Writer's pictureAndrew Yan

The Log-Rank Test

Consider a video game played by two teams: 𝑚 boys vs 𝑛 girls.

  1. Each player puts $1 on the table (ticket price), then all players start playing at the same time.

  2. When the first player fails ("killed" in the game), his/her $1 on the table will be divided equally among all the (𝑚 + 𝑛) players, including himself/herself, and he/she will be disqualified from further competition and leave the game with $1/(𝑚 + 𝑛).

  3. In general, when a player fails, his/her $1 on the table will be divided equally among all active players at the time, including himself/herself, and he/she will be disqualified from further competition and leave the game with his/her earned money.

A few remarks on the game:

  • Multiple players may fail at the same time (tied events).

  • A player may quit the game at any time before failure (random censoring) - he/she will take back his/her $1 on the table and keep all his/her current earnings.

  • The game may stop at any time (administrative censoring), or end when all the players have failed. In the former case, the players who have not failed will take back their $1 on the table.

The total of the net earnings of either team is a log-rank score statistic. If the boys and girls are equally skilled at the video game, the expected value of the total net earnings is 0 for each team.

To see this, we briefly introduce the log-rank test for comparing two survival distributions. Let 𝜃 be the logarithm of the constant hazard ratio between the treatment and control groups, and define the null (𝐻₀) and alternative (𝐻₁) hypotheses as follows:

𝐻₀: 𝜃 = 0 vs 𝐻₁: 𝜃 ≠ 0 (1)

Let τ₁ < τ₂ < ∙∙∙ < τₖ be the distinct event (failure) times in the pooled sample, then the Mantel-Haenszel version of the log-rank statistic for testing the hypotheses in (1) is defined as

where 𝑑₁ⱼ is the observed number of events at time τⱼ in the treatment group, 𝑒₁ⱼ = E(𝑑₁ⱼ) and 𝑣₁ⱼ = var(𝑑₁ⱼ) are the expected value and variance of 𝑑₁ⱼ respectively. The test statistic 𝑍 is constructed based on the hypergeometric distributions derived from a sequence of 2x2 tables at the distinct event times. It has an approximate standard normal distribution under the null hypothesis (𝜃 = 0) when 𝑘 is sufficiently large.

The total net earnings for the girls' team (or the net loss for the boys' team) can be calculated as a score statistic 𝑆 = ∑ᵏⱼ₌₁ (𝑑₁ⱼ - 𝑒₁ⱼ), where 𝑑₁ⱼ and 𝑒₁ⱼ = E(𝑑₁ⱼ) are, respectively, the forfeited ($1/player due to failure) and earned money for the boys' team at time τⱼ in the game.

Some notes on the log-rank test:

  • It depends only on the ranks (or order) of the distinct event times. In fact, it is a linear rank test that can be derived by assigning scores to the ranks of the event times.

  • It directly compares hazard functions, not survival functions.

  • It can be derived as the score test for the Cox proportional hazards model.

  • It is most powerful under the assumption of proportional hazards but lacks power if the survival curves (hazards) cross. This does not necessarily make it invalid, though.

  • There are other versions of the log-rank statistic as well as other tests for comparing survival distributions between independent groups.

Why is it called the log-rank test? The "rank" portion of the term is well understood, but where does the word "log" come from? Two possible interpretations are:

  • logarithm (mathematics)

  • a written (chronological) record of something (e.g., events)

The first interpretation is based on the fact that the linear rank version of the test can be derived using the "log-survival" scores. The second interpretation also sounds reasonable since it reflects how survival data are collected in general.

What do you think about the origin of the term "log-rank"?


0 comments

Recent Posts

See All

Comments


bottom of page