probability, expectation, variance

71 Views Asked by At

A 10-digit long number is picked randomly and each digit's pick is independent and has an equal probability of being picked (1/9 because there's digits 1 to 9).

Let $X = \#\{\text{missing digits}\}$ (i.e. if the # is 1357768931, X = 2 because there's no 2 or 4)

What is E(X)? Var(X)?

I am so confused as to how to start this. Some guidance please?

2

There are 2 best solutions below

0
On

First thing to note: the range of $X$ is $\{0,1,\ldots,8\}$. Second thing to note: there are $9^{10}$ possible 10-digit numbers. Then the expectation is given by \begin{align} E(X) &= \sum_{x=0}^8xP(X=x)\\ &= \sum_{x=0}^8 x\left(\frac{\#\mbox{ 10-digit numbers with exactly }x\mbox{ missing digits}}{9^{10}}\right). \end{align} Then you have to compute the numerator for all values of $x$. A few ones are straight-forward: how many with no missing digit? How many with 8 missing digits? Can you do all of them?

Finally, to compute the variance, you can do as above to compute $E(X^2)$, and then use the fact that $$Var(X) = E(X^2) - E(X)^2.$$

3
On

We assume on the uncertain basis of hints in the wording that for some reason the digit $0$ is forbidden. In order to avoid computing probabilities, we use the method of indicator random variables, and exploit the linearity of expectation.

For $i=1$ to $9$, let $X_i=1$ if digit $i$ is missing, and let $X_i=0$ otherwise. Then the number $X$ of missing digits is $X_1+\cdots+X_9$.

We have $E(X_1+\cdots+X_9)=E(X_1)+\cdots +E(X_9)=9E(X_1)$.
The probability that the digit $1$ is missing is $\left(\frac{8}{9}\right)^{10}$. Thus the required expectation is $9\cdot \left(\frac{8}{9}\right)^{10}$.

For the variance, it will all be easy once we know $E(X^2)$, that is, $E((X_1+\cdots+X_9)^2)$.

Expand the square. We get $X_1^2+\cdots+X_9^2$, plus a bunch of mixed terms.

It is easy to calculate $E(X_1^2+\cdots+X_9^2)$, indeed we have already done so, since $X_i^2=X_i$.

There are $(9)(8)$ "mixed" terms $X_iX_j$ where $i\ne j$. We find $E(X_iX_j)$. This is $\left(\frac{7}{9}\right)^{10}$, since with probability $\frac{7}{9}$ a digit in a specified position in the list of $10$ is neither $i$ nor $j$. Now put the pieces together.

Remark: The method can be adapted to "real" $10$-digit numbers, where $0$ is allowed, except as the first digit. But then $X_1$ is "special" and things get somewhat more complicated, less symmetrical.