in reply to Re: Re: list of random numbers with given avarage
in thread list of random numbers with given avarage

Umm not exactly, I guess I didn't make myself clear. My proposed algorythm *does not* meet the same requirements, namely top and bottom. It instead provides what I imagine the original algorythm would most likely be used for which is providing "random" values centered around a given value (the average).

UPDATE: Note this simpler method makes more sense for the physicists as well. The other algorythm produces many outliers which ought to be discarded in a real data set.

Average=50, Range=10

Average:        Avg - Rng/2:      Avg - Rng/2 + rnd(Rng):
45----50----55  45----50----55    45----50----55
       *         *                 ????? ??????
Since rnd can return anything between 0 (minimum) or Range (maximum) we get a full spread. It may also be interesting to note that this is equivalent to sub f{average+range/2-rnd(range)}

--
perl -pe "s/\b;([st])/'\1/mg"