Comparing Poisson Processes I'm trying to solve this problem:
Regional and international planes arrive at an airport following independent Poisson processes with rates $\lambda$ and $\mu$, respectively. Each regional plane has independently Y people who transfer to the international plane; suppose $f_1 := E(Y)$ and $f_2 := E(Y^2)$ are known. Find the mean and the variance of the quantity of flyers who board the next international plane.
Here, we need to know how many regional planes arrive before the next international plane. When comparing two exponential random variables, the probability that the regional plane arrives before the international plane is: $\frac{\lambda}{\lambda + \mu}$ However, I'm unsure how to move forward. Can we use an indicator variable and sum over the number of indicator variables that indicate a regional plane has arrived before an international plane?
 A: Given that there are $N$ regional planes that arrive before the next international plane, the total number of regional flyers who will board the next international plane is $$S \mid N = Y_1 + Y_2 + \cdots + Y_N$$ where $Y_i$ are IID with first and second moments $f_1$ and $f_2$.  Thus the unconditional mean is $$\operatorname{E}[S] = \operatorname{E}[\operatorname{E}[S \mid N]] = \operatorname{E}[N \operatorname{E}[Y]] = \operatorname{E}[N f_1] = f_1 \operatorname{E}[N],$$ and the variance is 
$$\begin{align*}
\operatorname{Var}[S] &= \operatorname{Var}[\operatorname{E}[S \mid N]] + \operatorname{E}[\operatorname{Var}[S \mid N]] \\
&= \operatorname{Var}[N \operatorname{E}[Y]] + \operatorname{E}[N \operatorname{Var}[Y]] \\
&= f_1^2 \operatorname{Var}[N] + \operatorname{E}[N]\operatorname{Var}[Y] \\
&= f_1^2 \operatorname{Var}[N] + (f_2 - f_1^2)\operatorname{E}[N],
\end{align*}$$
where we have used the law of total expectation and the law of total variance, respectively.  All that remains is to determine the distribution of the counting random variable $N$.
To this end, suppose the regional planes arrive according to a Poisson process with rate $\lambda$, so that the counting variable is $$R(t) \sim \operatorname{Poisson}(\lambda t)$$ with $$\Pr[R(t) = r] = e^{-\lambda t} \frac{(\lambda t)^r}{r!},$$ and for the international planes, we know that the first interrarival time is exponentially distributed, namely $$\Pr[T_w \le t] = 1 - e^{-\mu t}, \quad f_{T_w}(t) = \mu e^{-\mu t}.$$  Conditioned on the first arrival time of an international plane, the number of regional planes arriving is then $R(T_w) \mid T_w$, and the unconditional number of regional planes arrving is then $$\Pr[N = r] = \int_{t = 0}^\infty \Pr[R(T_w) = r \mid T_w = t] f_{T_W}(t) \, dt = \int_{t = 0}^\infty e^{-\lambda t} \frac{(\lambda t)^r}{r!} \mu e^{-\mu t} \, dt = \frac{\lambda^r \mu}{(\lambda + \mu)^{r+1}}.$$  This is of course a geometric random variable with support on $\{0, 1, \ldots \}$ with parameter $p = \mu/(\lambda + \mu)$, so that $$\Pr[N = r] = p(1-p)^r.$$  From here, it is trivial to compute the desired moments and substitute back into our earlier formulas for the unconditional mean and variance of $S$.
