4.9.14 · D1Probability Theory & Statistics

Foundations — Transformations of random variables — change-of-variable technique

1,837 words8 min readBack to topic

This page assumes you have seen none of the notation in the parent note. We build each symbol, anchor it to a picture, and only then let the next symbol lean on it.


1. Random variable — a number that comes out of a random process

Picture. Think of a machine that spits out a number every time you press a button — sometimes , sometimes , sometimes . The machine is the random process; the number it prints is .

Why the topic needs it. The whole subject is "I know how one machine's numbers behave; I feed those numbers into a function; how does the new machine behave?" You cannot even ask that question without a name for the number: .

  • Capital = the machine / the number before you know which value came out.
  • Lowercase = a specific value the machine could print (a fixed point on the number line).

Keeping these two apart is the single most useful habit. reads "the chance the machine prints something at or below the fixed spot ."


2. The number line and the support — where the paint can land

Figure — Transformations of random variables — change-of-variable technique

Picture (figure above). A horizontal ruler. The shaded band is where values are possible; outside it, the machine never prints, so there is zero paint.

Why the topic needs it. After you bend the axis, the new variable can only land where the old one could. If lives on and , then can only be in too. Forgetting the support is one of the four classic mistakes in the parent note.


3. Probability density — how thick the paint is

Figure — Transformations of random variables — change-of-variable technique

Picture (figure above). A curve sitting above the ruler. Its height at a point is . Where the curve is tall, paint is thick (values there are more likely); where it is low, paint is thin.

Why "per unit length" matters. Height alone is meaningless — you must multiply by a width to get an amount of paint. That is the next idea and it is the heart of the whole technique.


4. The differential — an infinitely thin slab of width

Picture. Zoom into the ruler until a slab is so narrow the density curve over it looks flat. Its area is a thin rectangle:

Why the topic needs it. The entire change-of-variable equation is i.e. "amount of paint on the after-slab = amount on the before-slab." Every symbol in that line now has a picture.


5. The function — bending the ruler

Figure — Transformations of random variables — change-of-variable technique

Picture (figure above). Two parallel rulers: the bottom is the -axis, the top is the -axis. The curve maps each bottom point up to a top point. A slab of width on the bottom gets carried to a slab of width on the top — and it is usually a different width. That difference in width is exactly why the paint thickness changes.

  • Monotonic = the curve only goes up (increasing) or only goes down (decreasing); it never turns around. Then each comes from exactly one .
  • Non-monotonic = the curve turns (like , a valley), so one can come from two different values.

6. The inverse — reading the map backwards

Picture. On the two-ruler figure, pick a point on top and slide back down the arrow to find the it came from. That backward slide is .

Why the topic needs it. The final formula is written in terms of (we want to know about ), but only knows about . To evaluate at "the that produced this ", we must write that as . A monotonic guarantees exactly one such , which is why monotonic is the clean case.


7. The derivative — the stretch factor (the Jacobian)

Figure — Transformations of random variables — change-of-variable technique

Picture (figure above). A before-slab of width on the bottom ruler and the after-slab of width it maps to on the top. If the after-slab is twice as wide, the paint on it is half as thick. The ratio tells you exactly by how much the thickness rescales.

Why the absolute value. Widths are lengths — always positive. If decreases, sliding forward in means sliding backward in , so comes out negative. Wrapping it in throws away that direction and keeps only the size of the stretch, so density stays positive.

Why the reciprocal warning. and are upside-down versions of each other: The formula needs the inverse map's slope, . Grabbing by reflex is the second classic mistake.


8. The CDF — paint counted from the left

Picture. Sweep a broom from far left up to the point ; is how much paint you have swept up. It starts at (nothing swept) and rises to (all swept).

Why the topic needs it. Densities can be slippery to manipulate directly, but the CDF always behaves. The parent's cleanest derivation goes , translates the event into an -statement, then differentiates to get back the density — because density is the slope of the CDF:


9. Total probability equals one — the sanity check

Why the topic needs it. After you compute a new , integrating it must again give . If you forgot the Jacobian, it usually won't — so this is your built-in error detector.


How the foundations feed the topic

Random variable X

Support on the number line

Density f_X thickness of paint

Slab of mass f_X times dx

Transformation Y equals g of X

Inverse g to the minus one

Stretch factor dx over dy the Jacobian

CDF F_X paint from the left

Change of variable technique

Read it as: the density gives a slab of mass; the transformation and its inverse tell you where the slab goes; the Jacobian tells you how much it rescales; conservation of that mass is the technique.


Equipment checklist

Test yourself — each line reveals its answer.

Difference between capital and lowercase
is the random number before you know it; is a fixed value/spot on the number line.
What does measure — a probability or something else?
Thickness of paint = probability per unit length (a density, not a probability).
What object is an actual amount of probability?
An area: (height times width), or an integral of the density.
What is the support of ?
The stretch of the number line where can land / where the density is nonzero.
What does answer?
"Which mapped to this ?" — it undoes .
What does represent physically?
The stretch/squeeze factor of the map — how much paint thickness rescales; the 1D Jacobian.
Why the absolute value on the Jacobian?
Widths are positive lengths; a decreasing gives a negative slope, and keeps only its size so density stays positive.
Relation between and ?
They are reciprocals: .
What is and why is it used in the derivation?
, all paint to the left; it always behaves, and its slope is the density.
What must equal, and why is that useful here?
It must equal ; it is your check that a computed is valid.