You are viewing a single comment's thread. Return to all comments →
import math as m def calculate_percent_cdf(mean, stdev, x): p = (1/2 * (1 + m.erf((x-mean)/(stdev*m.sqrt(2)))))*100 return p if __name__ == '__main__': # read input mean, std = map(int, input().split()) x1 = int(input()) x2 = int(input()) # calculate percentages p1 = 100 - calculate_percent_cdf(mean, std, x1) p2 = 100 - calculate_percent_cdf(mean, std, x2) p3 = calculate_percent_cdf(mean, std, x2) # print results print(round(p1, 2)) print(round(p2, 2)) print(round(p3, 2))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Normal Distribution II
You are viewing a single comment's thread. Return to all comments →