Suppose that we have two real valued random variables $X,Y$ on a probability setting $(\Omega, F, P)$. Suppose that $X,Y$ have densities $f_X, f_Y$ and joint density $f_{X,Y}$. So I have the following questions,
1)What is the joint density of the pair $(X, X)$?
2)How do we calculate quantities of the kind, $E[h(X,Y)|X=x]$? (I know how it works when $X, Y$ are independent)
For question 1, obviously for $Z=(X, X)$ we have that $PoZ^{-1}(A \times B) = PoX^{-1}(A \cap B) = \int_{A \cap B}f_X(x)dm(x)$. But can we find a density in $R^2$ such that the joint law measure of $Z$ will be absolutely continuous wrt the lebesgue measure of $R^2$? In other words can we find $f_{X, X}$ such that.. $\int_{A\times B}f_{X, X}(x_1, x_2)dm(x_1, x_2) = \int_{A \cap B}f_X(x)dm(x), \text{for all borel A, B}$?
For question 2, if $X, Y$ are independent one by using Fubini's theorem can prove that for $\phi(x) = E [h(x, Y)]$ we have that $\phi(X) = E [h(X, Y)|X], a.s .P$, so that $\phi(x) = E [h(X, Y)|X = x]$. So what happens when $X,Y$ are not independent? How do we calculate it?
on 1)
If $\lambda_{2}$ denotes the Lebesguemeasure on $\mathbb{R}^{2}$ and $\Delta:=\left\{ \left(x,x\right)\mid x\in\mathbb{R}\right\} $ then $\lambda_{2}\left(\Delta\right)=0$ and $P\left\{ \left(X,X\right)\in\Delta\right\} =1$.
This implies that $\left(X,X\right)$ has no density with respect to $\lambda_{2}$.
For any measurable function $p$ we find $\int_{\triangle}p\left(x,y\right)dxdy=0\neq1$.
0n 2) $$\mathbb{E}\left[h\left(X,Y\right)\mid X=x\right]=\frac{\int h\left(x,y\right)f_{X,Y}\left(x,y\right)dy}{\int f_{X,Y}\left(x,y\right)dy}=\frac{\int h\left(x,y\right)f_{X,Y}\left(x,y\right)dy}{f_{X}\left(x\right)}$$
See the answer of @Did for further explanation.