Solution (source code)

= Solution

For constant hazard $h_i(t)=\lambda$, $S_i(t)=e^{-\lambda t}$. With $D=\sum_i d_i$ and total person-time $T=\sum_i x_i$,
$$
\ell(\lambda)=D\log\lambda-\lambda T,
\qquad
\widehat\lambda=\frac DT.
$$
Thus the maximum-likelihood estimate is events divided by <person-time at risk>.