Expected number of fixed points in a permutation by brute force

113 Views Asked by At

I'm trying to compute the expected value of fixed points in a permutation without using the linearity of expectation. I tried the following: $$\sum_{i=1}^{n} i\frac{(n-i)!\binom{n}{i}}{n!}$$ However, this is not working and I don't understand why, as the probability of a permutation with i fixed points is: $$\frac{(n-i)!\binom{n}{i}}{n!}$$ Which is the number of permutations with i fixed points over the total number of permutations possible.