what I am doing wrong in this probability problem?

192 Views Asked by At

An urn contains $n$ balls numbered $1,2, \ldots ,n$. We remove $k$ balls at random and add up their numbers. Find the mean and variance of the total.

Let $X_i$ to be the number shown in the $i$th ball. Then for each $i$ we have $$P(X_i = i) = \frac{1}{n},$$ We now remove $k$ balls from the urn. Define $T =$ the sum of the balls removed, that is, $$T = \sum_{i=1}^k X_i,$$ then $$E(T) = E\left(\sum_{i=1}^k X_i\right) = E(kX_1) = kE(X_1).$$ Now:

$$E(X_1) = \sum_{i = 1}^n i P(X_i = i) = \frac{1}{n}*\frac{n(n+1)}{2},$$ thus, $$E(T) = \frac{k(n+1)}{2}.$$ Now, the variance of $T$ is given by $$\text{Var}(T) = E(T^2) -\left(E(T)\right)^2 = E((kX_1)^2) -\left(E(kX_1)\right)^2,$$ but $$E((kX_1)^2) = k^2E(X_1^2) = \frac{k}{n}\sum_{i = 1}^n i^2 = \frac{k^2}{n}*\frac{n(n+1)(2n+1)}{6} = \frac{k^2(n+1)(2n+1)}{6},$$ and $$(E(T))^2 = \left(\frac{k(n+1)}{2}\right)^2.$$ Thus, $$\text{Var}(T) = \frac{k^2(n+1)(2n+1)}{6} - \left(\frac{k(n+1)}{2}\right)^2 = \frac{k^2(n+1)(n-1)}{12}.$$

However, the answer in the book if $$\text{Var}(T) = \frac{1}{12}(n+1)k(n-k).$$

My question is if i am correct and the book gives an error or I am missing something.

2

There are 2 best solutions below

0
On BEST ANSWER

As I mentioned in the comment, $E(T^2)\not=E((kX_1)^2)$. Instead, we have
\begin{align} E(T^2) & =E(\left(\sum_{i=1}^kX_i\right)^2)=E(\sum_{i=1}^kX_i^2+2\sum_{1\leq i<j\leq k} X_i X_j)\\ & = kE(X_1^2)+2\sum_{1\leq i<j\leq k}E(X_i X_j) \end{align} Some easy computation shows all $E(X_i X_j)$ are equal. So $E(T^2)=kE(X_1^2)+k(k-1)E(X_1 X_2)$.

0
On

I read the book, and it gives $E(T^2 )=kE(X_1 )+k(k−1)E(X_1 X_2 )$, but I cannot see how they come up with that equation

$$\begin{align}\mathsf E(T^2) ~=~& \mathsf E((\sum_i X_i)(\sum_j X_j)) \\[1ex] =~& \sum_{(i,j)}\mathsf E(X_iX_j) \\[1ex] =~& \sum_i\mathsf E(X_i^2)+\sum_{(i,j)\mid i\neq j}\mathsf E(X_iX_j) \\ =~& k\mathsf E(X_1^2)+k(k-1)\mathsf E(X_1X_2) \end{align}$$

Now $$\mathsf E(X_1^2) = \sum_{x=1}^n \frac {x^2}n = \dfrac{(2n+1)(n+1)}{6}$$

But $$\mathsf E(X_1X_2) = \underset{y\neq x}{\sum_{x=1}^n\sum_{y=1}^n}\frac{xy}{n(n-1)}=\frac{(n (n+1)^2)}{(4 (n-1))}-\frac{((n+1) (2 n+1))}{(6 (n-1))}$$