in reply to Need technique for generating constrained random data sets
For example, it could be (I can't properly identify your model from the info. so far) that the constraints should be achieved by shifting and scaling a bell curve to make it intersect y=0 exactly at the constraint points, or it might be that a Poisson distribution is required.
Most people will by default interpret "random" as having a flat probability density function, but that can often be unsuitable for statistical models.
Update: If its is "flat" however, you could generate the data in two steps: pick a constraint set at random and then use the constraints just chosen to randomly generate a "point" e.g.
use integer; my @limits = ( [10,40], [20,70], ); my $pick1 = ( 1 + $#limits ) * rand() - 1; } my $pick2 = $limits[$pick1][0] + ( rand() * ( $limits[$pick1][1] - $limits[$pick +1][0] );
-M
Free your mind
|
|---|