← Jane Street Interview Insights

Jane Street·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Jane Street Data Scientist interview with a tricky probability/optimization puzzle about a two-box money game. Pure math, no behavioral fluff, exactly what you'd expect from them.

Questions Asked (1)

Q1

You have two opaque boxes, both starting empty, and 100 turns. Each turn you either Place (a third party adds $1 to a randomly chosen box) or Take (a randomly chosen box is emptied and you collect its contents). You get no feedback during the game. What is the optimal strategy and what is the exact expected payoff?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This wrecked me for a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the problem as a Markov decision process where the state is the number of turns remaining and the current contents of the boxes (which are unknown but symmetric). Use dynamic programming to compute the optimal action for each state, exploiting symmetry to reduce the state space. Then derive the exact expected payoff by solving the resulting recurrence relations, likely yielding a simple threshold strategy.

Pro tip: Emphasize that the optimal strategy is a threshold policy: Place until a certain turn, then Take. This shows you can simplify complex problems into actionable rules, a key skill for data scientists at Jane Street.

1. Understand the problem and define state

Recognize that the game is symmetric and the only relevant information is the number of turns remaining and the total amount of money in the boxes (since you don't know the distribution). Define the state as (t, m) where t is turns left and m is total money in both boxes.

2. Formulate Bellman equations

Write the dynamic programming recurrence for the value function V(t, m) representing the maximum expected payoff from state (t, m). For Place, the expected value is V(t-1, m+1); for Take, it is the expected value of taking a random box, which depends on the unknown distribution of money between boxes.

3. Exploit symmetry and simplify

Argue that by symmetry, the expected amount in each box is m/2. Thus, taking yields m/2 plus the continuation value with the taken box emptied and the other box retaining its expected value. This leads to a recurrence that can be solved.

4. Solve the recurrence and identify optimal policy

Solve the recurrence to find that the optimal strategy is to Place for the first k turns and then Take for the remaining 100-k turns. Determine k by comparing the marginal benefit of placing versus taking.

5. Compute exact expected payoff

Using the optimal k, compute the exact expected payoff by summing the expected values from each Take action. The result should be a closed-form expression, likely involving harmonic numbers or a simple fraction.

Key Points to Mention

  • Symmetry of the boxes and the unknown distribution of money
  • Dynamic programming and Bellman equations for optimal decision making
  • Threshold strategy: Place for a certain number of turns, then Take
  • Expected value calculations and linearity of expectation
  • The role of risk neutrality and maximizing expected payoff
  • Comparison with alternative strategies (e.g., always Place, always Take) to validate optimality

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.