from random import seed
from random import random
from random import gauss
import matplotlib.pyplot as plt
NUM = []
seed(1)
for i in range(10000):
num = min(10, max(0, gauss(4, 2)))
NUM.append(num)
plt.hist(NUM, bins = 100)
plt.show()
But, as shown in picture, there are lots of samples at "0" how to reduce that ?
Aucun commentaire:
Enregistrer un commentaire