def cdf(std_dev, avg, x): inner = 1 + math.erf((x - avg) / (std_dev * math.sqrt(2))) return 0.5 * inner