EV of Local Maxima
Problem tags: Medium, Probability
5 balls labeled 1-5 are placed in a line at random. A number is a local maxima if it is greater than the number before and after it. Find the expected number of local maxima in the sequence.
For example: in 42531, we have 2 local maxima in this sequence at the first and third spots.



