如果您已经有了一个发行版,您可以使用scipy。
from scipy import stats
a = 2 # just an example min-range value
b = 10 # just an example max-range value
data = stats.beta(2,8)*(b-a) + a # you can alter the shape of the distribution by playing with parameters
在这里,您可以找到有关 beta 分发的更多信息。