Change of variables for probability densities (source code)

= Change of variables for probability densities
{title2=$f_Y(y)=f_X(h^{-1}(y))\left|\frac{d h^{-1}(y)}{dy}\right|$}

For a <random variable> $X$ with <probability density function> $f_X$ on an <interval>, let $Y=h(X)$, where $h$ is a <diffeomorphism> onto another <interval>. The <change of variables formula> gives
$$
f_Y(y)=f_X(h^{-1}(y))\left|\frac{d h^{-1}(y)}{dy}\right|.
$$
Indeed, integrating the right-hand side over an outcome interval gives the <probability> that $X$ lies in its inverse image. The absolute <derivative> preserves positive probability when $h$ reverses orientation. A <gravity deflection of an atomic beam> is a physical example: its speed-to-height transformation changes the <probability density> and its <mode>.