0

An urn contains $n$ balls numbered $1,2, ... , n$. We remove $k$ balls at random (without replacement) and add up their numbers. Find the mean and variance of the total.
enter image description here

The image is the solution of the question. But the algebra is too complicated to me. I think that the first equality in the display, it should be $2k(k-1) E(X_1 X_2)$. Am I right? I also do not understand how he get from the second to third and the third to the fourth equation. Can you help me understand these steps? I guess that the authors use $\sum_{i <j} = \sum_{i=1}^n \sum_{j = i+1}^n = n(n-1)$. I understand that the first equality, but how can we show the second equality?

shk910
  • 3,599
  • Previous discussions of this question: https://math.stackexchange.com/q/3286112/321264, https://math.stackexchange.com/q/2813390/321264. – StubbornAtom Apr 15 '20 at 12:43

1 Answers1

0

When expanding $(\sum_1^k X_i)^2$ the cross terms have the form $X_i X_j$ where $i\ne j$. There are $k^2-k$ of these cross terms, and they all have the same expectation, so no, there is no $2$ missing. A $2$ reappears in the next sum because $$ E(X_1X_2) = \sum_{i\ne j} ij \,P(X_1=i, X_2=j)=2\sum_{i>j}ij\,P(X_1=i,X_2=j).\tag1 $$ For the first algebra step, the authors are writing $$\sum_{i>j} ij = \sum_{j=1}^n\sum_{i=j+1}^nij=\sum_{j=1}^n j \left(\sum_{i=1}^ni -\sum_{i=1}^j i\right).\tag2 $$ They evaluate $\sum j^2$ by writing $\sum j^2 = \sum j(j+1) - \sum j$. They introduce $\sum j(j+1)$ because this sum has a nice form: $$\sum_{j=1}^n j(j+1)=\frac13 n(n+1)(n+2)\tag3$$ since the identity $$j(j+1)(j+2)-(j-1)(j)(j+1) = 3j(j+1)\tag4$$ means that (3) is a telescoping sum and can be evaluated painlessly.

As for the final step, the sum $\sum j[n(n+1)- j(j+1)]$ is evaluated in the form $$ n(n+1)\left(\sum j\right) - \left(\sum j(j+1)(j+2)\right)+2\left(\sum j(j+1)\right)\tag5 $$ using the same telescoping trick to obtain the nice form $$ \sum_{j=1}^n j(j+1)(j+2) = \frac14 n(n+1)(n+2)(n+3).\tag6 $$ The rest is boring algebra, as they say.

grand_chat
  • 38,951