samedi 22 mai 2021

Specific Bias Random Number Generation

I need to make a function to generate a random float between 0 and the max value for a float.

It needs to have a bias towards being lower and a distribution where on average the result would be 1. I was thinking about using a uniform random into log_p(x+1) with p being max/2 meaning that on average the result would be 1 but this would mean a max value out would be very low.

Any help would be appreciated.




Aucun commentaire:

Enregistrer un commentaire