Finding the Covariance of a Poisson process 
Suppose $\{N(t):t\geq 0 \}$ is a Poisson process with rate $\lambda$. Define $\{X(t):t\geq 0\}$ by $$X(t) = \sum_{i=1}^{N(t)}Y_i$$
  where $Y_1,Y_2,Y_2,\ldots$ are iid with cdf $F$ and independent of $N(\cdot)$

(Let $Y\sim F$. In your answers to the following, you may use $\mu = E[Y]$, $\sigma^2 = Var(Y)$ or moments such $E[Y^2]$, $E[Y^3]$,etc.)

Suppose $0 < s < u$. Determine $Cov(X(s),X(u)$

Attempted solution - 
\begin{align*}
Cov(X(s),X(u)) &= Cov\left(\sum_{i=1}^{N(s)}Y_i,\sum_{j=1}^{N(u)}Y_j\right)\\
&= \sum_{i=1}^{N(s)}\sum_{j=1}^{N(u)} Cov(Y_i,Y_j)\\
&= \sum_{i=1}^{N(s)}\sum_{j=1}^{N(u)}\left(E[Y_i Y_j] - E[Y_i]E[Y_j]\right)
\end{align*}
I am not sure where to go from here, any comments are greatly appreciated.
 A: Method 1. The second line in your attempted solution is not true because the range of summation is also random, but independence allows you to do a similar trick conditionally.
In order to demonstrate the technique, let us temporarily forget about the compound Poisson process and consider the following general cases: Let $M_1$ and $M_2$ be any square-integrable $\Bbb{N}_0$-valued r.v.s which are independent of $(Y_i)_{i=1}^{\infty}$. Define
$$ X_k = \sum_{i=1}^{M_k} Y_i, \quad k = 1, 2. $$
We want to compute $\operatorname{Cov}(X_1, X_2)$. To this end, we first compute $\Bbb{E}[X_1 X_2]$:
\begin{align*}
\Bbb{E}[X_1 X_2]
&= \Bbb{E}\bigg[\sum_{i=1}^{M_1}\sum_{j=1}^{M_2}Y_i Y_j\bigg]
 = \Bbb{E}\bigg[\Bbb{E}\bigg[\sum_{i=1}^{M_1}\sum_{j=1}^{M_2}Y_i Y_j \, \bigg| \, \sigma(M_1, M_2)\bigg]\bigg] \\
&= \Bbb{E}\bigg[\sum_{i=1}^{M_1}\sum_{j=1}^{M_2} \Bbb{E}[Y_i Y_j]\bigg] \\
&= \Bbb{E}\bigg[ (M_1 \wedge M_2)\Bbb{E}[Y^2] + (M_1 M_2 - (M_1 \wedge M_2)) \Bbb{E}[Y]^2 \bigg] \\
&= \Bbb{E}[M_1 \wedge M_2]\operatorname{Var}(Y) + \Bbb{E}[M_1 M_2]\Bbb{E}[Y]^2.
\end{align*}
(Technically you have to check integrability in order to work with conditional expectation. The 2nd moment condition for $Y$ is enough in this case.) Similar but easier computation shows that $\Bbb{E}[X_k] = \Bbb{E}[M_k]\Bbb{E}[Y]$. Thus it follows that
$$ \operatorname{Cov}\bigg(\sum_{i=1}^{M_1} Y_i, \sum_{j=1}^{M_2} Y_j \bigg) = \Bbb{E}[M_1 \wedge M_2]\operatorname{Var}(Y) + \operatorname{Cov}(M_1, M_2) \Bbb{E}[Y]^2. $$
Now, if $N$ is a Poisson process of rate $\lambda$, then $\Bbb{E}[N(s)] = \lambda s = \operatorname{Cov}(N(s), N(u))$ for $0 < s < u$ and hence
$$\operatorname{Cov}(X(s), X(u)) = \lambda s \Bbb{E}[Y^2]. \tag{*}$$

Method 2. The previous method appealed to a general computation. Instead, we can appeal to the property specific to Poisson processes. This approach may produce much verbose and longer solution if you fill in the details, but it explains why we naturally expect $\text{(*)}$.
$X$ is a compound Poisson process, and it is routine to check that $X$ has stationary and independent increments. Using independent increment, we check that
$$\operatorname{Cov}(X(s), X(s+t))
= \operatorname{Var}(X(s)) + \underbrace{\operatorname{Cov}(X(s), X(s+t) - X(s))}_{=0}
= \operatorname{Var}(X(s)). $$
So it remains to compute the variance of $X$. Let $Q(t) = \operatorname{Var}(X(t))$. Then for $s, t \geq 0$,
$$ Q(s+t) - Q(s)
= \underbrace{2\operatorname{Cov}(X(s),X(s+t) - X(s))}_{=0} + \underbrace{\operatorname{Var}(X(s+t) - X(s))}_{=\operatorname{Var}(X(t))}
= Q(t).$$
Together with the condition $Q(0) = 0$, this implies that $Q(t) = ct$ for some constant $c$.
In order to determine $c$, notice that $c = \lim_{\epsilon \to 0^+} Q(\epsilon)/\epsilon$. If is $\epsilon$ is small, however, the probability that $N(\epsilon) \geq 2$ is $\mathcal{O}(\epsilon^2)$ and thus $Q(\epsilon)$ is determined only from the case $N(\epsilon) = 1$ up to error of magnitude $\mathcal{O}(\epsilon^2)$:
$$ Q(\epsilon)
= \Bbb{E}[Y_1^2 \mathbf{1}_{\{N(\epsilon) = 1\}}] + \underbrace{\Bbb{E}[X(\epsilon)^2 \mathbf{1}_{\{N(\epsilon) \geq 2\}}] - \Bbb{E}[X(\epsilon)]^2}_{=\mathcal{O}(\epsilon^2)}
= \epsilon \lambda e^{-\epsilon \lambda} \Bbb{E}[Y^2] + \mathcal{O}(\epsilon^2) $$
This gives $c = \lambda \Bbb{E}[Y^2]$.
A: We have the following standard results:


*

*If $S_N = \sum_{k=1}^{N}Y_k,$ where $Y_{1},Y_{2},\cdots,$ are iid random variables and $N$ is a non-negative integer valued random variable independent of $Y$'s, then
$$E(S_N)=E(N)\cdot E(Y)$$


$$Var(S_N)=E(N)Var(Y)+Var(N)(E(Y))^2$$


*

*If $\{X(t),t\ge 0\}$ is an independent increment process, then for arbitrary times $s$ and $t$,
$$Cov\{X(s),X(t)=Var\left[X(min\{s,t\}) \right]\}$$



Define the stochastic process $\{X(t),t\ge 0\}$  by
$$X(t)=\sum_{k=0}^{N(t)}Y_{k}$$
where $\{N(t),t\ge 0\}$ is a Poisson process with intensity parameter $\lambda>0$ and is independent of the i.i.d. random variables $Y_{1},Y_{2},\cdots,$. Then,
\begin{eqnarray*}
% \nonumber to remove numbering (before each equation)
   E[X(t)] &=& E[N(t)]\cdot E[Y] \\
   &=& \lambda t \cdot E[Y]\\
   Var[X(t)] & = & E[N(t)\cdot Var[Y] + Var[N(t)]\cdot (E[Y])^{2}\nonumber\\
   & =& \lambda t\cdot Var[Y] + \lambda t\cdot (E[Y])^{2}\\
   &=& \lambda t\cdot Var[Y] + (E[Y])^{2}]\\
   Var[X(t)]&=& \lambda t\cdot E[Y^{2}]
\end{eqnarray*}
The process $\{X(t),t\ge 0\}$ possess  independent increment property.
\begin{eqnarray*}
  Cov[X(s),X(t)]&=& Cov[X(s),\overline{X(t)-X(s)}+X(s)] \quad \mbox{(introducing increments)}\\
   &=& Cov[X(s),X(t)-X(s)] + Cov[X(s),X(s)] \\
   &=& 0 + Var[X(s)]\qquad \mbox{by independence of increment}\\
   &=& \lambda s \cdot E[Y^{2}]\\
   &=& \lambda \min\left\{s,t\right\} \cdot E[Y^{2}]
\end{eqnarray*}
