I would also expect that the median in that example is 3.5 and not 4.5. The Median function calls the Percentile function and the Percentile function is from some statistics library. Maybe that library does not consider even lengths. I'll forward that to the developers to check.