I want to generate a sample of n data points (floating values), such that they are approximately normally distributed and their sum is very close to S. I am using python function random.normalvariate(sampleMean, standardDeviatnion) to generate the set, but I am not sure how to guarantee that the data points add up to S. How could I go about it?
Aucun commentaire:
Enregistrer un commentaire