7

How can I compute $$cov(\sum^N a_k,\sum^{N'}a_k)$$ where $N$, $N'$ are random dependent variables and $a_k$ iid random variables , as a function of (but not necessarily) cov(N,N'), $var(N)$, $var(N')$, $var(a_k)$ and all of their expectation value ?

$N$ and $N'$ are bounded and positive.

My best shot :

\begin{equation} \begin{split} cov(X,Y)&=cov(\sum^Na_k,\sum^{N'}a_k)\\ &=cov(\sum\mathbb{1}_{k<N}a_k,\sum\mathbb{1}_{k<N'}a_k)\\ &=cov(\sum\mathbb{1}_{k<N}a_k,\sum\mathbb{1}_{k<N'}a_k)\\ &=\sum\sum cov(\mathbb{1}_{k<N}a_k,\mathbb{1}_{k'<N'}a_{k'})\\ &=\sum\sum \mathbb{1}_{k<N\cap k'<N'}cov(a_k,a_{k'})\\ &=\sum \mathbb{1}_{k<\min(N,N')}var (a_k)\\ &=\min(N,N')var(a) \end{split} \end{equation}

Feels wrong, is the 4th step right ? I use bilinearity on infinite sums, moreover if $N$ and $N'$ were constants the same method would have worked so...

Thank you

DarkBulle
  • 213
  • 2
    So the number of summands is random? In any case, you might want to take advantage of the fact (or better yet, prove to yourself) that the covariance is a bilinear map. – Galen Nov 06 '21 at 17:19
  • the number of summand is random, yes. Because that is the case, I do not believe I can use bilinearity straightforwardly as is usually done @Galen – DarkBulle Nov 06 '21 at 17:33
  • I am just fiddling with it on paper here. I think you can do it, but you'll need to be familiar with sigma notation (hint: what is $\left(\Sigma^n a_i \right) \left( \Sigma^m b_j \right)$?). – Galen Nov 06 '21 at 17:37
  • We can assume that $N$ and $N^{\prime}$ are finite? I would assume so, otherwise why bother with $\text{Cov}(N, N^{\prime})$? – Galen Nov 06 '21 at 17:38
  • 1
    N and N' are finite and strictly positive, it's $\sum^n_i\sum^{n'}_j a_i b_j$ – DarkBulle Nov 06 '21 at 17:43
  • Is $a_k$ independent of $N$, and $N^{\prime}$? – Galen Nov 06 '21 at 17:57
  • 1
    Yes they are independent – DarkBulle Nov 06 '21 at 18:03
  • 1
    Your idea looks sound, but you made a mistake with the fifth equal sign: when you take the indicator functions out of the covariance, the result is suddenly random (since $N$ and $N'$ are random). This cannot be right, since the left-hand side is not random. – jochen Nov 07 '21 at 10:53
  • Yes indeed @jochen, I realized my mistake too, I left it so that people can "learn" from it – DarkBulle Nov 07 '21 at 14:58

1 Answers1

8

Law of total covariance (wiki) helps here. What you found is when $N$ and $N'$ are given:

$$\operatorname{cov}(X,Y|N,N')=\operatorname{var}(a)\min(N,N')$$

$$\mathbb E[X|N,N']=N\mathbb E[a], \ \ E[Y|N,N']=N'\mathbb E[a]$$

Plugging in gives us: $$\operatorname{cov}(X,Y)=\operatorname{var}(a)\mathbb E[\min(N,N')]+\mathbb E[a]^2\operatorname{cov}(N,N')$$

I'm not sure how you can simplify the expected value of the minimum.

gunes
  • 57,205