Solution (source code)

= Solution

For <excess of loss reinsurance> the insurer pays each claim up to its retention level:
$$
\boxed{g(x)=\min(x,M),\qquad x-g(x)=(x-M)_+.}
$$
The cap applies separately to every claim. In particular the retained annual loss is $\sum_j\min(X_j,M)$, rather than a single cap on the annual total.

Let $F_i$ be the <cumulative distribution function> for the claim size on risk $i$, and put $\overline F_i=1-F_i$. The retained severity on that risk has the original <probability density function> on $0<y<M$ and an <atom of a measure> at $M$ of mass $\overline F_i(M)$. Thus $T_I$ has a <compound Poisson distribution> with rate $\lambda_1+\lambda_2$ and the mixture of these capped severity laws. The mixture's mass at $M$ is $\sum_i\lambda_i\overline F_i(M)/(\lambda_1+\lambda_2)$.

For the <capped claim moments>, use the <tail integral formula for moments>. Since $\mathbb P(\min(X_i,M)>x)=\overline F_i(x)$ for $0\le x<M$ and is zero for $x\ge M$,
$$
\mathbb E\min(X_i,M)=\int_0^M\overline F_i(x)\,dx,
\qquad
\mathbb E[\min(X_i,M)^2]=2\int_0^M x\overline F_i(x)\,dx.
$$
Substitution into the <compound Poisson distribution> moment formulas gives
$$
\boxed{\mathbb ET_I=\sum_{i=1}^2\lambda_i\int_0^M\overline F_i(x)\,dx,\qquad
\operatorname{Var}(T_I)=2\sum_{i=1}^2\lambda_i\int_0^M x\overline F_i(x)\,dx.}
$$
Equivalently, the integrals are $\int_0^Mxf_i(x)\,dx+M\overline F_i(M)$ and $\int_0^Mx^2f_i(x)\,dx+M^2\overline F_i(M)$. The annual <variance> uses the retained raw second moments; subtracting their squared means would omit the variation in the <Poisson distribution> count.