Jane Street interview question

The first player chose an integer between 1-30. The second player picks a different one. After that, a random integer (x) between 1-30 will be generated. The player whose number is closer to x get paid x dollars.

Interview Answers

Anonymous

26 Oct 2017

k is between 21 and 22. k^2 = 465

1

Anonymous

6 Oct 2024

Oldest anonymous answer incorrect because of the payoff is x, its linear, not constant. First person should choose x for second person indifferent to choosing x+1 and x-1, which means the payoff for second person (x+1+30)/2*(30-x)/30 = (1+x-1)/2*(x-1)/30. The positive solution is sqrt(465)=21.5.

1

Anonymous

27 Sept 2017

I assume you want a strategy for if you go first or second. We can show that if you go first, choosing 15 is the best option. Proof: If I go first and choose 15, Wlog (by symmetry), suppose player 2 chooses b 15, as I am nearer. Player two wins on all number less than b. And we win (or draw) with a 50% chance on numbers between b and 15. i.e P(I win) = 15 +0.5*(15-b). P(Player 2 wins) = b +0.5(15-b). As b < 15, we can see I have a higher probability of winning. From this, we can easily make a strategy for going second in the game. If I go second and player 1 chooses any number which isn't 15, I choose 15. If player 1 chooses 15, I don't play

1