Quant puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 71
- Topics
- 12
- Hard
- 30
046I offer you an even-money bet on either of two events. Which is more likely: at least one six in four rolls of one die, or at least one double six in 24 rolls of a pair of dice? Which side do you take, and what is your edge per rupee?Quant tradingProp trading firms
Try it first
Which event is more likely?
Show the worked solution
At least one six in four rolls is more likely, 51.8% against 49.1%, so take that side. The chance of no six in four rolls is (5/6)^4 = 625/1296, and the chance of no double six in 24 rolls is (35/36)^24. At even money the six earns about 3.5 paise per rupee staked; the double six loses about 1.7 paise and needs 25 rolls to become favourable.
Why does the obvious 2/3 come out the same for both bets?
The old gamblers' shortcut, sometimes called the rule of proportion, says that if one try succeeds with chance p, then n tries succeed with chance n times p. Four rolls at 1/6 gives 4/6, and 24 rolls at 1/36 gives 24/36, the same 2/3. This puzzle is the one the Chevalier de Mere is said to have brought to Pascal, because his winnings disagreed with the shortcut. Adding chances only works for events that cannot happen together, and two sixes in four rolls can. The shortcut counts a hand with two sixes twice, and that is why it breaks down completely after seven rolls, where it would claim 7/6.
A family checking the weather forecast makes the same slip: three days at a 40% chance of rain do not make a 120% chance of a wet weekend. The right question is the chance that it stays dry on all three days, 0.6 cubed, about 22%, so rain on at least one day is about 78%.
At least one six in four rolls of a die happens 51.8% of the time and at least one double six in 24 rolls of two dice happens 49.1% of the time, so the first bet clears even money and the second does not, although the rule of proportion gives two thirds for both. How do you compute each chance in your head?
Go through the complement. At least one success is one minus the chance that every try fails, and independent failures multiply. No six in four rolls is (5/6)^4 = 625/1296, which is just under one half, so the six wins 671/1296, or 0.5177. For the double six, use the approximation that (1 - 1/36)^24 is close to e to the power -24/36, which is e^(-2/3), about 0.513; the exact figure is 0.5086, so the double six comes up only 0.4914 of the time.
The relationship5/6 the chance one roll is not a six 35/36 the chance one roll of two dice is not a double six e^{-24/36} the approximation (1 - 1/n)^m close to e^{-m/n} when 1/n is small What it says in wordsThe chance of at least one success is one minus the chance of failing every time.What edge does each side carry at even money?
At even money you win a rupee with probability p and lose a rupee otherwise, so the expected gain per rupee is p - (1 - p) = 2p - 1. The six gives 2 x 0.5177 - 1 = +0.0355, about 3.5 paise per rupee, while the double six gives -0.0172. That is a thin edge: over 100 bets of Rs 1 the expected profit is about Rs 3.55 with a standard deviation near Rs 10, so it takes thousands of bets before the edge shows reliably. The break-even for the double six is the smallest n with (35/36)^n below one half, which is 25 rolls, giving 0.5055. The limitation: the dice must be fair and independent; any bias in the dice swamps an edge this size.
Where candidates lose it
The common loss is multiplying tries by chance and declaring the two bets equal at 2/3. The interviewer is waiting to see whether you notice that the formula can exceed one, which proves it is wrong, and switch to the complement.
The second is getting the probabilities right and then picking a side without stating the edge. On a trading desk the question is not only which side but how much it is worth: about 3.5 paise per rupee for the six, and a loss of about 1.7 paise for the double six.
What the interviewer asks next
- How many rolls of three dice do you need before at least one triple six is better than even money?
- I offer you 11 to 10 on the double six in 24 rolls. Do you take it?
- How much of your bankroll would you stake per bet on the single six?
058A bet pays 2 to 1 and wins 40% of the time. What fraction of your bankroll does the Kelly criterion stake on each bet, what long-run growth rate does that give, and what happens if you bet twice that fraction?Quant tradingOptions market making
Try it first
At twice the Kelly stake, what happens to long-run growth?
Show the worked solution
Stake 10% of the bankroll; that grows wealth by about 0.97% a bet, and twice Kelly grows it by only about 0.07%. Kelly is edge over odds: (2 x 0.4 - 0.6)/2 = 0.1. The growth rate is 0.4 ln(1.2) + 0.6 ln(0.9). At 20% the losses compound away almost the whole edge, and above about 20.4% the bankroll shrinks in the long run despite a positive expected value.
Why not bet as much as possible on a good bet?
Think of a shopkeeper with a profitable weekly sale who puts the entire shop's stock on it every week. The average week is good, but one bad week ends the business. With repeated bets, wealth multiplies, so what matters is the average of the log of each outcome, not the average outcome, and a big loss costs more in log terms than an equal gain earns. This bet has a clear edge: each rupee staked returns 0.4 x 2 - 0.6 = Rs 0.20 on average. The question is how much of that edge survives compounding at each stake size.
How do you get the Kelly fraction and the growth rate?
Stake a fraction f. A win multiplies wealth by 1 + 2f, a loss by 1 - f, so the growth per bet is g(f) = 0.4 ln(1 + 2f) + 0.6 ln(1 - f). Set the derivative to zero: 0.8/(1 + 2f) = 0.6/(1 - f), giving f = 0.1. The Kelly stake is the edge divided by the odds, (bp - q)/b = 0.2/2 = 10%. Plugging in, g = 0.4 x 0.1823 - 0.6 x 0.1054, about 0.97% a bet, so the typical path doubles its wealth roughly every 71 bets.
Long-run growth peaks at 0.97% a bet at the Kelly stake of 10%; half Kelly keeps 76% of that growth, twice Kelly keeps almost none of it at 0.07%, and any stake above about 20.4% shrinks the bankroll over time. The relationshipb the net odds, 2 to 1 p, q the chances of winning and losing, 0.4 and 0.6 g(f) expected log growth of wealth per bet at stake f What it says in wordsKelly maximises the expected log of wealth, and its stake is the edge divided by the odds.Why is overbetting so much worse than underbetting?
Near the peak the growth curve is close to a parabola, so the cost of a sizing error grows with its square. Half Kelly gives up only about a quarter of the growth, while twice Kelly gives up nearly all of it, and three times Kelly shrinks wealth at about 2.6% a bet. Real edges are estimated, not known, so a trader who thinks the win rate is 40% but faces 35% is already overbetting at the full 10%. That asymmetry is why desks size at a fraction of Kelly.
Where candidates lose it
The first trap is stopping at the positive expected value and saying bet big. The interviewer is testing whether you know that repeated multiplicative bets are judged by log growth, where volatility itself costs money.
The second is misremembering the formula as p - q or as p/b. Derive it from the log growth in two lines; it is faster than recalling and it proves you know where it comes from.
What the interviewer asks next
- What is the Kelly fraction for an even-money bet that wins 55% of the time?
- Why might a trader deliberately stake half Kelly?
- How would you size two independent simultaneous bets like this one?
070I offer you a bet. I draw two cards from a well-shuffled 52-card deck. If they are the same colour you win Rs 100; if they differ you lose Rs 100. Do you take the bet, and what payout on a win would make it fair?Quant tradingOptions market making
Try it first
Should you take the bet?
Show the worked solution
Decline it: same colour comes up 25 times in 51, so the bet loses about Rs 1.96 per Rs 100. Whatever the first card is, 25 of the remaining 51 share its colour and 26 do not. The bet is fair only if a win pays Rs 26 for every Rs 25 risked, that is Rs 104 on a win against Rs 100 on a loss.
Why is same colour less likely than different colour?
Imagine a classroom with 26 girls and 26 boys. Pick one child, then pick a second: the second is slightly more likely to be of the other sex, because the first pick removed one of their own. Drawing without replacement makes the second card lean away from the first card's colour, since that colour is now short by one. The first card is irrelevant to the answer, whichever colour it is. Only what is left in the deck matters: 25 matching cards and 26 non-matching.
After any first card, 25 of the 51 cards left share its colour and 26 do not, so same colour has chance 25/51 = 49.0%, the Rs 100 even bet is worth Rs -1.96 on average, and it becomes fair at a payout of Rs 104. What is the bet worth, and what makes it fair?
Expected value is the win times its chance less the loss times its chance: 100 x 25/51 - 100 x 26/51 = -100/51, about Rs -1.96. A bet is fair when the payout ratio equals the odds against winning, here 26 to 25, so the win must pay Rs 104 for each Rs 100 at risk. Quoting it as odds rather than a probability is how a trader would answer: you would take the bet at 26 to 25 or better, and decline anything worse.
The relationship25/51 the chance the second card matches the first card's colour W* the win payout that makes the expected value zero What it says in wordsThe second card matches with chance 25 in 51, so an even-money bet loses a little under 2 rupees per 100.Why would an interviewer offer such a small edge?
To see whether you notice it at all, and then whether you size your response to it. An edge of about 2% per bet is small for one play but decisive over many, so the right answer is to decline at even money and quote the price at which you would play. It also tests whether you separate the first card, which is free, from the conditional chance of the second. With replacement, or with an infinite deck, the bet would be exactly fair; the whole edge comes from the deck being finite, and it shrinks as more decks are shuffled together.
Where candidates lose it
The trap answer is that the bet is fair because colours are fifty-fifty. That treats the two cards as independent draws with replacement, which a single deck is not.
The second loss is getting 25/51 and stopping there. The question asks whether you take the bet and at what price, so finish with the decision and the fair odds of 26 to 25.
What the interviewer asks next
- What if the cards come from two decks shuffled together?
- You win if the two cards are the same suit. What payout makes that fair?
- I draw three cards and you win if all three are the same colour. What is the chance?
