In this problem, I am asked to find the expected value of locality. I understand how the answer to the problem is
(n - 1) * (expected value of |π(i) − π(i − 1)|)
.
The problem solutions states that the expected value of
|π(i) − π(i − 1)| is (n + 1) / 3
.
I do not understand this part of the solution. Could someone please explain this reasoning? Thank you.