Collection of functions for statistical election audits