Indicator random variables: choose the indexing first
Replace 'how many of these happen' with a sum of 0/1 indicators, then use linearity. Half the expectation tricks in finance interviews are exactly this.
Method · Indicator Random Variables
Intro
Linearity of expectation is the rule; indicator random variables are how you cash it in. The art isn’t in applying linearity — that’s automatic. The art is in choosing what to index over so that one marginal probability is a one-line calculation. The same count can almost always be written as a sum over trials or as a sum over the things being counted (values, types, pairs, colors). The second choice usually wins. When the question contains the words “distinct,” “at least one,” “some,” or “how many different,” that’s your cue to index by the value space, not by the trial.
β Intro Β· expand
Try first (productive failure)
Before the worked example: spend 60 seconds taking your best shot at this.
A guess is fine β being briefly wrong about a problem makes the explanation
land harder when you read it. This appears once per tutorial; skip
if you already know the trick.
60s
β Try first Β· expand
Worked example
Roll 5 fair six-sided dice. What is the expected number of distinct values that appear among the 5 dice? (E.g., the roll $(2, 5, 2, 6, 5)$ shows 3 distinct values.) Give the answer as a decimal to 3 places.
β Worked example Β· expand
Practice 1 of 3Type a fraction, decimal, or expression β mathjs parses it.
β Practice Β· expand
Reflection
What feature of a problem statement tells you to index by the <em>value space</em> rather than by the <em>trial</em>? And why does indexing by trial tend to introduce dependencies that make the marginal $P(X_i = 1)$ harder to compute — even though linearity itself doesn’t care?