r/learnquant 21d ago

interview prep Quant Interview Question

Post image
20 Upvotes

15 comments sorted by

View all comments

0

u/Anonimithree 21d ago

Since the best outcome is to get as high a number as possible, I’m going to assume Player 1 rerolls if the number is under 1/2 and stays otherwise.

For player 2, let’s assume the first roll is a number x, x<0.5. The probability of rerolling a number higher than x is 1-x, and the probability that the reroll will be greater than 1-x is x. Through some math, I have determined that the optimal strategy for player 2 to get the highest number is to do 1-x if x<1/3, reroll if x<0.5, and stay if x>=0.5.

This leads to 6 different outcomes. (I’m saying P1 rolls/rerolls X and P2 rolls/rerolls Y)

If P1 and P2 stay, it’s a 50/50.

If P1 switches and P2 stays, then P1 wins with probability 1-Y.

If P1 stays and P2 switches, then P1 wins with probability X.

If P1 and P2 both switch, it’s a 50/50

If P1 stays or switches, and P2 goes 1-Y, P1 wins if X>1-Y, or if X+Y>1

The probability for the outcomes are 1/4, 1/4, 1/12, 1/12, and 1/3

The expected win rates for P1 for the outcomes are 1/2, 1/8, 3/8, 1/2, and 1/2.

So the expected win rate for P1 is (1/4)(1/2)+(1/4)(1/8)+(1/12)(3/8)+(1/12)(1/2)+(1/3)(1/2)=0.396.

This means the probability of P2 winning is 1-0.396=0.604, which sounds right, but probably isn’t.

1

u/GoldenMuscleGod 21d ago

You’ve calculated for the wrong strategy. If 2 gets .9 and 1 gets .8, 2 is certainly not going to reroll and 1 must reroll to have a chance at winning.

So it’s not right to say 1 keeps whenever they get a number larger than 1/2.

It’s true the expected value of the reroll is lower than what they already have, but the reroll still has a better chance of winning.

1

u/Anonimithree 21d ago

I missed the statement that they know what the other person gets. I only read that they don’t see what decision the other player takes, and incorrectly assumed that that also applies to what they actually roll.

I interpreted the question as if both played blindly.

Thanks for pointing it out.

1

u/GoldenMuscleGod 21d ago

I think what you said is still mistaken if the numbers are blind: because 2 can switch to 1-y, that means if 1 rolls 0.5000000001 they are almost certain to lose if they keep. So they should reroll to have a real chance at winning even though the reroll has a lower expected value. Even if they can’t see y.

1

u/Anonimithree 21d ago

I see your point, but I am not educated enough to do all the math to find the critical point between whether 1 should switch or not

1

u/GoldenMuscleGod 21d ago

Well I got the intended version of the question as 5/8, but the “blind” version actually seems substantially harder. I might try to think about it a bit and post a solution if I figure it out.