Solution (source code)

= Solution

For individual $i$, let $X_i=\min(T_i,c_i)$ and $\Delta_i=\mathbf1_{\{T_i\le c_i\}}$. The preceding <expectation> calculation applies separately at each fixed <censoring> time:
$$
E[H(X_i)]=\theta E[X_i]=1-e^{-\theta c_i}=E[\Delta_i].
$$
Summing and using linearity of <expectation>, with $D=\sum_i\Delta_i$ the failure count, gives
$$
\boxed{\sum_{i=1}^nE[H(X_i)]=\theta\sum_{i=1}^nE[X_i]=E[D].}
$$
This identity needs the stated marginal <exponential distributions>, but not independence between individuals; independence will be needed for the product <likelihood>.