Learn / Library / Expected value
Records in a shuffled list
The numbers to are placed in a uniformly random order. An entry is a record if it is larger than every entry before it (the first entry counts). What is the expected number of records?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Each position is a record with a probability that depends only on its place.
Solution
- Entry number is the largest among the first entries with probability .
- By linearity the expectation is the sum of these probabilities.
- It equals .
Answer: