Push-forward density as surface integral Let $X$ be a random variable taking values in $\mathbb R^n$ with a probability distribution $\mathbb P$ that has a density $p$.
Consider further a linear mapping $\pi: \mathbb R^n \to \mathbb R^m$, i.e. $\pi$ is an $m \times n$ matrix. We assume $m<n$, i.e. the linear transformation is in general non-invertible!
Now the distribution of the new random variable given by $Y = \pi X$ is given by
$$ \mathbb P_Y (B \subset \mathbb R^m) := \mathbb P(\pi^{-1}(B)) = \int_{\pi^{-1}(B)} p \; dx$$
where $\pi^{-1}(B)$ denotes the pre-image of $B$ under $\pi$. 
Question: How does the density of the random variable $Y$ look like?
Is it simply:
$$ p_Y(y) = \int_{\pi^{-1}(\{y\})} p \; dS$$
or do I need some scaling?
Initially I had the following:
$$ \int_{B} p_Y(y) \; dy = \int_{B} \int_{\pi^{-1}(\{y\})} p \; dS \, dy = \int_{\pi^{-1}(B)} p \; dx = \mathbb P_Y(B),$$
but there seems some scaling missing. Could you please tell me where my mistake is? Thank you
 A: First of all, let us assume that $\pi$ is onto to avoid  some unnecessary complications. Then we can find linear coordinates $x=(x_1,\dotsc, x_n)$ on $\newcommand{\bR}{\mathbb{R}}$ $\bR^n$ and $y=(y_1,\dotsc, y_m)$  on $\bR^m$ such that, in these coordinates,    $\pi$ is given by
$$ y_j=x_j,.\;\;\forall j=1,\dotsc, m. $$
The probability measure $\newcommand{\bP}{\mathbb{P}}$ $\bP$  then has the form
$$ \bP(dx)= \rho(x) dx. $$
Then  
$$\bP_Y(dy)= \rho_Y(y) dy,\;\;\;\rho_Y(y_1,\dotsc,y_m)=\int \rho(y_1,\dotsc, y_m, x_{m+1}, \dotsc x_n) dx_{m+1}\cdots dx_n.  $$ 
If  $x$ and $y$  are arbitrary orthonormal coordinates on $\bR^n$  and resp. $\bR^m$, then $\pi$ is represented  by  a matrix $A$ and we set
$$J_\pi:=\sqrt{\det  AA^*}. $$
This quantity $J_\pi$, called the Jacobian of  of $\pi$ is independent of  the choice of orthonormal coordinates $x$ and $y$. 
If $B\subset \bR^m$ is a Borel set, then the coarea formula 
$$ \int_{\pi^{-1}(B)} \rho(x) dx = \int_B \;\underbrace{\left(\int_{\pi^{-1}(y)}\frac{\rho(x)}{J_\pi} dV_{\pi^{-1}(y)} (x)\right)}_{=:\rho_Y(y)}\; dy, $$  
where $dV_{\pi^{-1}(y)}$ denotes the volume element on the affine  plane $\pi^{-1}(y)$ induced by the     Euclidean metric on $\bR^n$.   For more details check the first two pages of these notes.
