Counting permutation problem 
Suppose you have $n$ boxes, each with a ball inside. If you randomly change the place of the balls such that afterwards, there is still a single ball in each box, what is the probability that exactly $k$ balls remain in its original box?

Attempt:
I know that there are $n!$ different possible scenarios. Let $X$ the random variable defined by the number of balls that remain in its original box, its obvious that (by Laplace probability),
$P(X=n)=\frac{1}{n!}$, and,
$P(X=n-1)=0$,
$P(X=k)=0$ if $k\notin \{0,1,\ldots, n\}$
However, I don't know any discrete distribution with this form and it's so hard to deduce the value of $P(X=k)$ for an arbitrary $k$. $P(X=0)$ looks so hard also.
 A: Expanding on the answer of Austin Mohr:
There is a classical problem of counting derangement. A permutation $\pi$ of $\{1,2,\dots,n\}$ is called a derangement if it moves all of the elements: $\pi(i) \neq i$ for all $i$. You can find the exact number of derangement, and it comes out as:
 $$n!(1 - 1 + 1/2 - 1/6 + \dots \pm 1/n!) = n! \sum_{k=0}^{n} \frac{(-1)^k}{k!}$$
This is the same as if you were computing $n! e^{-1}$, only truncated the series for $e^{-1}$ at $n$-th place, so roughly $1/e$ permutations are derangement.
If you want to figure out this solution yourself, use inclusion/exclusion. Let $A_i := \{\pi \in S_n \ : \ \pi(i) \neq i \}$; then the set of derangement$\bigcap_{i=1}^n A_i$, and for $I \subset \{1,\dots,n\}$ with $|I| = m$ you have $\bigcap_{i \in I} A_i^c = (n-m)!$, so inclusion/exclusion gives:
$$ | \bigcap_{i=1}^n A_i| = \sum_{m} (-1)^m \sum_{|I| = m} |\bigcap_{i \in I} A_i^c | = \sum_m (-1)^m {n \choose m} (n-m)!$$
Now, for exactly $k$ balls to land in their boxes, you first need to choose these $k$ (this is done in ${n \choose k}$ way), and then you need to rearrange the rest (this is precisely the derangement of $n-k$ elements). Hence, the number of ways for exactly $k$ balls to remain fixed is:
$${n \choose k}(n-k)! \sum_{l=0}^{n-k}\frac{(-1)^l}{l!} $$
The total number of permutations is, of course, $n!$, so the probability is:
$$\frac{1}{n!}{n \choose k}(n-k)! \sum_{l=0}^{n-k}\frac{(-1)^l}{l!} 
= \frac{1}{k!}\sum_{l=0}^{n-k}\frac{(-1)^l}{l!} \simeq \frac{1}{e k!}
$$
