# example on variance of stochastic processes

I saw this expression in a book and I cannot understand how did he get this expression. Suppose $Z_t$ and $D_t$ are some stochastic processes and we have these expressions, $Z_{t_k} - Z_{t_{k-1}} = (t_k - t_{k-1})(D_1 + ... + D_{n-k+1}) - t_{k-1}D_{n-k+2}$

$Z_{t_i} - Z_{t_{i-1}} = (t_i - t_{i-1})(D_1 + ... + D_{n-i+1}) - t_{i-1}D_{n-i+2}$

How did they get this covariance equation?

$Cov(Z_{t_k} - Z_{t_{k-1}}, Z_{t_i} - Z_{t_{i-1}}) = (t_k - t_{k-1})(t_i - t_{i-1}) \sum_{m=1}^{n-i+1} Var(D_m) - t_{i-1}((t_k - t_{k-1})Var(D_{n-i+2})$

Any hint appreciated as I cannot figure out which formula they are using here.

-

Assume $n-i+1 < n-k+1$ and that $D_i$ are independent. Substitute for $Z_{t_k}-Z_{t_{k-1}}$ and $Z_{t_i}-Z_{t_{i-1}}$ in ${\rm Cov}(Z_{t_k}-Z_{t_{k-1}},Z_{t_i}-Z_{t_{i-1}})$. Use linearity of covariance. Use the fact that independent random variables are uncorrelated. Use that fact that ${\rm Cov}(X,X) = {\rm Var}(X)$.
Of course, the same holds if $D_i$ are only assumed uncorrelated. – Shai Covo Feb 25 '11 at 8:38