How to show that $p_{X,Y}$ cannot be derived from $p_X$ and $p_Y$? This question is about marginal/joint distributions. 
Given some pdf $p_X$ and $p_Y$, how can I show that I cannot derive the joint density functino $p_{X,Y}(x,y)$ in general? 
I guess that it has to do with independence?
Thanks a lot for any help
 A: In general, the product density function $p\otimes q:(x,y)\mapsto p(x)q(y)$ has marginal densities $p$ and $q$. If $(X,Y)$ is independent, $X$ with density $p$, $Y$ with density $q$, then $(X,Y)$ has density $p\otimes q$.
For a different example, recall that, for every density $p$ on the real line, a way to build a random variable $X$ with density $p$ is to consider $X=F^{-1}(U)$ where $U$ is uniformly distributed on $(0,1)$ and $F$ is the CDF of $p$, defined as $F(x)=\int\limits_{-\infty}^xp$ for every $x$.
Thus, a couple $(X',Y')$ whose marginal densities are $p$ and $q$ is given by $X'=F^{-1}(U)$ and $Y'=G^{-1}(U)$, where $F$ was already defined and $G(x)=\int\limits_{-\infty}^xq$ for every $x$. Then $(X',Y')$ is not independent, for example because $X'$ and $Y'$ are associated, in particular their correlation is positive, hence $p\otimes q$ is not the density of $(X',Y')$.
Note though that in general $(X',Y')$ has no density (one may think of the support of $(X',Y')$ as the graph of a function whose two-dimensional Lebesgue measure is zero). To get an example with density, consider $X''=F^{-1}(U)$ and $Y''=G^{-1}(V)$ with $U$ and $V$ uniform on $(0,1)$, neither independent nor such that $U=V$, and with a joint density. Does a couple $(U,V)$ with these properties exist? Yes, an example is $(U,V)$ uniform on the domain
$$
D=\{(x,y)\in[0,1]^2\mid-1\lt2(x-y)\lt0\ \text{or}\ 1\lt2(x-y)\lt2\}.
$$
Drawing a picture of $D$ should convince you that $U$ and $V$ are uniform on $(0,1)$, not independent, and that the joint distribution of $(U,V)$ has a density. Except in (possibly nonexistent) degenerate cases, $(X'',Y'')$ has the desired marginals $p$ and $q$ and has a joint density which is not $p\otimes q$.
A: It's because a function $p_{X,Y}$ of two variables contains much more information than is contained in two functions $p_X$, $p_Y$ of one variable together. When the sample spaces are finite then $p_X$ and $p_Y$ are data vectors containing $m$, resp. $n$, nonnegative entries summing to $1$, makes $m+n$ numbers in total, whereas $p_{X,Y}$ is a data matrix containing $m\times n$ entries.
For the continuous case consider the following example: Let $p_{X,Y}$ be a continuous PDF on $[{-1},1]^2$, and assume for simplicity that $p_{X,Y}(x,y)\geq \mu$ for some $\mu>0$. Then $p_{X,Y}$ has well defined marginal distributions $p_X$, $p_Y:\ [{-1},1]\to {\mathbb R}_{\geq0}$. Adding an arbitrary function of the form
$$f(x,y):=\sum_{i,\ k} c_{ik} \sin(\pi x)\>\sin(\pi y),\qquad \sum_{i,\ k} \bigl| c_{ik}\bigr|\leq \mu,$$
to the given $p_{X,Y}$ produces a PDF $(x,y)\mapsto q(x,y)$ with exactly the same marginal distributions. For the proof note that $q(x,y)\geq0$, and that all integrals $\int_{-1}^1 f(x,y)\ dy\ $ ($x$ fixed), resp. $\int_{-1}^1 f(x,y)\ dx$, are zero.
A: We can take your intuition to the extreme and use $Y=X$ where $Y$ and $X$ has trivially the same marginal but the joint is supported on a diagonal. If you take your example to be Gaussians then note that you can easily contrast this situation with two independent copies who also have the same distribution but whose joint is a multidimensional Gaussian .
