Expected Number of Records
You observe a sequence that is a uniformly random permutation of .
Element is called a record (or left-to-right maximum) if for all .
What is the expected number of records?
Answer: Expected Number of Records
Key Idea: Linearity of expectation + symmetry Difficulty: 2/5
Step-by-Step Solution
Step 1: Reframe using indicator variables
Instead of thinking about the total count directly, define:
Then the total number of records is:
By linearity of expectation:
This is the trick — we reduced the problem to computing one simple probability at each position.
Step 2: Compute the probability at position k
Position is a record if is larger than everything before it — i.e., is the maximum of .
Key symmetry argument: Among the first elements, all orderings are equally likely. So each of the elements is equally likely to be the largest.
Therefore:
- Position 1 is always a record (trivially the max of itself):
- Position 2 is a record if :
- Position 3 is a record if is the max of the first 3:
- ... and so on.
Step 3: Sum up
This is the harmonic number .
What does this mean concretely?
For (a deck of cards), the expected number of records is .
As grows large, , so even in a permutation of a million elements, you only expect about records.
Why linearity of expectation is so powerful here
The events "", "", etc. are not independent — whether position 3 is a record depends on positions 1 and 2. Normally this would make computing complicated.
But linearity of expectation holds regardless of independence. You never need to worry about how the 's interact — just compute each on its own.