Calculating expected value of a randomly sampled set

62 Views Asked by At

For a given set $S$ with $n$ elements: $$S=\{x_1,x_2,...,x_n\}$$

Sample randomly $n$ elements from set $S$ to another set $S'$ with replacement (the same element can occur many times).

$$S' = \{x_1,x_1,x_2,x_2,...,x_{(n-1)},x_n\}$$

Now the question is what percentage of elements from the set $S$ will occur at least once in set $S'$?

What I have tried:

By calculating the expected value of $n$ elements from set $S$: $$E[I_1,I_2,...,I_n] = E[I_1] + ... +E[I_n]$$

now we have to prove that the above expression is equal to $n*$$P$($x_1$ is chosen) because all Ps are equal?

To computer the P(at least once) we do: $1-P$(element never is chosen) $= 1 - (\frac{n-1}{n})^n$.

So for given $n=10$ we have that: $1-(\frac{10-1}{10})^{10} = 0.65$

Is this the correct way of solving this problem. I have come to this conclusion by collecting solutions from similar problems, but I am no totally sure.

1

There are 1 best solutions below

0
On BEST ANSWER

What you did looks good to me. Another way of finding the expected number of unique elements in $S'$ (which is what your question is asking) is by realizing that this value is equal to the sum of the probability of each element being included (by linearity of expectation): $$\sum_{i=1}^n \mathbb{P} (x_i \in S')$$

This is equal to $$n \mathbb{P}(x_1 \in S')$$

Since you are looking for the proportion, not the actual expected value, the answer is $$\mathbb{P}(x_1 \in S')$$

Everything after this is the same as you included in your answer, resulting in a final expected proportion of unique elements of $$1-\left(1 - \frac{1}{n} \right)^n$$