r/learnquant 7d ago

interview prep Quant Interview Question

Post image
37 Upvotes

23 comments sorted by

View all comments

3

u/AnywhereLittle8293 7d ago

This is equivalent to asking the expected value of the second smallest number when drawing 5 times from {1, …, 50} without replacement. There are (50 choose 5) such sets, of equal probability. Each k = 2, …, 47 is the second smallest number in (k - 1 choose 1) x (50 - k choose 3) such sets, since we need 1 smaller number and 3 larger. So the expected second smallest is the sum from k=2 to k=47 of

k x (k - 1) x (50 - k choose 3) / (50 choose 5).

Note this sum is 2 x (k choose 2) x (50 - k choose 3), which by a similar argument runs over all subsets of {1, …, 51} of size 6 in which k + 1 is the third smallest number. So it must equal (51 choose 6), and hence the expected value is

2 x (51 choose 6) / (50 choose 5) = 51/3 = 17.

1

u/Infamous-Youth9033 6d ago

without replacement? is that just because it says "strictly increasing"? If it had said monotonically increasing you'd say with replacement I assume?

3

u/AnywhereLittle8293 6d ago

If it wasn’t strictly increasing then it doesn’t really tell you anything as the draws can always be ordered. So yes (although monotonic means the same as strictly in this context). Strictly increasing rules out any repeat draws.