On Aug 11, 3:14 am, "zhjchen" <[EMAIL PROTECTED]> wrote: > I want to realize a list of numbers. They follow pareto distribution. > For instance, the average value is 10 and alpha is 1.0 > I do not know how to use the function of paretovariate(alpha). It only > provides > alpha parameter. How should I set the average value?
I'm guessing that paretovalue(alpha) treats alpha as the shape parameter and assumes a mode of 1.0, in which case you would multiply by 10 for your example. Alternatively, you could define your own Pareto function: # pareto for mode, shape > 0.0 def pareto(mode, shape): return mode * pow(1.0 - random.random(), -1.0 / shape) -- http://mail.python.org/mailman/listinfo/python-list