Step-by-step method for transforming two random variables using the Jacobian to find the joint pdf, with worked example

How Do We Transform Random Variables?

We explain the Jacobian method to find the joint PDF of two new random variables after a transformation.

Suppose we begin with two continuous random variables $X$ and $Y$.

We use these to define two new random variables:

$$U=f(X,Y), \ \ V=g(X,Y)$$

To find the joint PDF of $U$ and $V$, we can follow these three steps.

Firstly, find the inverse transformation.

This may require you to solve some simultaneous equations to find $X$ and $Y$ in terms of $U$ and $V$.

Secondly, differentiate $x$ and $y$ with respect to $u$ and $v$, and find the following matrix:

$$ J= \begin{bmatrix} \frac{ \partial x}{ \partial u} & \frac{ \partial x}{ \partial v} \\ \frac{ \partial y}{ \partial u} & \frac{ \partial y}{ \partial v} \end{bmatrix}$$

This matrix is called the Jacobian.

Thirdly, find the determinant of the Jacobian, $det(J)$, and compute:

$$ \ f_{U,V}(u,v) = \det(J) \ f_{X,Y}(x,y) $$

Be sure to write everything in terms of $u$ and $v$, and to identify the range of values of $u$ and $v$ for which this is valid. You can do this by considering what happens to $f(x,y)$ and $g(x,y)$ as $x$ and $y$ vary over their ranges.

For instance, suppose that $X$ and $Y$ have the following joint PDF:

$$f_{X,Y}(x,y) = 8xy, \ \ 0 \lt x \lt 1 \ \ \text{and} \ \ 0 \lt y \le x$$

We then define $U=X$ and $V=XY$. Let’s use the method to find the joint PDF of $U$ and $V$.


Step 1.

We find that $X=U$ and $Y=V/U$.

Step 2

The Jacobian is:

$$ J= \begin{bmatrix} 1 & 0 \\ \frac{-v}{u^2} & \frac{1}{u} \end{bmatrix}$$

Its determinant is:

$$ det(J)=\frac{1}{u} $$

Step 3

We compute:

$$ \ f_{U,V}(u,v) = \frac{1}{u} 8xy = \frac{1}{u} 8(u) \left( \frac{v}{u} \right) = \frac{8v}{u} $$

With a little care, we see that $U$ can vary between $0$ and $1$, since it is the same as $X$, and once $U$ is fixed, $V$ can be anywhere between $0$ and $U^2$. So, the above formula is valid for all $0 \lt u \lt 1, \ 0 \lt v \le u^2$.

This condition can be simplified to $0 \lt \sqrt{v} \le u \lt 1$.

Background: