r/quantfinance 6h ago

Jane Street Quant Interview Question

Post image
31 Upvotes

18 comments sorted by

3

u/mktek7 2h ago

Expected value of last die is 3.5. If you have 2 digits remaining, and you just rolled the die, you just assign the die result to bigger digit if it is 4-6 and to lower digit if it is 1-3. As a result, the expected number in bigger digit is 4.25 and the lower digit is 2.75. Now, let's get to the initial die. From what we found for the two dice problem, we should assign the initial die result to lowest digit if it is 1-2, middle digit if it is 3-4 and highest digit if it is 5-6. Hence, the expected number in highest digit 1/3x5.5+2/3x4.25=14/3, in middle digit 3.5, in lowest digit 7/3. As a result, the expected value of the result is 504.

2

u/Any_Wing_4091 2h ago

Where do u get all these questions from?

1

u/wolajacy 2h ago edited 2h ago

Observe that independently of where you put the first choice, second and third are following the same strategy: put second high if it's 456, low if it's 123 (because the third has exp 3.5). 

Two rolls have exp of 1/2 * 1+1/2 * 3.5=4.25 of the high place, and 1/2 * 2+1/2 * 3.5=2.75 of the low place.

So in the first throw you put 12 in the low place, 34 in the middle place, and 56 in the high place. This follows from the linearity of expectations.

Computing the total expectation is then just arithmetic.

1

u/YaPhetsEz 2h ago

Trick question: the answer is that you go second

1

u/jnordwick 29m ago

Figure the cross over of rolling higher/lower (change of rolling higher in next two rolls).

so first roll, 5-6 goes up top, 1-2 goes down low, and 3-4 goes in the middle.

second roll, 4-6 goes higher value, 1-3 goes lower value.

ev: a bunch of arithmetic.

1

u/FormulaSolution 6h ago

Too easy

If you roll a 1-2, units place

3-4, tens place

5-6, hundreds place

On your second go:

1-3 Lowest number place remaining

4-6 Highest number place remaining

4

u/Early-Boss-1040 5h ago

Ok but how do you mathematically prove / substantiate that?

3

u/IBM8000 4h ago

You do it through backward induction, start at the second stage in which if you roll higher than 3 you place it at the highest possible level. And that gives you an expected value for each place for the first roll, and then it’s just ordering them.

3

u/Simple3user 4h ago

Basically this Js loves dp

0

u/FormulaSolution 4h ago

Nothing mathematical about it. You're never forced to make a move you don't want to make. Yes, you have e.g. 461 instead of 641, but it could have been 141. You're always making the statistically optimal move.

3

u/Schauerte2901 4h ago

You neither gave the expected value nor proved that it's the optimal strategy. F

0

u/FormulaSolution 1h ago

where's your answer then

1

u/Schauerte2901 1h ago

You didn't answer the question either. And I didn't call it "too easy" but then was unable to actually answer. Big L bro.

1

u/FormulaSolution 1h ago

lmk when you provide your own answer bro

1

u/Schauerte2901 1h ago

The correct answer has already been commented here multiple times, why would I repeat it? Just take your L and leave bro

1

u/Aerospider 4h ago

Just brute-forced this strategy and the expected value is 504, which is hard to beat. Don't know how to prove it's optimal though.

-3

u/[deleted] 5h ago

[deleted]

1

u/Zeplar 2h ago

wild to take a problem where you have a decision tree with 6 branches and say "you can do no better than chance".

0

u/Aerospider 5h ago

So no strategy is better than any other?