Transformation rule
Theorem taught in Functions of random variables and limit theorems, part of Probability
Transformation rule
| Type | Theorem |
| Taught in | Functions of random variables and limit theorems |
| Part | Probability |
| Worked examples | 4 |
| Questions using it | 1 |
Let \mathbf{X} take values in an open set of \mathbb{R}^n with density f_{\mathbf{X}}, and let \mathbf{Z}=g(\mathbf{X}) where g is a smooth bijection onto its image, with inverse g^{-1} and Jacobian determinant J that does not vanish. The density of \mathbf{Z} is
f_{\mathbf{Z}}(\mathbf{z})=f_{\mathbf{X}}\bigl(g^{-1}(\mathbf{z})\bigr)\,\bigl|\det Dg^{-1}(\mathbf{z})\bigr|.
Equivalently, if the Jacobian is computed for g rather than for the inverse, divide by |\det Dg| evaluated at the preimage. For a linear map \mathbf{Z}=A\mathbf{X} with A invertible, f_{\mathbf{Z}}(\mathbf{z})=f_{\mathbf{X}}(A^{-1}\mathbf{z})/|\det A|.
Examples
The square of a standard normal
Worked example from Functions of random variables and limit theorems
Let X\sim\operatorname{N}(0,1) and Y=X^2.
Question. Find the density of Y.
Solution. The map x\mapsto x^2 is not monotone, so work with the distribution function. For y>0,
F_Y(y)=\mathbb{P}(-\sqrt y\le X\le\sqrt y)=\Phi(\sqrt y)-\Phi(-\sqrt y)=2\Phi(\sqrt y)-1.
Differentiating, with \Phi'=\varphi the standard normal density,
f_Y(y)=2\varphi(\sqrt y)\cdot\frac1{2\sqrt y}=\frac{1}{\sqrt{2\pi}}\,y^{-1/2}e^{-y/2},\qquad y>0.
That is the \operatorname{Gamma}(1/2,1/2) density, the chi-squared law with one degree of freedom, since \Gamma(1/2)=\sqrt\pi.
Sum and proportion of two exponentials
Question page: Sum and proportion of two exponentials
Let X and Y be independent and exponential with rate 1. Set U=X+Y and V=X/(X+Y), so that X=UV and Y=U(1-V).
Find the absolute value of the Jacobian determinant of (u,v)\mapsto(x,y).
Find the joint density of (U,V).
Show that U and V are independent, and name their marginal distributions.
x=uv and y=u(1-v). The Jacobian matrix is \begin{pmatrix} v & u \\ 1-v & -u \end{pmatrix}, with determinant -u. Its absolute value is u for u>0.
The joint density of (X,Y) is e^{-(x+y)}=e^{-u} on the positive quadrant. Multiplying by the absolute Jacobian gives f_{U,V}(u,v)=u e^{-u} for u>0 and 0<v<1.
Integrating in u leaves f_V(v)=1 on [0,1]. Integrating in v leaves f_U(u)=u e^{-u} for u>0, which is \operatorname{Gamma}(2,1) in the shape–rate parameterisation. The joint density is the product, so U and V are independent. V is uniform on [0,1].
A quadratic function of a uniform variable
Question page: A quadratic function of a uniform variable
Let X be uniform on [1,3] and set Y=X^2-4. Find the density of Y, including the set on which it is zero.
On [1,3] the map x\mapsto x^2-4 increases from -3 to 5. For y in that range,
\mathbb{P}(Y\le y)=\mathbb{P}\bigl(X\le\sqrt{y+4}\bigr)=F_X(\sqrt{y+4}).
The uniform density on [1,3] is 1/2, so
f_Y(y)=\frac{1}{2}\cdot\frac{1}{2\sqrt{y+4}}=\frac{1}{4\sqrt{y+4}}, \qquad -3<y<5,
and f_Y(y)=0 otherwise.
Distance to the centre
Question page: Distance to the centre
A point is drawn uniformly from the disc of radius 4. Let R be its distance to the centre.
Find \mathbb{P}(R>2).
Find the density of R.
The disc has area 16\pi and the disc of radius 2 has area 4\pi, so \mathbb{P}(R>2)=(16\pi-4\pi)/(16\pi)=3/4.
For 0<r<4, \mathbb{P}(R\le r)=\pi r^2/(16\pi)=r^2/16. Differentiating gives f(r)=r/8 on (0,4), and f(r)=0 elsewhere.
Used in
- Taught in Functions of random variables and limit theorems, where the derivation and examples are.
- Also used in Random variables and distributions · Simulation · Joint distributions
- Questions that use it (1) — Sum and proportion of two exponentials
- All 21 questions on Functions of random variables and limit theorems
See also
Multivariate normal distribution · Affine images of normal vectors · Normal linear model · Law of large numbers · Central limit theorem