This could result in values outside the allowed values.
Example:
bottom = 0which would result in
top = 100
range = bottom - top = 100
desired average = 25
sub f{rand(100) - 50 + 25}which is equivalent to
sub f{rand(100) - 25}As you can see, 25% percent of the time, you would get a result that was out of the allowed bounds.
In reply to Re: Re: list of random numbers with given avarage
by johannz
in thread list of random numbers with given avarage
by LupoX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |