Tutorials › VEE Mathematical Statistics › Change of Variables for Joint Densities

VEE Mathematical Statistics · Functions of a Random Variable · Tutorial 251 of 880

Change of Variables for Joint Densities

Use the inverse transformation and its Jacobian determinant to find joint densities on transformed supports.

Intermediate 11 min read

What You'll Learn

  • State the conditions under which the joint-density change-of-variables formula applies.
  • Find an inverse transformation and compute its Jacobian determinant.
  • Translate the original support into the transformed variables.
  • Calculate a transformed joint density and probabilities on its support.
  • Recognize common errors involving the inverse map, support, and absolute determinant.

Why Transform a Joint Density?

A pair of continuous random variables can be easier to describe in new coordinates than in its original ones. For example, the sum and the fraction contributed by one component may be more useful than the two component values separately. The change-of-variables method gives the joint density in those new coordinates while accounting for how the transformation stretches or compresses area.

The essential tasks are to specify the transformation, find its inverse, determine the transformed support, and calculate the absolute determinant of the inverse map’s Jacobian matrix. The support matters: the density formula describes the transformed random vector only where that vector can actually occur.

Definition: Let \((X,Y)\) have joint density \(f_{X,Y}(x,y)\) on a support \(D\). Define \((U,V)=g(X,Y)\), where \(g\) is one-to-one and differentiable on the interior of \(D\), and suppose its inverse is differentiable on the transformed support \(D^*\). Write that inverse as \(x=x(u,v)\), \(y=y(u,v)\). If its Jacobian determinant is nonzero in the interior, then $$ f_{U,V}(u,v) = f_{X,Y}\bigl(x(u,v),y(u,v)\bigr) \left| \frac{\partial(x,y)}{\partial(u,v)} \right|, \qquad (u,v)\in D^*, $$ and \(f_{U,V}(u,v)=0\) outside \(D^*\). Here $$ \frac{\partial(x,y)}{\partial(u,v)} = \begin{vmatrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v}\\[4pt] \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \end{vmatrix}. $$

How to Apply the Formula

The determinant in the density formula is for the inverse transformation: it measures how a small area in the \((u,v)\)-plane corresponds to area in the original \((x,y)\)-plane. The absolute value is necessary because a transformation can reverse orientation, making the determinant negative, but probability and area cannot be negative.

1
Record the original model and support.
Write down \(f_{X,Y}(x,y)\) and the set of \((x,y)\) values where it is positive. Include any dependence between \(X\) and \(Y\) in the joint density.
2
Invert the transformation.
Solve for \(x\) and \(y\) in terms of \(u\) and \(v\). Check that the inverse is valid and unique on the support being transformed.
3
Transform the support.
Substitute the inverse expressions into every restriction on \(x\) and \(y\). The resulting inequalities define \(D^*\).
4
Calculate and apply the inverse Jacobian.
Differentiate \(x(u,v)\) and \(y(u,v)\), take the absolute determinant, and multiply it by the original density evaluated at the inverse values.
5
Check the result.
The density must be nonnegative and integrate to one over its transformed support. For an event, translate the event into \((u,v)\) coordinates before integrating.

Why the Jacobian Appears

A short area argument explains the determinant factor. Near an interior point, a differentiable transformation is approximated by its linear derivative matrix. A linear map changes a small area by the absolute value of its determinant. Thus the inverse map changes a small transformed area \(du\,dv\) into approximately \(\left|\partial(x,y)/\partial(u,v)\right|du\,dv\) of original area. Probability is unchanged by merely changing coordinates, so the probability in that small region is approximately the original density at the inverse point times this original area. Dividing by \(du\,dv\) gives the transformed density formula.

This local argument explains the factor and its direction; the formula is used here for one-to-one differentiable transformations with a differentiable inverse and nonzero determinant in the interior. If a transformation is not one-to-one, a single inverse is not enough: the density must account for all inverse points, which is outside the scope of this method as stated.

Worked Example: Sum and Difference of Two Uniform Variables

Let \(X\) and \(Y\) be independent uniform random variables on \((0,1)\). Find the joint density of \(U=X+Y\) and \(V=X-Y\), and calculate \(P(U<1,\ V>0)\).

