in reply to Re: Re: list of random numbers with given avarage
in thread list of random numbers with given avarage
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"
|
|---|