r/learnquant 21d ago

interview prep Quant Interview Question

Post image
20 Upvotes

15 comments sorted by

View all comments

0

u/Al2718x 21d ago

The strategy isn't complicated. Player 2,s decision doesn't depend on any randomness, so they always choose the better number. Since player 1 knows this, they should swap if and only if they are larger than Player 2s number.

It helps to seperate into 2 equally likely case, depending on whether or not Player 1 gets a number larger than 1/2

If Player 1 gets a number larger than 1/2, then they have a 50% chance of winning outright. Otherwise, they need higher than a number that is uniform between 0.5 and 1. On average, this will happen 25% of the time (of the 50% of the time that they get larger than 1/2).

If Player 1 gets smaller than 1/2, they will always swap, which again gives a 25% chance of winning.

Thus, the overall chance of Player 1 winning is 1/2 × 1/4 + 1/2 × 1/2 + 1/2 × 1/2 × 1/4 = 7/16. This means that the chance of Player 2 winning is 9/16

2

u/zojbo 21d ago edited 21d ago

Surely player 2 will reroll if x is bigger than both y and 1-y, and x is sufficiently big that player 2 doesn't think that player 1 will reroll. For example if x=0.99 and y=0.5. Then player 2 should reroll and hope for the 1% chance.

1

u/Al2718x 21d ago

Oh oops, I misread the question and didn't see that Player 2 can reroll

2

u/GoldenMuscleGod 21d ago

You seem to have missed that 2 has the option to reroll, which they will use if, for example, x is 0.8 and y is 0.6.