How can we find the joint probability density function here? Let


$(\Omega,\mathcal A,\operatorname P)$ be a probability space
$(E,\mathcal E,\mu)$ be a measure space
$X:\Omega\to E$ be $(\mathcal A,\mathcal E)$-measurable with $$\operatorname P[X\in B]=\int_Bp\:{\rm d}\mu\;\;\;\text{for all }B\in\mathcal E$$ for some $\mathcal E$-measurable $p:E\to(0,\infty)$
$f:E\to\mathbb R$ be $\mathcal E$-measurable and $$W:=\frac{f(X)}{p(X)}$$
$\lambda$ denote the Lebesgue measure on $\mathcal B(\mathbb R)$



  How can we show that $$\operatorname P[(W,X)\in C]=\int_C\delta\left(w-\frac{f(x)}{p(x)}\right)p(x)\:{\rm d}(\lambda\otimes\mu)(w,x)$$ for all $C\in\mathcal B(\mathbb R)\otimes\mathcal E$?


Clearly, it's sufficient to prove the claim for all $C\in\mathcal B(\mathbb R)\times\mathcal E$.
Ok, have not done measure theory for a while, and realized where my confusion comes from. I think I am not familiar with the Lebesgue-type integral, where integrands are generalized functions such as Dirac $\delta$. Namely, in MT I'd say a $\delta$ is a kernel $\delta(\mathrm dy|x)$ defined by $\delta(A|x) = 1(x\in A)$. Hence, your integral should be written more formally as
$$
  \mathsf P[(W,X) \in C] = \int\limits_C p(x) \delta(\mathrm dw| g(x))\mu(\mathrm dx)
$$
where $g = f/p$. When you consider a measurable rectangle $C = A\times B$, you get
$$
\begin{align}
\int\limits_{A\times B} p(x) \delta(\mathrm dw| g(x))\mu(\mathrm dx) &amp;= \int\limits_B\left(\int\limits_A \delta(\mathrm dw| g(x))\right)p(x)\mu(\mathrm dx)
\\
&amp;= \int\limits_B1(g(x)\in A)p(x)\mu(\mathrm dx) = \int_{B\cap \{x\in E:g(x)\in A\}} p(x)\mu(\mathrm dx)
\\
&amp;= \mathsf P[X \in B, g(X) \in A] = \mathsf P[X\in B, W\in A] = \mathsf P[(W,X)\in C]
\end{align}
$$
Ok, have not done measure theory for a while, and realized where my confusion comes from. I think I am not familiar with the Lebesgue-type integral, where integrands are generalized functions such as Dirac $\delta$. Namely, in MT I'd say a $\delta$ is a kernel $\delta(\mathrm dy|x)$ defined by $\delta(A|x) = 1(x\in A)$. Hence, your integral should be written more formally as
$$
  \mathsf P[(W,X) \in C] = \int\limits_C p(x) \delta(\mathrm dw| g(x))\mu(\mathrm dx)
$$
where $g = f/p$. When you consider a measurable rectangle $C = A\times B$, you get
$$
\begin{align}
\int\limits_{A\times B} p(x) \delta(\mathrm dw| g(x))\mu(\mathrm dx) &amp;= \int\limits_B\left(\int\limits_A \delta(\mathrm dw| g(x))\right)p(x)\mu(\mathrm dx)
\\
&amp;= \int\limits_B1(g(x)\in A)p(x)\mu(\mathrm dx) = \int_{B\cap \{x\in E:g(x)\in A\}} p(x)\mu(\mathrm dx)
\\
&amp;= \mathsf P[X \in B, g(X) \in A] = \mathsf P[X\in B, W\in A] = \mathsf P[(W,X)\in C]
\end{align}
$$