For Transformation of Densities, we found that if we make a change of variables for a density , we have:

This can be extended to densities defined over multiple variables. Consider a density over a -dimensional variable , that we transform to a new variable , where . Both variables have the same dimensionality.

The transformed density is then given by the generalization of equation (2) in the form:

where is the Jacobian matrix whose elements are given by the partial derivatives , such that:

The absolute value of the determinant of the Jacobian represents the ratio of these volumes and is the same factor that arises when changing variables within an integral. The formula for the Jacobian follows from the fact that the probability mass in region is the same as the probability mass in . Once again, we take the modulus to ensure that the density is nonnegative.

Intuition

Intuitively, we can view the change of variables as expanding some regions of space and contracting others, with an infinitesimal region around a point being transformed to a region around the point .

This illustrated below by applying a change of variables to a Gaussian distribution in 2 dimensions (top row). The transformation from to is given by:

On the bottom row are samples from a Gaussian distribution in -space along with the corresponding transformed samples in -space.