Expected value is the most common tool in quant trading interviews. How many flips until two heads in a row? How many empty subway cars? How many boxes to collect every card? Linearity of expectation and indicator variables make most of these short, once you see them. Guess first, solve, then watch the simulation converge on the answer.
What these puzzles practice
Linearity of expectation and indicator variables
Waiting times and first-step analysis
The inspection paradox
22 puzzles, easiest first
Counting streaks· Coin flips · difficulty 2 of 5You flip a coin 20 times; it lands heads with probability 0.5. A run is a maximal block of identical results, so HHTHHH has 3 runs. What…
Heads and tails both· Coin flips · difficulty 2 of 5You flip a coin that lands heads with probability 0.5, independently each time, until you have seen at least one heads and at least one…
Letters in the right envelopes· Mail · difficulty 2 of 5You have 10 letters and 10 envelopes, each envelope addressed to match exactly one letter. The letters are put into the envelopes…
Out-of-order pairs· Cards · difficulty 2 of 5You shuffle 10 cards numbered 1 to 10, so every order is equally likely, and lay them out in a row. An out-of-order pair is two cards,…
The best of the dice· Dice · difficulty 2 of 5You roll 2 fair 6-sided dice. What is the expected value of the highest one?
The gap between two dice· Dice · difficulty 2 of 5You roll two fair 6-sided dice, numbered 1 to 6, independently. What is the expected absolute difference between the two numbers?
The same roll twice· Dice · difficulty 2 of 5You roll a fair 6-sided die again and again, until two consecutive rolls show the same number. What is the expected number of rolls,…
All-time highs· Stock market · difficulty 3 of 5Model a stock's closing prices over 30 trading days as independent draws from the same continuous distribution: no trend, no momentum. A…
Collect every team card· Collectibles · difficulty 3 of 5Every cereal box contains one team card, equally likely to be any of the 10 teams, independently. What is the expected number of boxes you…
Empty subway cars· Subway · difficulty 3 of 5A subway train has 8 cars. 8 passengers each board a car chosen uniformly at random, independently of each other. What is the expected…
Heads in a row· Coin flips · difficulty 3 of 5You flip a coin that lands heads with probability 0.5, until you first get 2 heads in a row. What is the expected number of flips?
How many different birthdays· Birthdays · difficulty 3 of 5There are 30 people in a room. Each person's birthday is equally likely to be any of 365 days (ignore February 29), independently of…
Matching neighbors· Cards · difficulty 3 of 5A deck of 26 red and 26 black cards is shuffled so every order is equally likely, and laid out in a row. Count the neighboring pairs, the…
The first repeat· Dice · difficulty 3 of 5You roll a fair 6-sided die again and again, until some face comes up for the second time. What is the expected number of rolls, counting…
The second highest die· Dice · difficulty 3 of 5You roll 3 fair six-sided dice and sort them from highest to lowest. Ties count as separate dice, so a roll of 6, 6, 2 has 6 as its second…
Every face on a loaded die· Dice · difficulty 4 of 5A loaded die lands on six 2 times as often as on any other face: P(six) = 2/7 and each of the faces one to five has probability 1/7. You…
Nobody sits next to a stranger· College cafeteria · difficulty 4 of 5A cafeteria bench has 10 seats in a row, all empty. Students arrive one at a time, and nobody will sit directly next to someone already…
Socks in the dark· Home · difficulty 4 of 5It's dark, and your drawer holds 10 pairs of socks, every pair different: 20 socks in all. You pull socks out one at a time at random…
Until the total passes· Random numbers · difficulty 4 of 5You keep drawing random numbers uniformly between 0 and 1 and adding them up, stopping as soon as the total exceeds 1. What is the…
Waiting for an ace· Cards · difficulty 4 of 5A shuffled deck has 52 cards, 4 of which are aces. You turn cards over one at a time. What is the expected position of the first ace?
Waiting for the shuttle bus· Commuting · difficulty 4 of 5Shuttle buses to the train station arrive completely at random (a Poisson process), on average one every 10 minutes. You show up at the…
The longest piece· Breaking a stick · difficulty 5 of 5A stick 1 foot long is broken at 2 points, each chosen independently and uniformly at random along its length, giving 3 pieces. What is…