Method and original model. Independence and the uniform densities give \(f_{X,Y}(x,y)=1\) for \(0<x<1,\ 0<y<1\), and zero elsewhere. The transformation is \(u=x+y,\ v=x-y\). Solving these equations gives \(x=(u+v)/2\) and \(y=(u-v)/2\).

Support. The original restrictions become \(0<(u+v)/2<1\) and \(0<(u-v)/2<1\). Equivalently, \(0<u+v<2\) and \(0<u-v<2\). These inequalities, not a rectangle guessed from the ranges of \(U\) and \(V\) separately, describe the transformed support.

Jacobian and density. The inverse derivatives are \(x_u=1/2,\ x_v=1/2,\ y_u=1/2,\ y_v=-1/2\). Therefore $$ \left|\frac{\partial(x,y)}{\partial(u,v)}\right| = \left| \begin{vmatrix} 1/2 & 1/2\\ 1/2 & -1/2 \end{vmatrix} \right| = \left|-\frac14-\frac14\right| =\frac12. $$

Consequently, \(f_{U,V}(u,v)=1/2\) when \(0<u+v<2\) and \(0<u-v<2\), and it is zero elsewhere.

Probability. The event \(U<1,\ V>0\), within the support, is \(0<u<1,\ 0<v<u\). Indeed, \(v>0\) and \(u-v>0\) give \(0<v<u\); with \(u<1\), the remaining upper support bound \(u+v<2\) is automatic. Hence $$ P(U<1,\ V>0) =\int_0^1\int_0^u \frac12\,dv\,du =\int_0^1 \frac{u}{2}\,du =\frac14 =0.2500. $$

Check and common mistake avoided. The transformed support is a parallelogram of area \(2\), so its constant density integrates to \(2(1/2)=1\). The forward determinant is \(-2\); using its absolute value, \(2\), as the multiplier would incorrectly give density \(2\). The formula uses the inverse determinant, whose absolute value is \(1/2\).

Worked Example: Sum and Proportion for Exponential Variables

Let \(X\) and \(Y\) be independent exponential random variables, each with rate \(1\), so their joint density is \(e^{-(x+y)}\) for \(x>0,\ y>0\). Find the joint density of \(U=X+Y\) and \(V=X/(X+Y)\).

Method and inverse. From \(u=x+y\) and \(v=x/(x+y)\), we obtain \(x=uv\) and \(y=u(1-v)\). Both original variables are positive exactly when \(u>0\) and \(0<v<1\). This is the transformed support.

Jacobian. The inverse derivatives are \(x_u=v,\ x_v=u,\ y_u=1-v,\ y_v=-u\). Thus $$ \left|\frac{\partial(x,y)}{\partial(u,v)}\right| = \left| \begin{vmatrix} v & u\\ 1-v & -u \end{vmatrix} \right| = |-uv-u(1-v)| =u. $$

Transformed density. At the inverse values, \(x+y=uv+u(1-v)=u\), so the original density becomes \(e^{-u}\). Multiplying by the inverse Jacobian gives $$ f_{U,V}(u,v)=u e^{-u},\qquad u>0,\ 0<v<1, $$ and the density is zero elsewhere. $$

Check and common mistake avoided. Its integral is \(\int_0^\infty\int_0^1 u e^{-u}\,dv\,du =\int_0^\infty u e^{-u}\,du=1\); the last integral is one by integration by parts. The factor is \(u\), not \(1/u\): differentiating the inverse map gives the area factor required by this formula. Also, \(v\) must be restricted to \((0,1)\), since \(V\) is a fraction of the positive sum.

Worked Example: A Ratio Coordinate on a Triangular Support

Suppose \((X,Y)\) has joint density \(f_{X,Y}(x,y)=2\) on \(x>0,\ y>0,\ x+y<1\), and zero elsewhere. Define \(U=X+Y\) and \(V=Y/X\). Find the joint density and calculate \(P(U<1/2,\ V<1)\).

Method and support. Solving \(u=x+y\) and \(v=y/x\) yields \(x=u/(1+v)\) and \(y=uv/(1+v)\). Positivity gives \(u>0,\ v>0\). Since \(x+y=u\), the original bound \(x+y<1\) adds \(u<1\). Therefore the transformed support is \(0<u<1,\ v>0\).

