I have two joint distributions say $f_1(x,y)$ and $f_2(x,y)$. Let $f(x,y)$ be the weighted sum of $f_1$ and $f_2$ such that
$$f=w_1\cdot f_1+w_2\cdot f_2;$$
How do make $100$ random draws from this new distribution $f$?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.Sign up to join this community
Presumably $w_1+w_2=1$ and $w_1,w_2 \geq 0$, so $f$ is a convex combination of $f_1,f_2$ and therefore a valid distribution (a mixture of $f_1,f_2$).
Generate a Bernoulli($w_1$) random variable (i.e. flip a coin, heads = 1 with probability $w_1$). If it's $1$, draw a sample from $f_1$. If its $0$, draw a sample from $f_2$. You can use the law of total probability to see that this is indeed gives you a sample drawn from distribution $f$, by conditioning on the two values the Bernoulli r.v. takes and applying the law of total probability.
Do this 100 times to get 100 samples from $f$.