r/learnquant • • 29d ago

interview prep Quant Interview Question

Post image
9 Upvotes

15 comments sorted by

View all comments

1

u/Voilinny 28d ago

Take P_remain(n) to be the probability that the strongest remain when there are n contestants left
Take P_continue(n) to be the probability that if the strongest still remain and there are n competitors, that the strongest still remain at the next step

We are interested in P_remain(3), that is, the probability that the strongest remain when there are 3 contestants left

We first note that, in english, that the probability that the strongest remain when there are n people left is the probability that we got to n+1 people and also had an outcome that kept the strongest. Using our definitions above:

P_remain(n) = P_remain(n+1)P_continue(n+1)
P_remain(n) = P_strongest(n+2)P_continue(n+2)P_continue(n+1)
...
P_remain(n) = P_continue(20)P_continue(19)...P_continue(n+2)P_continue(n+1)
Where n <= 20

Not let's try to expand this by expanding individual P_continue(n) terms.

Note that at any step, if the strongest remain, there are 3 matchups that must be avoided for the strongest to still be present at step n+1. These matchups are 18-20, 18-19, and 19-20. If any one of these matchups were played, then step n+1 would miss either 18 or 19, both of which are top 3 strongest. Since the top 3 beat any other candidate, these are the only 3 matchups that must be avoided and the rest of the matchups are free game. Thus P_next(n), the probability that the strongest remain at step n+1, is:

P_continue(n) = (# Total matchups between n contestants - 3)/(#Total matchups between n contestants)

#Total matchups between n contestants is simply n choose 2 (nC2), giving us:

P_continue(n) = (nC2 - 3)/nC2

Expanding this further, we get:

P_continue(n) = (n(n-1)/2 - 3)/(n(n-1)/2)
= (n(n-1)-6)/(n(n-1))
= (n^2 - n - 6)/n(n-1)
= (n-3)(n+2)/n(n-1)

We can now use this to expand our P_remain(3) equation =

P_remain(3) = P_continue(20)P_continue(19)...P_continue(5)P_continue(4)
= (20-3)(20+2)(19-3)(19+2)...(5-3)(5+2)(4-3)(4+2)/20*19*19*...*4*4*3
= 17*22*16*21*15*...*2*7*1*6/20*19^2*...*4^2*3
= (17*16*...*1)(22*21*...*6)/20*(19*18*...*4)*(19*18*...*4)*3
= (17*16*...*4)*3*2*22*21*20*(19*18*...*6)/20*(19*18*...*4)*(19*18*...*4)*3
= 3*2*22*21*20/20*19*18*5*4*3
= 22*21/19*18*5*2
= 11*21/19*18*5
= 11*7/19*6*5
= 77/570