1

An array of n distinct numbers. I want to know what distribution its number of inversions follows.

I used Mathematica to simulate and initially felt that it obeyed normal distribution:

<< Combinatorica`
data = Table[Inversions@RandomSample[Range[10], 10], 10000];
ListPlot[BinCounts[data, {0, 50, 1}]]

enter image description here

But it's not a strict mathematical proof. I want to know a strict mathematical proof of its distribution.

Here is a similar post. The reference book used in this post is Combinatorics of permutations by Miklos Bona.

ListPlot /@ 
 Table[CoefficientList[Series[QFactorial[n, q], {q, 0, n (n - 1)/2}], 
   q], {n, 9}] (*http://oeis.org/A008302*)

0 Answers0