Let's say I have three distributions, P1, P2, and P3, which are probability distributions with domains defined between 0 and 1. Generically these are not Gaussian (more like Beta distributions). I can sample from these three distributions, generating samples p1, p2, and p3, such that I impose the constraint that p1+p2+p3<1, and I'm wondering what the most proper way of doing so is.

I've thought of two solutions:

  1. Sample independently from each many times, and then reject all correlated draws which don't obey the constraint
  2. Sample from P1, then crop and renormalize P2 such that the constraint is fulfilled (call the new distribution P2'), then sample from P2', then do the same for P3.

I think both methods have problems: the first introduces bias, and I'm not sure if the second does as well. Is there a more proper way to perform this type of correlated-sampling-with-constraints?

  • $\begingroup$ Answer: in the independent case, 1. is correct and unbiased, 2. is not. $\endgroup$
    – Xi'an
    Apr 5, 2023 at 18:03
  • 1
    $\begingroup$ Maybe to add more context: In reality I am trying to sample from 4 distributions, the sum of which has to equal 1 (the distributions describe the probability of 4 mutually exclusive events happening, i.e. they are probability distributions of probabilities). So in a sense, the distributions are correlated, because their sum is equal to 1. I have the probability distribution for each one, but don't know the correlations, and so I'm trying to find a way to sample independently from the distributions in such a way that it reflects the correlated nature of the underlying data. $\endgroup$ Apr 5, 2023 at 18:19
  • $\begingroup$ Having the four marginals is not enough in general to deduce the joint distribution of the three/four variates. $\endgroup$
    – Xi'an
    Apr 5, 2023 at 19:40

1 Answer 1


If$$(X_1,X_2,X_3)\sim cf_1(x_1)f_2(x_2)f_3(x_3)\mathbb I_{x_1+x_2+x_3\le 1}\tag{1}$$ where $c$ is the normalising constant, then simulating$$X_1\sim f_1(x_1),\ X_2\sim f_2(x_2),\ X_3\sim f_3(x_3)$$until$${x_1+x_2+x_3\le 1}$$is a correct way to simulate from (1) as a special case of acceptance-rejection.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.