Transformations of Random Variables

One of the fundamental problems in statistics is understanding how a random variable propagates through a complex system and to what extent it makes the system's output random.

Let $f(\cdot)$ be a function that transforms the random variable $X$ into the random variable $Y$, that is, $y = f(x)$, with $x$ realizations of the random variable $X$, and suppose that $f$ is invertible, meaning that there exists a function $x = g(y)$ such that $g(f(x))=x$.

Let $\mathcal{I}_x$ be a generic interval in the domain of the values $x$ and let $\mathcal{I}_y=\{ y: y=f(x), x \in \mathcal{I}_x \}$ be its corresponding image. It is clear that the probabilities of the events $x$ in $\mathcal{I}_x$ and $y$ in $\mathcal{I}_y$ must be equal, namely,

\begin{displaymath}
\int_{\mathcal{I}_y} p_Y(y) dy = \int_{\mathcal{I}_x} p_X(x) dx
\end{displaymath} (2.25)

Without loss of generality, the interval $\mathcal{I}_x$ can be made infinitesimal. Under this condition, relation (2.25) becomes

\begin{displaymath}
p_Y(y) \vert dy\vert = p_X(x) \vert dx \vert = p_X(g(y)) \vert dx \vert
\end{displaymath} (2.26)

from which
\begin{displaymath}
p_Y(y) = p_X(g(y)) \frac{\vert dx\vert}{\vert dy \vert } = ...
...= \left. \frac{p_X(x)}{\vert f'(x)\vert} \right\vert _{x=g(y)}
\end{displaymath} (2.27)

This relation can easily be extended to the case of a non-injective function by summing the different intervals, and to the multidimensional case by using the Jacobian instead of the derivative.

Paolo medici
2026-10-01