Let $(X_n)_{n\ge0}$ be a sequence of iid random variables satisfying $\mathbb{E}[|X_n|^2]<\infty$ and $(S_n)_{n\ge0}$ its sequence of partial sums.
I want to determine $\mathbb{E}[S_n], \mathbb{V}[X_n]$ and $\mathrm{Cov}[S_n,S_m]$ for $n,m \in \mathbb{Z_+}$.
Let $\mathbb{E}[X_i]:=\mu$, $\mathbb{V}[X_i]:=\sigma^2$
Then:
$\mathbb{E}[S_n]=(n+1)\mu$
$\mathbb{V}[S_n]=(n+1)\sigma^2$
But what's $\mathrm{Cov}[S_n,S_m]$? I know the definition of covariance but how can I simplify it?
For $n > m$, \begin{align*} \text{Cov}(S_n, S_m) &= \text{Cov}(S_m + (S_n - S_m), S_m) \\ &=\text{Cov}(S_m, S_m) + \text{Cov}(S_n - S_m, S_m) \\ &= \mathbb{V}(S_m) \end{align*} since $S_n - S_m$ involves $X_{m+1}, \cdots, X_{n}$, which are independent of $X_1, \cdots, X_m$. Changing roles for $m < n$, we can deduce that \begin{align*} \text{Cov}(S_n, S_m) = \mathbb{V}(S_{n \wedge m}) = (n\wedge m + 1)\sigma^2 \end{align*}