Skip to content
  • Overview
  • Curriculum
    • FLUMental maths and numerical fluency
    • COMBCounting and combinatorics
    • PROBProbability
      • 1Conditioning and Bayes

        • Conditional probability and Bayes
      • 2Distributions

        • The distributions you have to know cold
      • 3Expectation, variance and the big tricks

        • Linearity of expectation
        • Conditioning: the tower property
        • Recursive expected value and the re-roll family
      • 4Random walks and Markov chains

        • Random walks and gambler’s ruin
        • Markov chains: states, transitions and hitting times
      • 5Order statistics and extremes

        • Order statistics: maxima, minima and the gaps between
      • 6Simulation and Monte Carlo

        • Simulation: making randomness you want out of randomness you have
    • GAMEGames, decision theory and puzzles
    • MMMarket making
    • MKTMarkets and products

Practise

  • Question bank
  • Mental arithmetic
  • Market simulator
  • Arbitrage trees
  • Horse racing
  • Bid book
  • Screening tests
  • Mock papers

Reference

  • Formula reference
  • Search

Your record

  • Review queue
  • Progress
  • Leaderboard
  • Profile
  • Invite friends
AccountSend feedback
  1. Curriculum
  2. /Trading and market making
  3. /Probability
  4. /Expectation, variance and the big tricks

Conditioning: the tower property

PROB · Chapter 3·11 min read·Asked at Jane Street, SIG, Citadel, Optiver

Assumes Linearity of expectation.

After this lesson you should be able to

  • Apply the law of total expectation by conditioning on the right variable.
  • Use the law of total variance and interpret both of its terms.
  • Recognise when conditioning is the technique a problem is built around.

When a quantity is hard to average directly, average it in two stages: first within each scenario, then across scenarios. Choosing what to condition on is the entire skill, and the usual right answer is "the first step", "the hidden parameter", or "which case we are in".

Equation 3.18

Law of total expectation

The inner expectation is a function of YYY, so it is itself a random variable. The outer expectation averages it over YYY.

E[X]=E[ E[X∣Y] ]\mathbb{E}[X] = \mathbb{E}\big[\,\mathbb{E}[X \mid Y]\,\big]E[X]=E[E[X∣Y]]
XXX
The quantity you want the average of.
YYY
What you condition on — the thing that, once known, makes XXX easy.

Equation 3.19

The form you will actually write

A weighted average of the conditional answers, weighted by how likely each case is.

E[X]=∑yPr⁡(Y=y) E[X∣Y=y]\mathbb{E}[X] = \sum_{y} \Pr(Y = y)\,\mathbb{E}[X \mid Y = y]E[X]=y∑​Pr(Y=y)E[X∣Y=y]

What conditioning buys you. It converts one hard problem into several easy ones plus some bookkeeping. If you cannot see the distribution of XXX, ask what single piece of information would make it obvious. Learning the first coin flip, the hidden bias, or which branch you took usually collapses the problem to something you can write down in a line.

Equation 3.20

Law of total variance

Total variability splits into the average spread inside each scenario, plus the spread of the scenario averages.

Var⁡(X)=E[Var⁡(X∣Y)]⏟within-group+Var⁡(E[X∣Y])⏟between-group\operatorname{Var}(X) = \underbrace{\mathbb{E}\big[\operatorname{Var}(X \mid Y)\big]}_{\text{within-group}} + \underbrace{\operatorname{Var}\big(\mathbb{E}[X \mid Y]\big)}_{\text{between-group}}Var(X)=within-groupE[Var(X∣Y)]​​+between-groupVar(E[X∣Y])​​

Proposition 3.21

Reading the two terms

The first term is the noise you would still face even if someone told you YYY. The second is the variability that knowing YYY would remove. So the second term is exactly the value of the information in YYY — which is why this decomposition shows up whenever a question is about how much an observation tells you.

Holds when

  • Both terms are non-negative, so conditioning can never increase the average conditional variance above the total.
  • If YYY determines XXX, the first term is zero and all variance is between-group.

Example 3.22

A coin of unknown bias

