Mean and Variance of Random Sum of Random Variables There are 400 individuals, each of whom has a 0.2 chance of incurring a claim.  If the distribution of the individual claim amount, given that a claim has occurred, is uniform on the interval (0, 200), find the mean and variance of the total claim.
Essentially, what I have going here is that if each $X_i$ follows $U(0,200)$ and the random variable $N$ is binomial such that $N$~$B(400,0.2)$, then I want to find the mean and variance the following random variable (since the $X_i$ are independent):
$$\sum_{i=1}^{N}X_i$$
I suspect that the mean is simply $E(N)E(X_i)=80*100=8000$, but I have no idea how to calculate the variance.  Any help would be appreciated!
 A: $S = \sum_{i=1}X_i$ is a random sum, where the claim size $X_i \sim f_X(x) $ are iid 'portfolio-wide' distributions, and the claim number $N \sim p_N(n)$ is typically poisson, binomial or negative binomial.
To find the mean of a random sum, we need to make use of conditional probabilities. Intuitively, if we knew what the value of $N$ is, say $10$, then it would be quite simple:
$$
E(S|N=10) = \sum_{i=1}^{10} E(X_i) = 10 E(X_1)
$$
but since $N$ is itself random (we do not know how many claims we will have in any given month, we must condition on the value of $N$. To do so, we use the law of iterated expectation, which I'll break down very finely:
\begin{align*}
E(S) &= E_N[E_{X_i}(S|N)]\\
&= E_N \left ( E_{X_i} \left (\sum_{i=1}^N X_i ~ \bigg |~N \right ) \right)\\
&= E_N \left (  \sum_{i=1}^N E_{X_i}(X_i|N) \right )\\
& = E_N \left (  \sum_{i=1}^N E_{X_i}(X_i) \right )\\
& = E_N \left (  \sum_{i=1}^N \mu_i \right )\\
& = E_N \left (  N\mu_1 \right )\\
& = E_N ( N) \mu_1\\
& = \nu \mu_1
\end{align*}
where $\nu$ in your case is $400 \times 0.2$, and $\mu_1 = \frac{200}{2}=100$
Note that we are able to drop the conditioning on $N$ when calculating the expectation of $X_i$ as we assume the claim amounts and the number of claims are independent. The idea is that we don't know $N$, so we average over all possible values of N in order to solve the expectation of the random sum.
As for the variance, we need the law of the iterated variance:
\begin{align*}
\text{Var}(S) &= E_N(\text{Var}_{X_i}(S|N)) + \text{Var}_N(E_{X_i}(S|N)\\
& = \dots \\
& = \nu \mu_2 + \mu_1^2(\tau^2 - \nu)
\end{align*}
where $\nu = E(N)$,  $\tau^2 = \text{Var}(N)$,   $\mu_1 = E(X_i)$,  $\mu_2 = E(X_i^2)$.
I'll leave the intermediate steps in the iterated variance to you
