Covariance of random sums of random variables

55 Views Asked by At

Suppose $N$ is a (positive integer) random variable. Let $A = \sum_{i=1}^N X_i, B = \sum_{i=1}^N Y_i$ be sums of iid random variables $X_i$ and $Y_i$. The RVs $N$, $X_i's$, and $Y_i'$s are independent of each others. I want to compute

$$ \text{Cov}(A,B) = \mathbb{E}(AB)-\mathbb{E}(A)\mathbb{E}(B)$$

I know

$$\mathbb{E}(A) = \mathbb{E}(N) \mathbb{E}(X)$$ $$\mathbb{E}(B) = \mathbb{E}(N) \mathbb{E}(Y)$$

where $\mathbb{E}(X)$ and $\mathbb{E}(Y)$ are the identical expectations for $X_i$ and $Y_i$, respectively.

How do I compute $\mathbb{E}(AB)$?