= Solution
At event time $t_j$, let $n_{Aj},n_{Bj}$ be the two <risk set> sizes, $n_j=n_{Aj}+n_{Bj}$, and let $d_{Aj},d_{Bj}$ be the event counts with $d_j=d_{Aj}+d_{Bj}$. Under the null hypothesis of equal hazards, conditioning on the risk set and total number of events gives a <hypergeometric distribution>, so
$$
e_{Aj}=\mathbb E(d_{Aj})=d_j\frac{n_{Aj}}{n_j},
$$
and
$$
v_{Aj}=\operatorname{Var}(d_{Aj})
=\frac{n_{Aj}n_{Bj}d_j(n_j-d_j)}
{n_j^2(n_j-1)}.
$$
The <log-rank statistic> and its estimated null variance are
$$
U=\sum_j(d_{Aj}-e_{Aj}),
\qquad
V=\sum_jv_{Aj}.
$$
Under the null, $U/\sqrt V$ is asymptotically standard normal, or $U^2/V$ is asymptotically chi-squared with one degree of freedom.
Back to article page