how to sample two random variables from different distributions and requiring one is always larger than the other I know one way is to sample A and B independently and then reject the samples where A<B. But I wonder if there is an easier method?
 A: Assuming the random variables have densities $f_A$ and $f_B$ (wrt to a common dominating measure), here are some solutions for simulating from the joint density
$$g(a,b)=\dfrac{f_A(a)f_B(b)\mathbb I_{\mathcal C}(a,b)}{\int_{\mathcal C} f_A(a)f_B(b)\,\text d(a,b)}\tag{1}$$

*

*Generate $A$ from the marginal distribution $f_A$, leading to a realisation $a$, and then $B$ conditional on $B>a$, that is from the distribution with density $f_B(b)\mathbb I_{b>a}$ (or the converse, $B$ first and $A$ conditional on $A<b$).


*Consider the change of variables from $(A,B)$ to $(A,C)$ with
$B=A+C$, with density $$h(a,c)=f_A(a)f_B(c-a)$$ and simulate $(A,C)$ conditional on $C>0$.


*Construct a specific accept-reject method targetting (1), by looking for a density $g^\star(a,b)$ dominating $f_A(a)f_B(b)$ (only) over the set
$$\mathcal C=\{(a,b);b>a\}$$
that is,
$$M=\max_{(a,b)\in\mathcal C}g^\star(a,b)\big/f_A(a)f_B(b)<\infty$$
and simulate from $g^\star$. If the set $\mathcal C$ is tiny, the upper bound $M$ may prove to be tight.


*Run an MCMC algorithm like the Gibbs sampler that targets (1) and uses a Markov proposal that is restricted to the set $\mathcal C$. For instance, while at $(a^t,b^t)$

*

*generate $\epsilon_a^{t+1}\sim p_a(\epsilon)$ over $\mathbb R^+$, propose to move from $a^t$ to $a^\prime=b^t-\epsilon_a^{t+1}$ and accept/repeat by the Metropolis-Hasting step.

*generate $\epsilon_b^{t+1}\sim p_b(\epsilon)$ over $\mathbb R^+$, propose to move from $b^t$ to $b^\prime=a^{t+1}+\epsilon_b^{t+1}$ and accept/repeat by the Metropolis-Hasting step.



