I would like to generate random integers on an interval min to max. For a uniform distribution in numpy:
numpy.random.randint(min,max,n)
does exactly what I want.
However, I would now like to give the distribution of random numbers an exponential bias. There are a number of suggestions for this e.g. Pseudorandom Number Generator - Exponential Distribution as well as the numpy function numpy.random.RandomState.exponential
, but these do not address how to constrain the distribution to integers between min and max. I'm not sure how to do this, whilst still ensuring a random distribution.