Skip to content

Expected number of visible heads in a queue of 20

Question

Twenty people stand in a single-file line, their heights drawn i.i.d. from some continuous distribution. Looking from the front of the line, you can see a person's head exactly when they are taller than everyone standing in front of them. Let XX count the visible heads. Find E[X]E[X] to one decimal place.

Short answer

About 3.63.6. Write XX as a sum of indicators: the ii-th person is visible iff they are the tallest of the first ii, which has probability 1i\tfrac1i. By linearity, E[X]=H20=∑i=1201i≈3.598E[X]=H_{20}=\sum_{i=1}^{20}\tfrac1i\approx3.598.

Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question

Start with a free lesson: Expectation, Variance and Covariance is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.

Read it free