Generate a sequence of random numbers that sum up to 1?
Terry Reedy
tjreedy at udel.edu
Mon Apr 24 02:35:11 EDT 2006
"fumanchu" <fumanchu at amor.org> wrote in message
news:1145825688.099549.195040 at j33g2000cwa.googlegroups.com...
> I'm surprised noone has pursued a course of subtraction rather than
> division.
I believe someone did mention the subtraction method in one of the initial
responses. But the problem is this. If you independently sample n numbers
from a given distribution and then rescale, then the scaled numbers still
all have the same distribution (and are uniform in that sense). In the
subtraction method, each comes from a differnt distribution, as others
explained, with the nth being radically different from the first.
Terry Jan Reedy
More information about the Python-list
mailing list