Expected Turns To Find a Taller Guy
An interesting quant puzzle asked in an internship interview at HRT - Singapore
Choose a person randomly on the street 𝑋. Let 𝑁 denote the random variable representing the number of people that you select randomly from the street before you find someone who's taller than 𝑋. What is 𝐸[𝑁]?
Try to solve this problem yourself before moving on to the solution below
.
.
.
.
.
.
Solution
The answer might surprise you so pay attention.
Assume that heights have a PDF 𝑓 and CDF 𝐹.
Given that the height of the first person is 𝑥0, using the CDF - we will get the probability of each other person (assuming iid) to be shorter is than x0. This will be a constant, let’s call it y = F(x0). Hence probability of each other person taller than x0 = 1-y
The number of people that should be measured before we find someone taller is geometric, so
𝐸( 𝑁 | 𝑋=𝑥0 ) = 1 /(1−y)
Using Law of Total Expectation, we get 𝐸(𝑁) = 𝐸( 𝐸(𝑁|𝑋) )
Therefore we get E(N) = E(E(N|X)) = ∞
Note that the limits will be reduced to (0,∞) as we assume the height X to be positive number.
To put it another way, suppose X has a uniform distribution over (0,1). The calculation is similar to the previous one, but using simpler functions, and the outcome is identical. This assumption is "allowed" because there is no assumption about the distribution of X in the question, therefore we can assume that it should not matter, and in this case - we can test a basic distribution to acquire intuition.
😃 Over to you: Were you able to solve this?
👉 If you liked this post, don’t forget to leave a like ❤️. It helps more people discover this newsletter on Substack and tells us that you appreciate solving these weekly questions. The button is located towards the bottom of this email.
👉 If you love reading this newsletter, feel free to share it with friends!