16 Order Statistics
Builds min, max, and general order statistics from raw sorting, then connects them explicitly back to the Hill estimator’s top-k mechanism from Chapter 11 — order statistics turn out to be the load-bearing structure underneath most tail-estimation tools.
def kth_order_statistic(data, k):
return sorted(data)[k - 1]