Not sure that adds up, I translated the right side of the equality into a Python statement and it returns a number I am not sure how to interpret:
1/99 * sum([(i-1)*i for i in range(2, 100)]) # 3266.666666666667
Both the median and mean are around 12 for 10K runs of the loop.