A coin is drawn at random from a bag: with probability 1/21/21/2 it is fair, and with probability 1/21/21/2 it lands heads with probability 0.80.80.8. You flip the chosen coin 101010 times. What are the mean and variance of the number of heads?

Show the worked solutionHide the worked solution

Worked solution

  1. Formula
    E[X]=E[E[X∣p]],Var⁡(X)=E[Var⁡(X∣p)]+Var⁡(E[X∣p])\mathbb{E}[X] = \mathbb{E}\big[\mathbb{E}[X \mid p]\big], \qquad \operatorname{Var}(X) = \mathbb{E}\big[\operatorname{Var}(X \mid p)\big] + \operatorname{Var}\big(\mathbb{E}[X \mid p]\big)E[X]=E[E[X∣p]],Var(X)=E[Var(X∣p)]+Var(E[X∣p])
  2. Substitute
    X∣p∼Binomial(10,p),p∈{0.5, 0.8} each with probability 12X \mid p \sim \mathrm{Binomial}(10, p), \qquad p \in \{0.5,\ 0.8\} \text{ each with probability } \tfrac{1}{2}X∣p∼Binomial(10,p),p∈{0.5, 0.8} each with probability 21​
  3. Solve
    E[X]=12(10)(0.5)+12(10)(0.8)=2.5+4=6.5\mathbb{E}[X] = \tfrac{1}{2}(10)(0.5) + \tfrac{1}{2}(10)(0.8) = 2.5 + 4 = 6.5E[X]=21​(10)(0.5)+21​(10)(0.8)=2.5+4=6.5
    Conditional means are 555 and 888; average them.
  4. E[Var⁡(X∣p)]=12(10)(0.5)(0.5)+12(10)(0.8)(0.2)=1.25+0.8=2.05\mathbb{E}\big[\operatorname{Var}(X \mid p)\big] = \tfrac{1}{2}(10)(0.5)(0.5) + \tfrac{1}{2}(10)(0.8)(0.2) = 1.25 + 0.8 = 2.05E[Var(X∣p)]=21​(10)(0.5)(0.5)+21​(10)(0.8)(0.2)=1.25+0.8=2.05
    Within-group: the binomial noise you face once the coin is known.
  5. Var⁡(E[X∣p])=Var⁡({5,8})=(8−52)2=2.25\operatorname{Var}\big(\mathbb{E}[X \mid p]\big) = \operatorname{Var}(\{5, 8\}) = \left(\tfrac{8-5}{2}\right)^{2} = 2.25Var(E[X∣p])=Var({5,8})=(28−5​)2=2.25
    Between-group: a two-point variable takes value 555 or 888 with equal probability, so its variance is the square of half the gap.
  6. Var⁡(X)=2.05+2.25=4.30\operatorname{Var}(X) = 2.05 + 2.25 = 4.30Var(X)=2.05+2.25=4.30
  7. Answer
    E[X]=6.5,Var⁡(X)=4.30\mathbb{E}[X] = 6.5, \qquad \operatorname{Var}(X) = 4.30E[X]=6.5,Var(X)=4.30

Sanity check. A single binomial with p=0.65p = 0.65p=0.65 would have variance 10(0.65)(0.35)=2.27510(0.65)(0.35) = 2.27510(0.65)(0.35)=2.275. The mixture is more variable, as it must be: not knowing which coin you hold adds uncertainty rather than removing it.

The rest of this lesson is in Premium

You have read the opening. 11 more sections follow, including 5 worked examples and 3 quick checks.

Start the free 7-day trialSign in

Nothing is charged for 7 days, and you can cancel before then. Or read Arithmetic that survives a clock in full, free.

← Linearity of expectationRecursive expected value and the re-roll family →
On this page
  • Law of total expectation
  • The form you will actually write
  • Law of total variance
  • Reading the two terms
  • Worked example — a coin of unknown bias

QuantMax · 141 lessons · 1342 questions · c5c0caa

  • Premium
  • Arbitrage trees
  • Horse racing
  • Invite friends
  • Account
  • About QuantMax
  • Terms
  • Privacy

Firm names identify publicly reported question patterns and nothing more. QuantMax is not affiliated with, endorsed by, or recruiting for any firm named in the curriculum. Everything you do in lessons and the question bank is kept to your account.