# analysis of a probability question

if we have 100 people in total and we are to select each person randomly every day.what is the probability that after 3 years(1095 days) each person has been selected at least once. for eg. on the first day, the probability will be 1 and second day it will go on decreasinglike 99/100 and so on. this was actually a puzzle but I wanted to do some probability analysis.

• kindly include what you have tried. – Siong Thye Goh Aug 16 '17 at 8:07
• well i am kind of confused to be honest.initially i thought it would be 1*99/100*98/100*.....1/100 from there on 1/100 for the remaining days.but i don't think that is correct by any means. – anmol hans Aug 16 '17 at 8:10
• @anmolhans you are missing a lot of cases with that formula. – Dole Aug 16 '17 at 8:11
• yes, I know this formula is flawed.this is why I was looking for someone to help me with the analysis. this will help me get clearer understanding of probability as well. – anmol hans Aug 16 '17 at 8:14

How many functions from $[1,1095]$ to $[1,100]$ are surjective? Let $N$ be this number then your probability is equal to $$p=\frac{N}{100^{1095}}=\frac{100!S(1095,100)}{100^{1095}}.$$ Where $S(n,k)$ is a Stirling number of the second kind.

If you are looking for an approximation value of $p$ then for $k$ fixed $$k!S(n,k)=\sum_{j=0}^k (-1)^j\binom{k}{j}(k-j)^n\approx k^n-k(k-1)^{n}.$$ and therefore $$p\approx \frac{k^n-k(k-1)^{n}}{k^{n}}=1-k(1-1/k)^{n}\approx1-ke^{-n/k}\approx 0.9982442$$ where $k=100$ and $n=1095$. Note that the correct value of $p$ is $0.9983396$.

• i studied "onto" and "into" functions in my high school and i don't remember much about them.i will take my chances so is "N=1095"?because each day at least one person will get selected .so there will always be 1095 mapping from x to y. and we are considering that all of them got selected at least once so it obeys the rules of surjection.please tell me the answer – anmol hans Aug 16 '17 at 8:34
• i am pretty sure i have never studied about stirling number of second kind but i will try to learn about it. – anmol hans Aug 16 '17 at 8:35
• I am not looking for exact value numerically which will almost be impossible but the fraction should be exact at least. – anmol hans Aug 16 '17 at 8:39
• @anmol hans See my edited answer. – Robert Z Aug 16 '17 at 8:40
• wow, you are the coolest mathematician I have ever known.i will learn about Stirling number and come back to be on board.thanks by the way. – anmol hans Aug 16 '17 at 8:42

First, you should calcule the probability of the event that $n$-th person is never selected. Let's denote as $A_n$ this event.

Then, the probability of somebody not being picked any day is $$P(A_1) + P(A_2) + \cdots + P(A_{100})$$ What is its complementary event? Such event would have probability, $$1-\sum^n P(A_n)$$

Without replacement everyone gets picked in the first 100 days. With replacement, the probability of any one person being selected (assuming IID) is:

$1-(1-\frac{1}{100})^{1095}$

Since there are 100 people:

$(1-(0.99)^{1095})^{100} = 0.98339722$