Y = 2X + 1, X ~ U(0, 1)
f_Y = 1 × 1/2
0.5 on (1, 3).
If with monotonic, then . Probability mass is conserved, so the density is scaled by how the map stretches the axis.
This page is easier if you are comfortable with:
Let and . Then , and , an exponential density (the exponential distribution); for , . With and : , , so , equal to 1 at .
For a linear change with : , , so , which is the density; at it is (the normal density, linear transformations). The derivative of the inverse is from the inverse function derivative.
When is not one-to-one, add the contributions of each branch. In several variables the derivative is replaced by the Jacobian determinant (the Jacobian, joint densities). The method generates random numbers from a given distribution (inverse transform sampling), used in Monte Carlo simulations.
When a random variable is transformed, its density is rescaled by the derivative of the inverse transformation.
Squaring crowds the probability near zero, so the density is high there.
These examples are worked by hand, step by step, so you can compare your own working.
For , , find .
For , , find .
For , , find .
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
f_Y = 1 × 1/2
0.5 on (1, 3).
1/(2√y)
1.
f_X(ln y)/y = e^(−ln 2)/2
0.25.
density integrates to 1
0.5 × 2 = 1.
For Y = g(X) monotonic, f_Y(y) = f_X(g⁻¹(y))|d g⁻¹/dy|. Probability mass is conserved, so the density is rescaled by the stretch of the map.
Y = 2X + 1, X ~ U(0, 1). Find f_Y.
Y = X², X ~ U(0, 1). Find f_Y(0.25).
Y = e^X, X ~ Exp(1). Find f_Y(2).
Check the area of the density 0.5 on (1, 3).
f_X(g⁻¹(y)) ✗
times |dx/dy| ✓
Scaling.
single branch ✗
sum over branches ✓
e.g. Y = X².
old range ✗
transformed range ✓
Y ∈ (1, 3).
multiply by g′ ✗
divide by g′ ✓
Inverse derivative.
Try each one on paper, then open the answer. Use the solver above to see the full working.
0.3333
1.25
0.25
0.0625
0.5
1
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
f_Y(y) = f_X(g⁻¹(y))|dg⁻¹/dy|.
The map stretches or squeezes the axis.
Add contributions of each branch.
The density must integrate to 1.
joint, marginal and conditional densities.
More in Advanced statistics and stochastic processes and the formula sheets.