Variance of geometric distribution without replacement

140 Views Asked by At

Suppose we have a white ball in $n$ balls. We pick balls till we see the white ball without replacement. If $X$ is the number of tries to pick the white ball, I know after a long calculation that $E(X)=\frac{n+1}{2}$. Now I want to find its variance. So I should find $E(X^2)$. Is there an easy or short way to calculate this? Because calculating the $E(X)$ was so complicated!

2

There are 2 best solutions below

0
On BEST ANSWER

If balls are drawn without replacement, the distribution of the random number of draws needed to observe the white ball is not geometric, since we are guaranteed that the white ball will be obtained in at most $n$ draws.

Instead, reformulate the drawing process as follows. Rather than thinking of the draws as being random, think of them as being deterministic, but the balls are permuted randomly. That is to say, suppose a second person comes along, and without you looking, randomly lines up the balls in some order. Then you pick balls in sequential order from this lineup until you see a white ball. Since there are $n$ equally likely positions for the white ball in the predetermined sequence of draws, and the drawing stops at the position of the white ball, it follows that the distribution of the random number of draws needed $X$ is discrete uniform on $\{1, 2, \ldots, n\}$; i.e., $$\Pr[X = x] = \frac{1}{n}, \quad n \in \{1, 2, \ldots, n\}.$$

With this in mind, it is now easy to compute the moments and variance. $$\operatorname{E}[X] = \sum_{x=1}^n x \Pr[X = x] = \frac{1}{n} \sum_{x=1}^n x = \frac{n(n+1)}{2n} = \frac{n+1}{2},$$ and $$\operatorname{E}[X^2] = \sum_{x=1}^n x^2 \Pr[X = x] = \frac{1}{n} \sum_{x=1}^n x^2 = \frac{n(n+1)(2n+1)}{6n} = \frac{(n+1)(2n+1)}{6}.$$ And the variance is simply $$\operatorname{Var}[X] = \operatorname{E}[X^2] - \operatorname{E}[X]^2.$$

1
On

Recall the definition of Moment Generating Function

$M_X(t) := \mathbb{E}[e^{tX}]$

From this, one can generate the moments of desired order mechanically ("easy or short") by differentiation:

$\mathbb{E}[X^{n}] = M_X^{(n)}(0)$