You are viewing a single comment's thread. Return to all comments →
Can I use random package instead?
import random mu = 30 sigma = 4 n = 1_000_000 a = [random.gauss(mu, sigma)<40 for i in range(n)] a = round(sum(a)/n, 3) b = [random.gauss(mu, sigma)>21 for i in range(n)] b = round(sum(b)/n, 3) c = [30 < random.gauss(mu, sigma) < 35 for i in range(n)] c = round(sum(c)/n, 3) print(a) print(b) print(c)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 4: Normal Distribution #1
You are viewing a single comment's thread. Return to all comments →
Can I use random package instead?