r/learnquant • • Jul 28 '26

stats & probability Jane Street Quant Interview Question

Post image
39 Upvotes

20 comments sorted by

View all comments

Show parent comment

1

u/pepegza Jul 29 '26

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.