Expected number of peaks in a random permutation
This is an easy probability question that tests your ability to apply linearity of expectation to count structural properties of random permutations. It is a classic warm-up in quant interview loops because it rewards clean reasoning over computation.
The key insight is to define an indicator random variable for each potential peak position, then use linearity of expectation to sum them. You will need to reason about the probability that a single interior position forms a peak, and whether that probability depends on the position or the permutation length. Most candidates find the answer by recognizing a symmetry argument and a simple conditional-probability calculation.
- Indicator random variables and linearity of expectation
- Symmetry and exchangeability in permutations
- Local properties of random orderings