$n$ people $n$ hats: probability that at most $m$ $(m\leqslant n)$ people get their own hats! This is a variant of the popular $Hat$-problem. Say there are $n$ people and $n$ hats. Then what is the probability that at most $m$ $(m\leqslant n)$ people get their own hats!
My solution is $\frac{\sum\limits_{k=0}^{m} {n \choose k}D_{n-k}}{n!}$, where $D_{n-k}$ denotes number of derangements of a set with $n-k$ elements.
The argument is that $k$ people, who get their own hats, can be chosen from $n$ people in $n\choose k$ ways and there is only $one$ way that they get their own hats. None of the rest $n-k$ people get their own hats. And hence the derangement factor $D_{n-k}$.
Is my argument valid?

Yes, that is correct.
The ${n \choose k}D_{n-k}$ terms  (the number of ways $k$ people out of $n$ get their own hats) are called rencontres numbers
For given $m$, the probabilities quickly approach a limit, as $n$ increases, of $\frac1e\sum\limits_{k=0}^{m} \frac1{k!}$, a consequence of $\frac{D_n}{n!} \to e^{-1}$.
