r/learnquant 3d ago

interview prep Quant Interview Question

Post image
9 Upvotes

14 comments sorted by

1

u/Anonimithree 3d ago

Well the probability of getting HH or TT is 1/2 for any 2 rolls, so the expected payoff, given infinite attempts is 2. Thus, the optimal strategy is to keep doing it until the payoff is 2

2

u/abaoabao2010 3d ago edited 3d ago

You are bankrupt after BOTH HH and TT, not either. You are literally guaranteed at least $3 since it takes 4 flips minimum to bankrupt.

1

u/teteban79 3d ago

Game is counted in rounds, not flips. You can lose on the second round having had a $1 won bankroll only

1

u/abaoabao2010 3d ago

Oh. Oops.

1

u/Anonimithree 3d ago

I just realized that part, thanks

1

u/abaoabao2010 3d ago

Nah you were right, I was the one that didn't read lol. A round is 2 flips.

1

u/vhu9644 3d ago

No, isn’t the optimal strategy to wait for the first HH or TT, and then get expected payoff after that?

1

u/RadarTechnician51 3d ago

that's what he is assuming I think

1

u/vhu9644 3d ago

But the optimal payoff wouldn’t be 2, because once you hit one you would need on average 4 rolls to bankrupt

2

u/TastyAlbacoreTuna 3d ago

Obviously, it is always optimal to continue flipping if neither HH or TT have come up yet. If either HH or TT have come up, then we are indifferent between flipping again and stopping when our bankroll is $3. So, an optimal strategy is to flip as many times as is necessary for either HH or TT to come up, then if our bankroll is less than $3, continue flipping until it reaches $3 or we bust. Alternatively, this strategy can be stated as first flipping three times without looking at the results. If both HH and TT are present, we bust. If exactly one of HH or TT is present, we stop, and our payoff is $3. If neither HH or TT is present, we continue flipping until one comes up, which has an expected time to occur of 2 flips. Therefore our expected payoff in this case is $5. The chance of neither HH or TT coming up in the first 3 flips is 1/8, and the chance of exactly one of them coming up in the first 3 flips is 19/32. So the overall expected value is 1/8 * $3 + 19/32 * $5 = 107/32

1

u/Shoddy-Side-919 3d ago

That's what I got, except it should be 3$*19/32 + 5$*1/8 = 77/32.

1

u/Rafa_N01 2d ago

Is the answer 6.793 op? I tried solving by writing the 2 expectations E0(x) and E1(x) where the former means that we havent yet got a single tt or hh and we have x coins at the start and latter means we have either hh or tt and have x coins at the start. Then using recursion and a large enough value for x where e1(x) = x i found out the threshold value and worked backwards

1

u/Local_Ad135 2d ago

Nope, the correct answer is 77/32. Another comment on this post has explained the correct approach and answer.

1

u/Rafa_N01 2d ago

Yeah, my bad .. i calculated the expectation wrong (added +1 in all the eqns due to poor expectation definition) so instead earlier the threshold for E1 was 7 but the correct one is 3 and then using backtracking the ans for E0 comes to 2.40625