Given a random permutation $\sigma$ of a set $\{1,...,n\}$. Assume we want to compute $X$=# of integers $i$ with $\sigma(i)=i$. What is $E[X]$?

99 Views Asked by At

Given a random permutation $\sigma$ of a set $\{1,...,n\}$. Assume we want to compute $X$=# of integers $i$ with $\sigma(i)=i$. What is the expected value of $X$?

Potential Solution Part 1

I had an overly complicated way of calculating this, which was to sum the permutations so $\sum_{i=1}^{n}{n \choose i}-(n-i)$, this should give the number of permutations that contain $i$. Unless I'm misinterpreting this question. The other issue is the formula I have written doesn't simplify well.

Potential Solution Part 2
So after getting a better understanding of what $\sigma(i)=i$, which is the case where random permutation $\sigma$ has index $i=i$. Then $X$ represents the number of integers s.t. $\sigma(i)=i$. Writing out some simple examples I see that they equal 1, but not sure why.
$$n=2 \text{ then:} P(X=2)=\frac{1}{2}, P(X=1)=0, P(X=0)=\frac{1}{2}$$ So $E[X]=1$

then if I do $n=3$, number of permutations is $n!=3!=6$. $$P(X=3)=\frac{1}{6}, P(X=2)=0, P(x=1)=\frac{3}{6}$$ then $E[X]=1$. I've done this for more examples and keep getting 1, but not totally sure why. I'm having trouble simplifying this formula into a summation because of the cases where $P(X=i)=0$ where $i$ is not 0. $P(X=i)=\frac{something}{n!}$, but not sure what the numerator should be.