07-02-2014 11:33 PM
What is the best way to take a sample from a population while controlling its characteristics? Is it possible to take a sample while specifying a min/max/mean/std dev? It's easy enough to filter something down so that you end up with the necessary averages for whatever characteristics you're looking for, but I need the distributions to look a specific way too. Any thoughts on the best way to approach this?
07-03-2014 09:09 AM
No idea if this will work, or if it even is a legitimate method.
It is much easier to simulate a dataset with the characteristics that you are looking for than it would be to select and hope. Suppose you had the simulated data in hand, and then did a match against the variable of interest in the target dataset, so that only those values that come from a known distribution would be selected. Probably would involve some rounding and a merge using in=. I have never seen this done before, but maybe it would work.
07-07-2014 09:41 AM
It is not clear to me whether you are trying to specify the characteristics of the population or of the sample.
In simulation studies, you specify the characteristics of the population. The parameter estimates for any random sample will deviate from those population parameters.
There are many ways to choose the parameters in a distribution to match the desired characteristics. Of course, you need enough parameters to satisfy all of the constraints. For example, a uniform distribution only has two parameters, so in general you cannot make it match the four constraints. If you want a parametric distribution with a given min/max/mean/StdDev, I'd use a (scaled) beta distribution or a truncated normal distribution.
You can also choose to solve this problem by using a nonparametric specification of the CDF of the distribution. For a discussion, see Approximating a distribution from published quantiles - The DO Loop If your distribution is symmetric, then the mean equals the median and you can play with the interquartile range and the shape of the tails to obtain the required StdDev.