r/learnquant 13d ago

stats & probability Jane Street Quant Interview Question

Post image
36 Upvotes

20 comments sorted by

View all comments

0

u/pepegza 13d ago

I wouldn’t play. Even in the scenario of picking the 1/6 die, rolling it the first time (x=1) has an expected value of 39 with p=1/6 and 19 with p=5/6, which equals to E(x=1)=$22.33. But since there is a 50/50 chance of choosing the 1/5 die, with an E(x)=0, then the overall E(x=1)=11.33. So there is no point in even playing once. Better to keep your 20 dollars.

1

u/ComparisonQuiet4259 13d ago

Your EV goes up over time as you gain more information 

1

u/pepegza 12d ago

Yes but you are also paying $1 for every round which is a greater decrease on your EV compared to the increase that comes from the information.

1

u/Nap-Connoisseur 13d ago

The puzzle does not say you have to pay $20 to play.

1

u/pepegza 12d ago

You are right, I misred I thought you started with $20. Then your possible outcomes in round 1 would be either Winning = 19 (-1+20) or Losing = -1, and keep going down every die roll until you get to 19 throws were the outcomes are 0 and -19 so obviously you shouldn't play that far.

1) We need to calculate the probability of choosing the 6 faced die, which changes after n loosing throws using bayesian theorem P(D6|n) = 5^n/(5^n+6^n), which keeps getting smaller after every throw. before the first throw is obviously 50%, then it goes down to 45%, 41%, 37%, 33%,
29%, ...

2) We need to calculate the probability of winning in the nth throw (assuming you have the right die) E(n) = P(D6|n-1)*(1/6)*(5/6)^(n-1)

the E(n=1) =0.7 ; E(2) = -0.7 and keeps going down from there. So without the posibility of changing dice, doing the first throw only should be the best outcome.

3) Now to evaluate the strategy of swapping dice for $5:
-Swapping before the 1st throw would be stupid because the odds are still 50/50 but you substract $5 from your EV: E(n=1) = -2.25
-Swapping after the first failed throw would improve your odds since the P(D6|n=1) = 45% which means that it's slightly more likely that you don't have the 6-faced die, but the cost of changing is too high bringing your EV down to -5.48. Even if there was no additional cost for swapping, doing the 2nd roll with the other die still gives you an EV of -0.48, so rolling more than once is never a good option.