1The purpose of this (XS) module is to calculate the median (or in principle also 2other statistics) with confidence intervals on a sample. To do that, it uses a 3technique called bootstrapping. In a nutshell, it resamples the sample a lot of 4times and for each resample, it calculates the median. From the distribution of 5medians, it then calculates the confidence limits. 6 7In order to implement the confidence limit calculation, various other functions 8had to be implemented efficiently (both algorithmically efficient and done in 9C). These functions may be useful in their own right and are thus exposed to 10Perl. Most notably, this exposes a median (and general selection) algorithm that 11works in linear time as opposed to the trivial implementation that requires 12O(n*log(n)). 13