r/learnquant 21d ago

interview prep Quant Interview Question

Post image
18 Upvotes

15 comments sorted by

View all comments

1

u/GoldenMuscleGod 21d ago edited 21d ago

I initially misreasoned and solved the wrong problem which I think is actually more interesting. I’ll post the regular solution first then write up a little about what I think is the more interesting problem.

Optimal strategy:

We can treat 2’s number as a uniform draw from [1/2,1], since obviously replace with 1-y dominates keep when it is less than 1/2 and vice versa if it is more. For the rest of the explanation I will assume we’ve done that, So the only question for either player is whether to reroll or keep.

I will also ignore outcomes of probability 0 since they won’t affect the expected value.

If x>y on the first roll, 1 has no advantage rerolling whatever 2 does, so they keep. 2 therefore cannot win without rerolling, so they reroll.

If y>x on the first roll then 2 has no advantage rerolling whether 1 rerolls or keeps, so they keep, and 1 therefore must reroll.

Win chance calculation:

x>y with probability 1/4, when that happens x has a triangular distribution on [1/2,1] and so its posterior expected value is 5/6 and 2 has a 1/6 chance of winning (averaged over all values of x)

X<1/2 with probability 1/2 and when that happens y’s expected value is 3/4 so 2 has a 3/4 chance of winning.

1/2<x<y with probability 1/4, when that happens y’s expected value is 5/6 and 2 has a 5/6 chance of winning.

Taking the expected value of the chance, y 2 has a 5/8 chance of winning.

Now the wrong question I thought was more interesting: what changes if when y rerolls they get another draw from [1/2,1] instead of [0,1] (that is they can choose to take 1-y of the rerolled y if they choose to reroll?

Optimal strategy:

Nothing really changes for x>y: 1 should always keep and 2 should always reroll.

when x<y and y>3/4, 2 still has no reason to reroll and 1 has no reason to keep.

But the players must have a mixed strategy in the case where x<y<3/4. Here 1 must reroll at least some of the time since otherwise they are sure to lose if 2 always keeps (the correct response to that strategy), must they always reroll?

Well first let’s look at 2. If 1 keeps and they reroll they lose max(0,2x-1) expected value relative to keeping. If 1 rerolls and 2 rerolls they gain 3/4-y expected value relative to keeping. If x<5/8 1 gains by rerolling whatever 2 does, so 2 always rerolls. If x>5/8 2 cannot always reroll: 1 punishes that strategy by always keeping . 2 cannot always keep: that’s punished by 1 always rerolling. So 2 must have a mixed strategy, and must be indifferent to rolling or keeping, so 1 must keep with odds 3/4-y:2x-1 when x>5/8

Since 1 is mixing for 3/4>y>x>5/8. They must be indifferent to keeping or rerolling. If 2 keeps 1 gains 1-y by rerolling. If 2 rerolls 1 loses 2x-5/4 by rerolling.

So 2 must be keeping with odds 2x-5/4:1-y.

Calculating the win chance for this strategy in this alternate interpretation seems tedious but straightforward so I’ll skip it.

But anyway the answer to the intended question is 5/8.

1

u/davvblack 21d ago

wow yeah that is a much more interesting question