Career: Would you be able to pass a quant interview?
How far do you have to go to compete against a mediocre quant team? Let's look at a Citadel interview question
Table of contents:
Introduction.
How to face this type of problems?
Probability basics.
Random variables and expected value.
Fair games in probability.
Sequential games in probability.
Clarifying possible strategies.
First-principles approach to expected value.
What is the expected number of opens?
Solution for the fair cost.
Introduction
You're in an interview for Citadel, one of the largest funds in the world. Your hands are sweating, your mouth is dry, and you're moving like a headless chicken.
They're going to give you a short test to filter out undesirable candidates. You're scared, you're nervous, and yet you're telling yourself positive messages like "You can do it, you can do it, come on...!"
It's going to be a short 40-question test, and it will take just under an hour to answer them.
Here's the first one:
It's been 45 minutes... it wasn't as hard as it seemed, right!? Or was it!? ๐ฝ
The box game puzzle asks:
Given four sealed boxes with exactly one box containing ยฃ100, and a fee X for each box you open, what is the value of X that makes this a fair game (i.e., the expected net gain is zero)?
Despite its surface simplicity, the puzzle touches upon core ideas in probability and decision theory, such as the relationship between information gainedโlearning which box is emptyโand the reduction in uncertainty about the prizeโs location. From a broader standpoint, this problem connects to:
Expected value: A fundamental concept in probability theory that helps quantify the average outcome of a random process over many trials.
Decision theory: Particularly, sequential decision making under uncertainty. Once a box is opened and found empty, the decision maker updates their knowledge about the location of the prize.
Fair games: In gambling or finance, a fair game is one in which the expected net outcome is zero. Any difference from zero implies a systematic advantageโpositive EVโor disadvantageโnegative EV.
In a single round, the chance of success is 1/4. If that fails, the next attempt has probability 1/3 of success, and so on, until eventually, if all else fails, the final box is guaranteed to have the money. Understanding how these probabilities aggregateโand how the cost accumulatesโlies at the heart of the puzzle.
How to face this type of problems?
Before diving into it, it is worth ensuring we have a firm grasp of fundamental probability concepts. While many readers will be familiar with these, stating them explicitly helps unify our language and clarifies each building block of the argument.
Probability basics
In the context of this puzzle:
Sample space: The set of all possible outcomes of an experiment. Here, the sample space for Which box has the ยฃ100? has 4 equally likely possibilities.
Event: A subset of the sample space. For instance, the event Box #1 has the ยฃ100 is one possible outcome with probability 1/4.
Conditional probability: Once we open a box and see it is empty, the probabilities of the remaining boxes containing the ยฃ100 must be updated accordingly.
If you want to continue discovering more about this staff, donโt miss this section:
Random variables and expected value
A random variable is a function that assigns numerical values to outcomes. In the Box Game, we have two primary random variables:
W: The total winnings from the game. If you find the ยฃ100, W=100W = 100W=100; if, hypothetically, the money is never foundโnot really possible here if you keep opening boxesโit would be 0, but in practice you will always eventually find the ยฃ100 if you choose to continue.
C: The total cost you pay to open boxes. Each time you open a box, you pay X. If you open boxes nnn times, your total cost is nรX.
The expected value of a random variable Z is the average of Z over the probability distribution of all possible outcomes. Symbolically,
for discrete random variables, or an integral for continuous ones. In this puzzle, we deal with discrete random variables and finite sums.
Fair games in probability
A game is fair if the expected net outcome is zero. If G denotes the net gain/loss from the gameโthe total money you receive minus the total cost you payโthe fairness condition is:
When a puzzle asks, What cost X makes the game fair?, it is asking us to solve for X such that:
Sequential games in probability
This puzzle also exemplifies a sequential game, where the player makes decisions at each stepโopen a box or stop. After each step, the player gains informationโwhether that box was empty.
In an optimal play scenario, the player continues opening boxes until the ยฃ100 is foundโsince any rational player who has already paid for partial information is incentivized to keep going until they succeed.
Thus, from a purely logical standpoint, you would never stop early if you are playing for expected monetary valueโassuming risk neutrality. The cost accumulates with each opened box, but so does the probability that the next open yields the prize.
Clarifying possible strategies