vendredi 8 février 2019

Can I create a non-uniform distribution of integers from MIN to MAX with a specified mean?

I am creating a simple program that is supposed to be simulating processes. Each process has a memory footprint. This footprint has to be between 1 and 100. This is fine, I can do that with the random number generator. However, I need the mean of all the footprints to be at 20. Is there a way to guarantee this? I looked at other distributions, such as gamma or normal, but they don't deal with integers. Is the rand() function non-uniform? This is not a necessary part, but heavily suggested as we'll need it for later work.




Aucun commentaire:

Enregistrer un commentaire