replaced calculateBetaP with betaCDF