WOLFRAM|DEMONSTRATIONS PROJECT

The Number of Fixed Points in a Random Permutation

​
n
2
new sample
distribution
exact
approximate
sample mean: 1.07
standard deviation: 0.999
For a random permutation of
(1,…,n)
, let
X
be the random variable that counts the number of digits that remain in their original position. This Demonstration allows you to compare the relative frequencies of
X
obtained in a sample of size 400 with the exact and approximate distributions of
X
. It also gives the sample mean and standard deviation.