How can I evaluate the marginal cumulative distribution function of a set of random variables for which I do not have the CDF in closed form. I can, however, simulate from a joint distribution involving this set of variables.

To be more specific, assume I want to evaluate the CDF of $(X_1,X_2)$ but I only have a way to simulate from $(X_1,X_2,X_3)$.

Obviously I can approximate the CDF of $(X_1,X_2,X_3)$ by obtaining a large number of simulations and checking how many observations fall below the desired threshold. But how to get the CDF of $(X_1,X_2)$?. Can I just simply throw $X_3$ away and use the same procedure as for the joint PDF?

Obviously I cant get $F_X(x) = P(X \leq x) = \lim_{y \to \infty} P(X \leq x, Y \leq y) = \lim_{y \to \infty} F_{XY} (x, y)$ because no closed form CDF is available. I also do not want to involve the pdf.

  • $\begingroup$ Yes, you can throw away $X_3$ and compute the empirical CDF of $(X_1, X_2)$. $\endgroup$ Commented Apr 9, 2016 at 21:32
  • 2
    $\begingroup$ You are basically telling us you can freely simulate $(X_1,X_2)$ (simply by ignoring the values of $X_3$) and are asking how to "evaluate" the CDF of $(X_1,X_2)$. Could you please then tell us what you mean by "evaluate"? $\endgroup$
    – whuber
    Commented Apr 10, 2016 at 15:47
  • $\begingroup$ Well, sometimes you do not see the obvious... (that holds for me, at least). That's one reason why I am very greateful for this platform. I understand now that I can use the edf of $(X_1,X_2)$ to approximate the desired edf and it's also perfectly clear why. Thanks for your answers! $\endgroup$ Commented Apr 13, 2016 at 11:19

1 Answer 1


As indicated in the earlier comments, once you get a sample from the joint distribution of $(X_1,X_2,X_3)$, $$(x_1^1,x_2^1,x_3^1),\ldots,(x_1^t,x_2^t,x_3^t)$$ the marginal sample $$(x_1^1,x_2^1),\ldots,(x_1^t,x_2^t)$$is indeed a sample from the marginal joint distribution of $(X_1,X_2)$ and you can ignore the simulated $x_3^j$'s. They can however be useful in Monte Carlo evaluations through a technique called Rao-Blackwellisation since the average$$\frac{1}{t}\sum_{i=1}^t h(x_1^i,x_2^i)$$is improved by the average$$\frac{1}{t}\sum_{i=1}^t \mathbb{E}[h(x_1^i,x_2^i)|x_3^i]$$as a conditional expectation shares the same expectation as the original but reduces the variance. See for instance this discussion on Cross Validated.


Your Answer

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