Statistical method for calibrating decision thresholds to guarantee bounded error rates or safety violations.