Basic sampling of joint random variables

104 Views Asked by At

If random variables $X \in \mathcal X$ and $Y \in \mathcal Y$ are sampled jointly from a target distribution $\pi$, i.e. $(X, Y) \sim \pi(x, y)$, is $X$ sampled from the correct marginal?

In other words, is $(X, Y) \sim \pi(x, y) \implies X \sim \pi(x)$ true?

Can anyone please refer me to a book which contains the full proof?

2

There are 2 best solutions below

2
On BEST ANSWER

$(X, Y) \sim \pi(x, y) \iff \forall A \subseteq \mathcal X, B \subseteq \mathcal Y$:

$$\mathbb P(X \in A, Y \in B) = \int_B \int_A \pi(x, y) dx dy.$$

Fix $C \subseteq \mathcal X$. Then \begin{align} \mathbb P(X \in C) &= \mathbb P(X \in C, Y \in \mathcal Y) \\ &= \int_C \int_{\mathcal Y} \pi(x, y) dy dx \\ &= \int_C \pi(x) dx \end{align} $\iff X \sim \pi(x)$.

11
On

The answer is yes. For example, see the Fundamental Theorem of Simulation (slide 98). If you generate pairs $(X,Y)$ and ignore $Y$, you are effectively marginalizing over $Y$

Robert and Casella's book is really great if you're into Monte Carlo simulation for statistics.

At a more basic level, it is true that the joint distribution defines the marginal distribution (so your statement is generally true)...however the converse is only true for independent random variables (or Multivariate Gaussian).

Demonstration that $(X, Y) \sim \pi(x, y) \implies X \sim \pi(x)$

Let $I\subset \mathbb{R}$

$$X\in I \iff (X,Y)\in [I,\mathbb{R}] \implies P(X\in I)=P((X,Y)\in [I,\mathbb{R}])$$

But, $P((x,Y)\in [I,\mathbb{R}])=1,\forall x \in I \implies P(X\in I)$ depends only on the value of $X$, as it should for a marginal distribution.

This fact might also be helpful:

$$\pi_X(x):=\int \pi_{XY}(x,y) dy$$