4.9.11 · D2Probability Theory & Statistics

Visual walkthrough — Independence of random variables — formal definition

1,759 words8 min readBack to topic

Before anything: two words we will use constantly.

Everything below lives on a flat picture: the horizontal axis is every value could take, the vertical axis is every value could take. One dot = " came out and came out ".


Step 1 — Two wheels that ignore each other

WHAT. Picture two spinning wheels. Wheel- can stop on any value along the bottom axis; wheel- on any value up the side.

WHY. We need the mental model of "not talking to each other" before we can write it as maths. Independence is precisely: watching wheel- stop tells you nothing new about where wheel- will stop.

PICTURE. In the figure, the shaded strip is the event " fell in " (a vertical band, because it constrains only the horizontal axis). The other strip is " fell in " (a horizontal band). The rectangle where they overlap is " and ".

Figure — Independence of random variables — formal definition

The whole derivation is one question: how big is that overlap rectangle's probability?


Step 2 — The independence equation, term by term

WHAT. We claim: for independent variables, the probability of the overlap rectangle is the width-band probability times the height-band probability.

Reading each symbol on the picture from Step 1:

  • — the shaded overlap (both conditions hold at once).
  • — probability of the vertical band alone, ignoring .
  • — probability of the horizontal band alone, ignoring .

WHY multiply? This is inherited straight from Independence of events: two events are independent exactly when their combined chance is the product. A random variable is just a factory of events "", so we demand the product rule for every band and every band .

PICTURE. The next figure shows why "for all " is not overkill: one lucky rectangle obeying the product rule does not force the others. Independence is a promise about every rectangle at once.

Figure — Independence of random variables — formal definition

Step 3 — Shrink the bands to "everything up to "

WHAT. Testing all sets is infinite work. So pick the simplest possible bands: (" is at most ") and (" is at most ").

WHY these bands. They are nested — as you slide right, the band only grows. That single family of "staircase" bands is enough to rebuild every region later (Step 6 explains why). We trade an infinite test for a checkable one.

Plug them into the Step 2 equation:

PICTURE. Now the overlap is the whole lower-left quarter anchored at the corner point : everything to the left of AND below .

Figure — Independence of random variables — formal definition

Step 4 — Name the corner box: the CDF

WHAT. The probability of that lower-left box has a name.

Rewriting Step 3 with these names gives the flagship result:

WHY it's beautiful. The messy 2-D box collapses into two 1-D piles you can compute separately, then multiply.

PICTURE. The figure paints the corner box as the product of a left-strip fraction and a bottom-strip fraction — area = width height, made of probability.

Figure — Independence of random variables — formal definition

Step 5 — From piled-up boxes to densities

WHAT. A CDF piles probability up. To see the probability at a point, we ask how fast the pile grows — that's a derivative.

WHY a derivative, and why two of them. measures "how much probability sits in a thin vertical sliver at ". Doing it again in , , isolates the probability in a tiny tile at . That tile-density is the joint PDF.

Differentiate both sides of the CDF factorisation. A product of a function of and a function of splits cleanly (the -derivative ignores the -factor and vice-versa):

PICTURE. Left: a smooth surface whose tile at equals (slice through ) (slice through ). Right: a grid of spikes whose height is (row weight) (column weight).

Figure — Independence of random variables — formal definition

Step 6 — Why testing only corner boxes is ENOUGH

WHAT. We only checked the nested bands. Does the product rule really hold for every weird region ?

WHY yes. Any band is built from corner boxes by adding and subtracting. "" (box up to ) (box up to ). Every Borel set is reached by stacking such pieces. Because the product rule survives these additions and subtractions, holding on the corner boxes forces it everywhere.

PICTURE. A rectangle strip is drawn as (big corner box) (left box) (bottom box) (corner double-counted back in) — the classic inclusion–exclusion of four boxes. If each box factorises, so does the strip.

Figure — Independence of random variables — formal definition
Recall Why sufficient, not merely necessary

Corner boxes generate all Borel sets ::: so the product rule on them propagates to every region, making the CDF test equivalent to full independence.


Step 7 — The trap: separable formula, coupled support

WHAT. A formula can look like yet the variables still gossip — if the shape of the support links them.

WHY it fails. Take on the triangle . The number is as separable as it gets (). But the region is a triangle, not a rectangle: learning forces . That is information transfer — the definition in Step 2 breaks for the band once .

Check by computing marginals and multiplying:

PICTURE. The triangle support (magenta) with a dashed vertical line at : the allowed -values start at , not at . The rectangle test fails because no product-shaped box contains exactly this triangle.

Figure — Independence of random variables — formal definition

Step 8 — The clean case (so you see success too)

WHAT. on .

WHY it works. : separable, and the support is a genuine rectangle (an infinite quarter-plane, still a product). Both boxes ticked.

PICTURE. The quarter-plane support (a real rectangle to infinity) with contour tiles that visibly factor into an -profile times a -profile.

Figure — Independence of random variables — formal definition

Independence here means , hence covariance — but remember from Covariance and correlation that zero covariance alone would not buy you independence back.


The one-picture summary

Everything on this page is one arrow of logic: event product rule → all bands → nested corner boxes → CDF → derivative → PDF/PMF, guarded by the rectangular-support gate.

Figure — Independence of random variables — formal definition
Recall Feynman retelling (plain words)

Two fair-ground wheels are independent if watching one land tells you nothing about the other. On a flat map — wheel- across the bottom, wheel- up the side — "both land in these ranges" is an overlap rectangle. Independence says: chance of the overlap = chance of the left band × chance of the bottom band, and this must hold for every rectangle, not one lucky one. Checking infinitely many rectangles sounds impossible, so we only check the simplest ones: "everything down-and-left of a corner point". That pile is the CDF, and the rule becomes . Zoom into a single point with a double derivative and the corner boxes turn into tiny tiles: . For grids of dots it's . Two traps: a formula can look like (something in )(something in ) yet still be dependent if its support is a triangle rather than a box — then knowing pins down where can live. And zero covariance is weaker than independence. The whole slogan: joint = product, everywhere, on a rectangle.

Connections