While watching a video by Po Shen Loh I found something strange. In the video, he said that:
Suppose I have a box of chocolates having $100$ chocolates, and I drop them all on the ground, and then I try to put them all back in. What is the probability that every chocolate went back in a wrong spot?
According to him, the probability is $\frac{1}{e}$. Now the question is that how can we get that? To me, It is as interesting as Buffon's Needle problem, that is why I am eager to know the method to reach at $\frac{1}{e}$. I shall be thankful if you guys can provide me idea about what is happening.
Thanks
It is not exactly $\dfrac{1}{e}$. However the probability approaches $\dfrac{1}{e}$ as the number of chocolates tends to infinity.
What we are counting are the permutations over $\{1,..,n\}$ which do not a have a fixed point that is $\sigma(i)\not=i$ for every $i$. These are called derangements. The usual method for counting derangements is by using the inclusion-exclusion principle which gives that there are $$n!\sum_{i=0}^n\dfrac{(-1)^i}{i!}$$ derangements over $\{1,..,n\}$. Since there are a total of $n!$ permutations it means the probability for random permutation to be a derangement is $$\sum_{i=0}^n\dfrac{(-1)^i}{i!}$$ which tends to $\dfrac{1}{e}$ as $n\rightarrow\infty$ according to the formula $$e^x=\sum_{i=0}^{\infty}\dfrac{x^i}{i!}$$