1
$\begingroup$

I have a dataset with a nonuniform distribution. I want to sample it so that the result is uniformly distributed. If I know the class of the example, with what probability should I choose it to get a uniform distribution of each class in the resulting sample?

Example:

         before:  after:
Class1:     40%     20%
Class2:     30%     20%
Class3:     15%     20%
Class4:     10%     20%
Class5:      5%     20%

It probably need some inverse distribution function, but I can't remember any specifics.../

$\endgroup$
  • 1
    $\begingroup$ Do you want (a) each class to have equal chances of appearing (a distribution that is uniform for the classes) or (b) each class to have exactly the same number of elements in the sample (a stratified sample)? $\endgroup$ – whuber Oct 25 '12 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.