Skip to main content

TL;DR

Indicator Variables: Turn complex counting into simple sums by assigning 0/1 random variables to events. This concept is essential for quantitative trading interviews and is frequently tested at top firms.

By Valenke Exam Prep Team·Last updated 2026-06-01
Probability

Indicator Variables

Turn complex counting into simple sums by assigning 0/1 random variables to events.

An indicator variable (or indicator random variable) is a random variable that equals 1 when an event occurs and 0 otherwise: 1A={1if event A occurs0otherwise\mathbf{1}_A = \begin{cases} 1 & \text{if event } A \text{ occurs} \\ 0 & \text{otherwise} \end{cases} The key insight: The expected value of an indicator is just the probability of the event: E[1A]=P(A)E[\mathbf{1}_A] = P(A). Do you see why? It is 1P(A)+0P(Ac)=P(A)1 \cdot P(A) + 0 \cdot P(A^c) = P(A). Concrete example: How many fixed points does a random permutation of nn elements have on average? Define Xi=1{element i is fixed}X_i = \mathbf{1}\{\text{element } i \text{ is fixed}\}. Then the total number of fixed points is X=X1+X2++XnX = X_1 + X_2 + \cdots + X_n. By linearity of expectation: E[X]=i=1nE[Xi]=i=1n1n=1E[X] = \sum_{i=1}^n E[X_i] = \sum_{i=1}^n \frac{1}{n} = 1 Observe that we never needed the XiX_i to be independent — linearity of expectation works regardless. When to use: Whenever a problem asks "how many objects satisfy some property on average," decompose into indicators. This is the go-to technique for expected value problems involving counts — random permutations, hash collisions, coupon collector variants, and graph properties. Power move: For variance, note 1A2=1A\mathbf{1}_A^2 = \mathbf{1}_A, so Var(1A)=P(A)(1P(A))\text{Var}(\mathbf{1}_A) = P(A)(1-P(A)). For sums of indicators, you need covariance terms: Var(Xi)=Var(Xi)+2i<jCov(Xi,Xj)\text{Var}(\sum X_i) = \sum \text{Var}(X_i) + 2\sum_{i<j} \text{Cov}(X_i, X_j).

Ready to practice for the Valenke Finance Exam?

Adaptive practice powered by Item Response Theory targets your weak areas. Start with 3 free sessions.

Start free practice →