Inversions of a Random Permutation
Build the exact inversion-count distribution and compare its symmetry and moments.
Free theory articleBuild the exact inversion-count distribution and compare its symmetry and moments.
Concept & interpretation
The number of inversions in a random permutation measures how out of order its elements are relative to the sorted identity permutation.
Interactive Experiment
You can interact with the module to inspect the exact probability mass function for the number of inversions.
- Open the Inversions of a Random Permutation module.
- Set Permutation size to 4 and Inversions probe to 3.
- Observe that the Mean is
3, Variance is13/6, and Probe Probability is1/4 = 0.25. - Check the boundary cases
n = 0andn = 1, where the only possible inversion count is0with probability1.