-1

From a pool of points I want to sample a fixed amount of point so that it satisfy some condition.

Is there any procedure to do this? If there is any paper on this topic then also it will be helpful.

Example: Let us consider we have 10000 users. about each user I know what is there income. Now let us consider I want to sample 150 users from this pool of users so that the mean income of the population became M. Note: This mean income (condition) M is not same as the total population mean.

Thanks in advance.

  • whats your purpose in doing this. If you want everytime the sample remains same than you can try random number field so that it will take same sample everytime. – LOrD_ARaGOrN Dec 13 '18 at 00:35
  • Random sampling with conditions is not random sampling anymore. Anyway, you can just take n-1 random samples and then choose the last one such, that the mean will be equal to your desired outcome. – user2974951 Dec 13 '18 at 08:31
  • I'm voting to close this question as off-topic because it is not about programming. – desertnaut Dec 15 '18 at 23:07

1 Answers1

0

If the goal of your procedure is to have equal income distribution in each of your samples, you could use stratified sampling. You make income classes and you draw a random sample of people from each income class.

For more theoretical information see the Wikipedia page here: https://en.wikipedia.org/wiki/Stratified_sampling .

For implementation examples see here : Stratified random sampling from data frame

Joos Korstanje
  • 186
  • 1
  • 10