Mathematics (JEE)HardGATE CS

For a uniformly random permutation of 1, 2, 3, 4, 5, what is the expected number of inversions (pairs i < j with the i-th entry greater than the j-th entry)?

  1. A. 10
  2. B. 4
  3. C. 2.5
  4. D. 5

Correct answer: D. 5

Each of the C(5,2) = 10 pairs is an inversion with probability 1/2 by symmetry, so the expectation is 10/2 = 5. Option 10 forgets to halve for the symmetry.

More Permutations, Combinations and Probability questions

Exams that ask this topic