4.9.13 · D1Probability Theory & Statistics

Foundations — Conditional expectation

1,965 words9 min readBack to topic

Before you can read the parent note on Conditional expectation, you need to own every symbol it fires at you. This page builds them one at a time, from a smart 12-year-old's starting point. No symbol appears here before it is defined in words and pinned to a picture.


0. The picture underneath everything: the sample space

Everything in probability lives inside one big box called the sample space — the set of all things that could possibly happen. We draw it as a rectangle, and we imagine sprinkling probability like sand across it: the total amount of sand is exactly .

Figure — Conditional expectation

Why the topic needs it. Conditional expectation is going to say "keep only part of the box." You cannot understand "part of the box" until you can see the whole box. Every symbol below is a label on some region or some sand inside this rectangle.


1. The symbols and — random variables

Picture it as a machine: you feed in an outcome (a dot), and out pops a number.

  • = "the sum of two dice" turns the outcome "(3,5)" into the number .
  • = "the first die" turns "(3,5)" into .
Figure — Conditional expectation

Why the topic needs it: the whole subject is "what does knowing the number from machine tell me about the number from machine ?"


2. The symbol — a probability distribution

Now combine the two ideas. is shorthand for the event "the machine produced the number " — i.e. the region of the box where all the dots that map to live.

Why the topic needs it: the very first line of the parent's definition is . You must be able to hear as "sand on a region" or that sum is meaningless.


3. The symbol — a sum over cases

Picture a checklist: one row per value of , compute the row, add the column.

Why the topic needs it: is how we glue together "one number per case" into "one grand total." Every expectation formula is a .


4. The symbol — plain expectation

Now we can build the star of the show's un-conditional cousin.

Figure — Conditional expectation

This idea (and the fact that ) is developed in Expectation and its linearity. Why the topic needs it: conditional expectation is the same formula, just computed after shrinking the box.


5. The symbol — a joint probability

Two machines run on the same outcome. So we can ask about both at once.

Picture the box split into a grid: columns are values of , rows are values of . Each cell holds some sand; the joint probability is the sand in one cell.

Figure — Conditional expectation

The grid, rows, columns, and marginals are the subject of Joint and marginal distributions. Why the topic needs it: this exact collapse is the punchline step of the Tower Rule derivation in the parent note.


6. The symbol — conditional probability

Here is the move at the heart of everything: learning shrinks the box.

Why divide by ? Because after you delete the non-matching outcomes, the surviving sand no longer adds to — it adds to . Dividing re-inflates the survivors so they total again, making them a proper distribution.

Figure — Conditional expectation

This is developed in Conditional probability, and stitching all the columns back together is Law of total probability. Why the topic needs it: replace plain with this conditional version inside the formula and you literally have .


7. Two functions and one arrow: and

The final piece of vocabulary the parent leans on.

Why the topic needs it: everything after the definition — the Tower Rule, "taking out what is known," Conditional variance and Eve's law, and the martingale generalisation in Martingales — treats as a random variable. Miss this and the notation looks like nonsense.


How these foundations feed the topic

Sample space the box of all outcomes

Random variable X and Y number machines

Distribution P of X equals x sand on a region

Summation sign add over all cases

Expectation E of X the balance point

Joint P of X and Y the grid

Marginalising squash the grid

Conditional P given Y zoom into a column

Function g of Y random input random output

Conditional expectation E of X given Y

Read it top-to-bottom: the box hosts the machines, the machines have distributions, distributions get summed into expectations, and conditioning + functions turn that expectation into the random object .


Equipment checklist

Cover the right-hand side and test yourself. If any answer surprises you, re-read that section before opening the parent note.

What is the sample space, in one phrase?
The set (box) of every outcome that could possibly happen; its total probability is .
What is a random variable?
A rule that pins a number onto every outcome — a "number machine" written with a capital letter.
Difference between and ?
is the random machine (output still uncertain); is one specific number it could output.
What does measure, as a picture?
The amount of sand (probability) on the region of the box where machine outputs exactly .
What does tell you to do?
March through every value , compute the expression, and add all the results.
Write the formula for and say what it is physically.
; the probability-weighted average, i.e. the balance point of the distribution.
What does the comma in mean?
"And" — both events happen for the same outcome (one cell of the grid).
What is marginalising, and what does equal?
Summing a variable away; it collapses the joint to .
What does the bar "" mean, and why divide by ?
"Given"; you delete outcomes where , then divide to re-scale the survivors so they sum to .
Why is (capital ) a random variable?
It is a function fed a random input , so its output is random too.

Connections