0
$\begingroup$

I have a population with $k$ categorical variables. I know the distribution of these categories. I would like to randomly choose a sample from my population so that the marginals are uniform. I don't need the joint distribution of the categories in my sample to be uniform (indeed, this may not be possible, as some combinations may have probability 0), but only the marginal distributions.

To illustrate:

Suppose that I have one categorical variable, which can take 3 different values. Suppose that the relative frequency of these 3 categories in the population is $[r_1, r_2, r_3], \Sigma r_i = 1$. I will now choose an individual uniformly at random from my population, measure its category to be $j$ and keep it with a probability $\frac{1}{3 r_j}$ (else discard and try again). Then, the probability of drawing an individual with attribute $j$ is $r_j * \frac{1}{3 * r_j} = \frac{1}{3}$. Using this sampling mechanism, I can draw from my population in such a way that the distribution of my single categorical variable is uniform.

Now suppose that I have two categorical variables, I would like to sample from my population so that the distribution over each categorical variable is uniform. How can I accomplish this? How can I extend this to $k$ categorical variables? Assume that the marginal probability distribution in the population of each variable is $>0$ for each category.

$\endgroup$
2
  • 2
    $\begingroup$ Where do you introduce a constraint? $\endgroup$ Commented Feb 6 at 17:54
  • 2
    $\begingroup$ Pick any copula you like. Search our site for more information. $\endgroup$ Commented Feb 6 at 19:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.