Why the Support and the Jacobian Both Matter
A transformation changes more than the numerical values of a random vector. It can change the region where the vector can occur, and it changes how probability is distributed across that region. The density must account for both effects: the transformed support identifies where probability is possible, while a Jacobian determinant adjusts for how the map stretches or compresses volume.
The formula in this tutorial concerns a differentiable, one-to-one transformation between open subsets of Euclidean space. Its essential feature is that the density is evaluated using the inverse map, and the volume adjustment is the absolute determinant of the inverse map's derivative.
Suppose \(X\) has density \(f_X\) on \(U\), meaning \(P(X\in U)=1\) and probabilities within \(U\) are obtained by integrating \(f_X\) with respect to \(d\)-dimensional Lebesgue measure. Define \(Y=g(X)\). Since \(g\) is a bijection, \(Y\) takes values in \(V\), and \(X=h(Y)\). The density formula follows by expressing probabilities for \(Y\) as probabilities for \(X\).
Deriving the Density Formula
Let \(A\) be any Borel subset of \(\mathbb{R}^d\). The event \(Y\in A\) is the event \(g(X)\in A\), or, equivalently, \(X\in h(A\cap V)\). Therefore,
Apply the multivariate change-of-variables theorem for integrals to the substitution \(x=h(y)\). It applies because \(h\) is a continuously differentiable bijection between the open sets \(V\) and \(U\), with nonsingular derivative. The integral becomes
This is the defining integral identity for a density of \(Y\): for every Borel set \(A\), its probability is the integral over \(A\) of the stated function, set to zero outside \(V\). The absolute value is required because a change of variables adjusts volume by a nonnegative factor, regardless of whether the map preserves or reverses orientation.
To obtain the equivalent expression using \(Dg\), differentiate \(g(h(y))=y\). The chain rule gives \(Dg(h(y))Dh(y)=I_d\), where \(I_d\) is the \(d\)-dimensional identity matrix. Taking determinants yields \(\det Dg(h(y))\det Dh(y)=1\), and hence
This derivation also shows why the original density is evaluated at \(h(y)\), not at \(g(y)\): the probability near \(y\) comes from the corresponding original point \(x=h(y)\).
Worked Examples
Worked Example: A One-Dimensional Nonlinear Transformation
Let \(X\) have density \(f_X(x)=2e^{-2x}\) for \(x>0\), and zero otherwise. Set \(Y=X^2\). Find and check the density of \(Y\).
On \(U=(0,\infty)\), the map \(g(x)=x^2\) is a diffeomorphism onto \(V=(0,\infty)\). Its inverse is \(h(y)=\sqrt{y}\), with derivative \(h'(y)=1/(2\sqrt{y})\). Thus, for \(y>0\),
The transformed support is \(y>0\), because squaring maps every positive \(x\) to a positive \(y\). To check normalization, substitute \(t=\sqrt y\), so \(dy=2t\,dt\):
The density can become unbounded near zero, but that does not prevent it from being a valid density: its integral over the support is one.
Worked Example: A Two-Dimensional Transformation
Suppose \(X=(X_1,X_2)\) has joint density \(f_X(x_1,x_2)=e^{-x_1-x_2}\) for \(x_1>0,\ x_2>0\), and zero otherwise. Define \(Y=g(X)\) by \(Y_1=X_1\) and \(Y_2=X_1X_2\). Find the joint density of \(Y\).
On the positive quadrant, \(g\) is a bijection onto the positive quadrant: given \(y_1>0,\ y_2>0\), its inverse is \(h(y_1,y_2)=(y_1,y_2/y_1)\). The derivative matrix and its determinant are
The support remains the positive quadrant, and for \(y_1,y_2>0\),
Check that this integrates to one by first integrating with respect to \(y_2\):
In the inner integral, the substitution \(s=y_2/y_1\) gives \(dy_2=y_1\,ds\), so the inner integral is \(\int_0^\infty e^{-s}\,ds=1\).
Worked Example: Tracking a Bounded, Nonrectangular Support
Let \(X=(X_1,X_2)\) be uniform on the unit square \(U=(0,1)\times(0,1)\), with density one there. Define \(Y_1=X_1\) and \(Y_2=X_2/(1+X_1)\). Find the support and density of \(Y\).
Solving for the original coordinates gives \(x_1=y_1\) and \(x_2=(1+y_1)y_2\). The conditions \(0<x_1<1\) and \(0<x_2<1\) become
This is the transformed support: it is not the unit square. The inverse derivative matrix has determinant
Since the original density is one on the square, the transformed density is \(1+y_1\) on the region just found and zero elsewhere. Its integral is
The support condition and the Jacobian factor work together: the height of the support at \(y_1\) is \(1/(1+y_1)\), while the density there is \(1+y_1\).
Support, Regularity, and Common Pitfalls
The formula applies where \(Y\) can occur: if \(X\) is concentrated on \(U\), then \(Y=g(X)\) is concentrated on \(V\). Within \(V\), the transformed density is nonzero wherever the inverse image has positive original density, subject to the usual qualification that densities are defined only almost everywhere. If the original density is zero on part of \(U\), its image need not carry positive transformed density. Thus, transforming the map's whole range identifies where \(Y\) is allowed to lie, while transforming the region where \(f_X\) is positive identifies where its density is positive.
A frequent mistake is to use \(|\det Dg(y)|\) as the multiplier and evaluate \(f_X\) at \(g(y)\). The variables do not match: \(g\) takes original points to transformed points, while the density formula at \(y\) requires the original point \(h(y)\). The correct factor is \(|\det Dh(y)|\), or equivalently \(1/|\det Dg(h(y))|\). Another common error is to give a formula on the transformed range but omit its boundaries or inequalities; that can incorrectly assign positive density to impossible values.
The determinant factor describes local volume change. When \(|\det Dh(y)|\) is large, a small volume near \(y\) corresponds to a larger volume in the original coordinates, and its transformed density is correspondingly larger. When the inverse map compresses volume, the factor is smaller. Keeping the inverse, determinant, and support together provides a reliable check before using a transformed law in further calculations.
Check Your Understanding
For each question, identify both the Jacobian factor and the support implications.
- In the bijective change-of-variables formula, why is the density evaluated at \(h(y)\) rather than \(g(y)\)?
- If \(g:U\to V\) is a diffeomorphism, write the relationship between \(|\det Dh(y)|\) and \(|\det Dg(h(y))|\).
- For the transformation in the bounded-support example, why is the transformed support not the unit square?
- A proposed transformed density integrates to one over all of \(\mathbb{R}^d\), but is positive outside \(g(U)\). What must be corrected?
- Why does the change-of-variables formula use an absolute value around the Jacobian determinant?