Timeline for Finding the covariance of two random sums
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 7, 2023 at 12:36 | comment | added | whuber♦ | @ZichaoHuang Sure: condition on $n$ and apply the law of total covariance. | |
Oct 7, 2023 at 11:31 | comment | added | Zichao Huang | I understand that in this case $n$ is fixed. I just encountered a very similar problem recently where $n$ was a binomial random variable rather than a constant. Could we still derive the covariance of two sums under this condition? | |
Oct 7, 2023 at 11:07 | comment | added | whuber♦ | @Zichao $n$ is fixed: that's why the sum at the beginning has zero variance. You can confirm that by inspecting the code at the end following the comment "Specify the sample size." | |
Oct 7, 2023 at 10:35 | comment | added | Zichao Huang | Thanks for the great and insightful answer. I was wondering what if $n$ itself is a binomial random variable, i.e., $n \sim B(N, p)$? | |
Jul 17, 2020 at 18:09 | history | edited | whuber♦ | CC BY-SA 4.0 |
added 1401 characters in body
|
Jul 17, 2020 at 16:13 | vote | accept | Kendal | ||
Jul 17, 2020 at 14:37 | comment | added | whuber♦ | It's just algebra. I think of it as adding and subtracting $\sum_i x_i y_i$ to $\sum_{i\ne j} x_iy_j.$ Adding in this sum gives $\sum_{i,j}x_iy_j=\left(\sum_ix_i\right)\left(\sum_jy_j\right),$ which is a multiple of $\bar{x}\bar{y}.$ | |
Jul 17, 2020 at 4:03 | comment | added | Kendal | Thanks for this great answer. There's just one thing I'm having trouble following though. How do you go from: $\ - \frac{n(N-n)}{N^2(N-1)}\sum_{i\ne j}^N x_iy_j \\$ to $\ - \frac{n(N-n)}{N-1} \bar{x}\bar{y} + \frac{n(N-n)}{N(N-1)}\overline{xy}\\$ | |
Jul 16, 2020 at 21:53 | history | answered | whuber♦ | CC BY-SA 4.0 |