Indicator Variables
Write a count as a sum of 0/1 variables, then add their probabilities.
What is it?
An indicator equals 1 when event happens and 0 otherwise, so . A count is a sum of indicators.
Why is it useful?
It turns hard expected-count questions into a sum of easy single-event probabilities, even when the events are dependent.
When should you think of it?
Use it whenever you need the expected number of something: fixed points, runs, empty boxes, matches, records.
Think of this method when…
- The question asks for an expected number or count
- The count can be split into many small yes/no events
- Events are dependent, making the full distribution messy
- Symmetry means each indicator has the same probability
Core idea
Write . Then by linearity, with no independence needed.
Step-by-step playbook
- 1Define what one "unit" of the count is.
- 2Create one indicator per possible unit.
- 3Compute the probability of a single indicator.
- 4Sum the probabilities (often by symmetry).
Worked example
Worked example
10 balls are thrown independently and uniformly into 5 boxes. What is the expected number of empty boxes?
- 1
Let if box is empty. A box is empty when all 10 balls miss it: .
- 2
Sum over 5 boxes.
- Answer:
Common mistakes
- Trying to find the full distribution when only the mean is asked.
- Thinking dependent indicators cannot be summed — linearity always works.
- Using indicators for variance without the covariance terms.
Would you use this method?
A random permutation of items: what is the expected number of fixed points?
Practice this method
18 QuantSolve questions are tagged with this method.
Practice this method