jeudi 29 novembre 2018

Creating a normally distributed sample where data adds to a number

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