Deterministic formula for average number of unique items picked I am curious how to formulate a deterministic answer to a problem I have in mind. I have computed it stochastically, but am unsure of how to frame and compute the problem deterministically. My prob & stats classes are a few decades behind me...
Let's say that we have 100 people, and each person is asked to choose a number between 1 and 100 (inclusive). Maybe everyone chooses the same number, but this is unlikely. It is also unlikely that everyone chooses a different unique number. How many of the numbers from 1 to 100 will get picked?
Stochastically, it seems that somewhere between 59 and 67 of the numbers will be picked (10th percentile and 90th percentile respectively) with a median example resulting in 63 of the numbers being chosen.
Is there a deterministic way calculate this? What concepts are relevant? How does the formula vary for a different number of people? And for a different number of numbers to choose?
Update: I'll include the Python script I ran to clarify what I meant by "Stochastically, it seems...":
import random
import statistics

trials = 10000
n = 100
m = 100

lens = []
for j in range(trials):
    k = []
    for x in range(n):
        k.append(random.randint(1,m))
    lens.append(len(list(set(k))))

print(statistics.median(lens), statistics.quantiles(lens, n=10))


If you assume that $s$ numbers are chosen independently and uniformly from $1$ to $n$, i.e. with replacement,  then the expected number of distinct numbers chosen is, using linearity of expectation,  $$n\left(1-\left(1-\frac1n\right)^s\right).$$
The probability exactly $u$ distinct numbers are chosen is $$\dfrac{u!S_2(s,u)}{n^s}$$ where $S_2(s,u)$ represents a Stirling number of the second kind. If you call this $p_{n}(u,s)$ then you have the recurrence $$p_{n}(u,s) = \dfrac{n-u+1}{n}p_{n}(u-1,s-1) + \dfrac{u}{n}p_{n}(u,s-1)$$ starting with $p_n(0,0)=1$ and $p_n(u,0)=0$ for $u \not=0$.
In the case $n=s=100$, you get the expected number of distinct values to be just under  $63.4$, not far from $100(1-e^{-1})$.  As you say, the $10\%$ quantile is at $59$ (the probability of that value or less is about $0.1053$), the median is at $63$ (the probability of that value or less is about $0.5124$) and the $90\%$ quantile is at $67$ (the probability of that value or less is about $0.9068$).  The mode is also $63$ (the probability of that value exactly is about $0.1265$).
