Suppose we have either 0,1, or 2 claims with respective probabilities 1/4, 1/2, 1/4.
If there is one claim, then the claim size follows a uniform distribution on (0, 15).
If there are two claims, then the claim size follows a uniform distribution on (0, 24).
This means that frequency and severity of claims are not independent of each other, but we should assume as per the problem statement that claim sizes are independent of each other.
Q. Find the mean and variance of the aggregate losses.
Since claim sizes are not identically distributed we cannot use the usual mean or variance formulas for collective risk models.
Let S denote the aggregate losses. We need to find E[$S$] and Var[$S$]. And I think the claim sizes could be denoted by $X_0, X_1, X_2$ for no claims, one claim, and two claims if necessary or we could let $N$ be a r.v. for claim sizes.
So I think I should use E[$S$] = E[E[$S|N$]] and Var[S] = E[Var[$S|N$]] + Var[E[$S|N$]].
I am not familiar with treating $S|N$ as a r.v. itself, so I am unclear how to proceed exactly. I mean how would I start to figure out E[$S|N$]? If I was given an $N=n$, what could $S$ be? It seems like $S$ could be 0 if $n=0$ but what if $n=1$ or $n=2$?
Perhaps instead I should focus on E[E[$S|N$]]. If $N=0$ then E[$S|N$] = 0. If $N=1$ then E[$S|N$] = 1/15. If $N=2$ then E[$S|N$] = 1/24. Then E[E[$S|N$]] = 0(1/4) + (1/15)(1/2) + (1/24)(1/4) = E[$S$].