Jacobian and density. The inverse derivatives are \(x_u=1/(1+v),\ x_v=-u/(1+v)^2,\ y_u=v/(1+v),\ y_v=u/(1+v)^2\). It follows that $$ \left|\frac{\partial(x,y)}{\partial(u,v)}\right| = \left| \frac{u}{(1+v)^3}+\frac{uv}{(1+v)^3} \right| =\frac{u}{(1+v)^2}. $$

The original density is \(2\) throughout the support, so \(f_{U,V}(u,v)=2u/(1+v)^2\) for \(0<u<1,\ v>0\), and zero elsewhere. A normalization check gives $$ \int_0^\infty\int_0^1 \frac{2u}{(1+v)^2}\,du\,dv =\int_0^\infty \frac{1}{(1+v)^2}\,dv =1. $$

Probability. The event becomes \(0<u<1/2,\ 0<v<1\). Therefore $$ P(U<1/2,\ V<1) =\int_0^1\int_0^{1/2}\frac{2u}{(1+v)^2}\,du\,dv =\frac14\int_0^1\frac{1}{(1+v)^2}\,dv =\frac14\left(1-\frac12\right) =\frac18 =0.1250. $$

Check and common mistake avoided. Integrating over the full transformed support gives one, and the requested event is a subset of that support. A frequent error is to impose \(v<1\) as part of the full support merely because it appears in the probability event. The ratio \(Y/X\) can be any positive value; only the event restricts it to less than one.

Exam Traps and Scope of the Method

The examples illustrate why the inverse map and support must be handled together. A correct determinant cannot repair an incorrectly specified support, and a correct support cannot compensate for using the determinant of the wrong map. Before integrating a transformed density or event probability, check each of the following:

  • Use the inverse determinant. The density formula multiplies by \(\left|\partial(x,y)/\partial(u,v)\right|\), not by the determinant of the forward transformation.
  • Take the absolute value. A negative determinant signals reversed orientation, not negative probability.
  • Keep the full support restrictions. Transform every original inequality, including restrictions that do not follow from separate ranges for \(U\) and \(V\).
  • Check one-to-one behavior. The stated formula uses one inverse point for each transformed point. If multiple original points map to the same \((u,v)\), this one-to-one version does not apply directly.
  • Check total probability. Integrating the proposed density over its full transformed support should give one.

For a continuous model, changing coordinates does not change the probability of an event; it changes how that probability is expressed as an integral. The Jacobian adjusts the density to match the changed area scale. This is why transformations can simplify a problem, but also why omitting the support or determinant produces a fundamentally incorrect density.

Check Your Understanding

For each problem, identify the transformed support before applying the density formula.

  1. Let \(X\) and \(Y\) be independent uniform random variables on \((0,1)\). Set \(A=2X\) and \(B=3Y\). Find \(f_{A,B}(a,b)\), including its support. (Answer: \(f_{A,B}(a,b)=1/6\) for \(0<a<2,\ 0<b<3\), and zero elsewhere.)
  2. Let \(X,Y\) be independent exponential variables with rate \(1\). Set \(T=X+Y\) and \(R=Y/(X+Y)\). Find the joint density and support. (Answer: \(f_{T,R}(t,r)=t e^{-t}\) for \(t>0,\ 0<r<1\), and zero elsewhere.)
  3. Suppose \(f_{X,Y}(x,y)=2\) on \(x>0,\ y>0,\ x+y<1\). Set \(S=X+Y\) and \(Q=X/(X+Y)\). Find \(f_{S,Q}(s,q)\) and its support. (Answer: \(f_{S,Q}(s,q)=2s\) for \(0<s<1,\ 0<q<1\), and zero elsewhere.)
  4. Suppose \(X,Y\) have joint density \(1/4\) on \(0<x<2,\ 0<y<2\). Set \(U=X+Y,\ V=X\). Find the transformed density and support. (Answer: \(f_{U,V}(u,v)=1/4\) for \(0<v<2,\ v<u<v+2\), and zero elsewhere.)
  5. Let \(X,Y\) be independent uniform variables on \((0,1)\). Set \(U=-\ln X\) and \(V=Y/X\). Find the transformed density and support. (Answer: \(f_{U,V}(u,v)=e^{-2u}\) for \(u>0,\ 0<v<e^u\), and zero elsewhere.)
Clinical Biostats