Expectation Without Distributions
with NO independence assumption. Write a count as a sum of indicators, and expectation becomes a sum of probabilities.
Expected fixed points of a random permutation: . Expected number of adjacent equal letters, expected number of records in a random sequence (), expected inversions () — all indicator sums. The distribution may be a nightmare; the expectation is a one-liner. Coupon collector: waits are geometric with expectations , summing to ( for ).
Probability favorable measure total measure; expectations become integrals. A walk returns to after steps with probability .
Two uniform points on : , , (unit-square pictures). Broken-stick triangle: . Buffon's needle: . Random walk returns: after four steps; the decay is why and the 1D walk is recurrent, while in 3D it is not.
For expected times and absorption probabilities, condition on the first step: — a small linear system.
Expected rolls until two consecutive sixes: . Expected steps for a walker advancing with probability else staying, to go steps: . Gambler's ruin from with target (fair coin): ruin probability , expected duration . Markov-chain steady states (the Linear Algebra course) are the long-run version of the same conditioning.
Indicators handle dependence for expectations, but NOT for variances: . Putnam problems that ask for a variance or a probability of a specific count usually intend inclusion–exclusion or a generating function, not linearity.
A fair coin is flipped times. What is the expected number of times a head is immediately followed by a tail?
Nine adjacent pairs, each HT with probability : expectation . The pairs overlap and are dependent — linearity does not care.
Proofs & Why It Matters
for ANY random variables with finite expectations.
For discrete variables, — the joint distribution marginalizes, and no independence was used. Significance: the ENTIRE indicator method rests on this; it is worth stating in a solution that independence is not required, because graders check that you know.
Collecting all equally likely coupons takes draws on average.
After distinct coupons are held, each draw is new with probability , independently of the past; the number of draws until the next new one is geometric with mean . Sum over (linearity): . Significance: is the universal cost of "cover everything by random sampling" — hashing, epidemic spreading, and randomized algorithms all hit this bound.
Going Deeper: Worked Problems
Three numbers are chosen independently and uniformly from . Find the expected value of the largest.
Step 1 — the CDF of the max: .
Step 2 — for a nonnegative variable, .
Step 3 — general pattern: and ; the order statistics split into pieces of equal expected length.
Step 4 — the tail-integral formula is the fastest route to expectations of maxima, minima, and waiting times.
A fair-coin gambler starts with and stops at or . Find the probability of reaching and the expected number of bets.
Step 1 — let be the probability of reaching from : , , . The recurrence forces linear: , so .
Step 2 — let be the expected duration: with ; the particular solution of the constant inhomogeneity is , so and .
Step 3 — sanity: from the midpoint is the longest expected game; near the boundaries games end fast.
Step 4 — conditioning on one step turned a random process into two linear recurrences — the whole method.