Quoto

Learn / Library / Expected value

Peaks in a random line

Expected valueHard

Balls numbered to are placed in a row in a uniformly random order. A ball in one of positions to is a peak if its number is larger than the numbers of both neighbours. What is the expected number of peaks? Give a fraction a/b in lowest terms.

Checking an answer needs JavaScript. The hint and the solution open without it.

A whole number, a decimal, a fraction like 3/8 or a percent.

Hint

For one interior position, look only at the relative order of the balls in positions i−, i and i+.

Solution
  1. Take an interior position and its neighbours. These balls are equally likely to be in any relative order.
  2. The middle position is a peak exactly when the largest of the balls is in the middle, which has probability .
  3. There are interior positions, from to .
  4. By linearity the expectation is .

Answer: