Master Mathematics.

Probability · Hard · Elementary Probability · Problem 3

Counting inversions

Suppose is a permutation of where . A pair with is called an inversion with respect to if . Let denote the number of inversions with respect to a permutation chosen at random from all possible permutations of . Find .

Source: ISI MStat