# Probability/ eggs in boxes

I have n boxes and n eggs, which were hidden randomly in these boxes. The probabilty, that no egg is in the right box, is $$\sum_{k=2}^n (-1)^k \frac{1}{k!}$$

How can I get to this formula?

• See here – Helmut Apr 20 at 9:18
• Such permutations are called derangements, and is a typical application of inclusion-exclusion principle. You can find an extensive list of Q&A's related to this in this community. – Sangchul Lee Apr 20 at 9:18
• Ok thank you. I will look for that:) – Steven33 Apr 20 at 10:33
• Maybe you can explain. why the index of the sum starts at 2? – Steven33 Apr 20 at 10:40