Expected Number of Fixed Points in a Random Permutation

Expectation · Easy · Free problem
A permutation $\pi$ of $\{1, 2, \ldots, n\}$ is chosen uniformly at random. A fixed point is an element $i$ such that $\pi(i) = i$. 1. What is the expected number of fixed points? 2. What is the variance of the number of fixed points?

Open the full interactive solver, hints, and worked solution →