P5-statistics-caseresampling

Jul 20, 2023

Efficient resampling and calculation of medians with confidence intervals

The purpose of this XS module is to calculate the median or in principle also other statistics with confidence intervals on a sample. To do that, it uses a technique called bootstrapping. In a nutshell, it resamples the sample a lot of times and for each resample, it calculates the median. From the distribution of medians, it then calculates the confidence limits.

In order to implement the confidence limit calculation, various other functions had to be implemented efficiently both algorithmically efficient and done in C. These functions may be useful in their own right and are thus exposed to Perl. Most notably, this exposes a median and general selection algorithm that works in linear time as opposed to the trivial implementation that requires On*logn.



Checkout these related ports:
  • Zn_poly - C library for polynomial arithmetic
  • Zimpl - Language to translate the LP models into .lp or .mps
  • Zegrapher - Software for plotting mathematical objects
  • Zarray - Dynamically typed N-D expression system based on xtensor
  • Z3 - Z3 Theorem Prover
  • Yices - SMT solver
  • Yacas - Yet Another Computer Algebra System
  • Xtensor - Multi-dimensional arrays with broadcasting and lazy computing
  • Xtensor-python - Python bindings for xtensor
  • Xtensor-io - Xtensor plugin to read/write images, audio files, numpy npz and HDF5
  • Xtensor-blas - BLAS extension to xtensor
  • Xspread - Spreadsheet program for X and terminals
  • Xppaut - Graphical tool for solving differential equations, etc
  • Xplot - X11 plotting package
  • Xlife++ - XLiFE++ eXtended Library of Finite Elements in C++