LibraryQuant puzzles
This is a trading-interview classic, and everything it needs was built in Level 0.
We roll one ordinary six-sided die and are paid as many dollars as it shows.
Work it on paper before reading on. A list of six lines is all it takes.
Price the plain game first. Then, with a first roll showing, ask what is actually given up by throwing it away.
A choice is priced by comparing what we hold with what the alternative is worth on average, and the alternative here is a game we have already priced. The common wrong answers either forget the choice or forget the rolls that got thrown away.
Each of the six faces is equally likely. Over 600 goes each face turns up about 100 times, so the payments add to about 100 times 21, which is 2100 dollars across 600 goes. That is 3.5 dollars a go. It is the average of 1, 2, 3, 4, 5 and 6, which is something called the Expected value of one roll: the average Outcome over many goes, and not a result any single roll can pay.
Here is the whole trick. If we throw the first roll away, what we get is a fresh roll of an ordinary die, and we have just priced that: 3.5 dollars on average. So once the first roll is showing, the decision is a comparison of two numbers. Is what we are holding worth more than 3.5?
Now list the six equally likely first rolls with what each one ends up worth:
| first roll | what we do | worth |
|---|---|---|
| 1 | roll again | 3.5 |
| 2 | roll again | 3.5 |
| 3 | roll again | 3.5 |
| 4 | keep | 4 |
| 5 | keep | 5 |
| 6 | keep | 6 |
The worth column adds to 25.5, and 25.5 over six lines is 4.25 dollars a go. The right to roll again is worth 0.75 dollars a go on top of the plain game.
Move it and the table says what the move costs. Keeping a 3 as well swaps a 3.5 for a 3 on that line, so the column adds to 25 and the game falls to about 4.17. Keeping only a 6 swaps a 4 and a 5 for two 3.5s, and the game falls to about 3.92. Never rolling again, or always rolling again, both give back the plain 3.5. Every other rule is worse than keeping 4, 5 and 6, because only that rule takes the larger of the two numbers on every line.
Quoting 5. The rolls we keep, 4, 5 and 6, average 5, and it is tempting to call that the answer. It forgets the three lines where we rolled again. Those happen half the time, and they are worth 3.5, not 5.
Quoting 3.5 again. The second roll really is worth 3.5 on average, the same as the first. But the game is not the second roll. The game is the choice, and the choice is what we are being asked to price.
Reading 4.25 as a promise. A single go pays a whole number from 1 to 6. It never pays 4.25 (it can't). The 4.25 describes many goes, and somebody allowed only one go may sensibly pay less than it. That is a question about how much uncertainty a person can sit through, not about arithmetic.
Cover the table and rebuild it. If the six lines come back with three 3.5s and then 4, 5 and 6, and they add to 25.5, it landed. Two slips are likely. Getting 25.5 but dividing by 3 gives 8.5, larger than anything the die can pay, which is the sign that the lines were counted wrong: there are six. Keeping a 3 and getting about 4.17 means the comparison was made against the wrong number: the bar is what a fresh roll is worth, 3.5, not the middle face.
The follow-up an interviewer usually asks next is two re-rolls instead of one. The last roll is worth 3.5, the stage before it is the 4.25 game we just priced, so on the first roll we keep only what beats 4.25: a 5 or a 6. The six lines then add to 28, and the game is worth about 4.67 dollars a go. Every step was the same comparison, run backwards from the end.
Level 1 opens with Five people, twelve months, no shared birth month, which counts chances the same way, one line at a time.
3.5 dollars a go for the plain game and 4.25 dollars a go with the re-roll. Keep a first roll of 4, 5 or 6 and roll again on 1, 2 or 3, because a fresh roll is worth 3.5 on average.
Thuztra Learn teaches the maths of quant finance from zero, in short lessons, for readers who are unsure of it. Three questions in the app build your quant roadmap, free. Membership is a paid subscription. See what Thuztra Learn is and what it costs, or see the whole Core quant curriculum.
Get the app and answer the three questions:
Download on the Microsoft Store Download for Android