import { quantileRankSorted } from "https://dotland.deno.dev/x/simplestatistics@v7.8.3/index.js";
This function returns the quantile in which one would find the given value in the given array. With a sorted array, leveraging binary search, we can find this information in logarithmic time.