Solution

Peaks in a Permutation

Show the problem again

The numbers 1, 2, ..., 10 are placed in a row in uniformly random order. A position is a peak if its number is larger than the number in each adjacent position. The two end positions have only one neighbour, so an end position is a peak if it exceeds that single neighbour. What is the expected number of peaks? Give a reduced fraction (a decimal rounded to two places is also accepted).

Worked solution

The answer is 11/3, about 3.67. Use one indicator per position. An interior position is a peak when it holds the largest of three specific numbers (itself and its two neighbours); by symmetry each of the three is equally likely to be largest, so the probability is 1/3. An end position is a peak when it beats its single neighbour, probability 1/2. There are 8 interior positions and 2 ends, so the expected number of peaks is 8 × 1/3 + 2 × 1/2 = 8/3 + 1 = 11/3. The overlap between neighbouring windows makes the indicators dependent, which linearity ignores.

Source: Standard indicator-variable exercise on permutations; no single originator. Statement written for AxiomIQ.