Functions for election audits using stratified random samples