harddistasked: Jane Street
Buffon's Needle
Floor has parallel lines spaced 1 apart. Drop a needle of length 1 at random orientation and position. What is the probability the needle crosses a line?
Show hint
Two random variables: angle θ uniform on [0, π/2] and center distance d uniform on [0, 1/2]. Crossing iff d ≤ (1/2)·sin θ.
Tap to reveal solution
harddistasked: Two Sigma
Polya's Urn
An urn contains 1 red and 1 blue ball. You draw one, observe its color, then put it back along with another ball of the same color. Repeat. After many draws, what is the distribution of the fraction of red balls?
Show hint
It feels like it should converge to 1/2, but draws aren't independent — they reinforce each other.
Tap to reveal solution
hardteaserasked: Jane Street, Optiver
100 Prisoners and Boxes
100 prisoners are numbered 1–100. A room contains 100 boxes, each holding a slip with a unique number 1–100 in random order. Each prisoner enters alone, may open at most 50 boxes, looks at the slips, then leaves without communicating. All prisoners must find their own number; if any fails, all are executed. They can agree on a strategy beforehand. What strategy gives the best survival probability — and what is it?
Show hint
Random opening gives (1/2)^100, basically zero. Use the *permutation structure* of the slip placement.
Tap to reveal solution
mediumEVasked: SIG, Optiver, Citadel
Broken Stick Triangle
A stick of length 1 is broken at two points chosen uniformly at random. What is the probability the three pieces form a triangle?
Show hint
Triangle inequality: no piece can be ≥ 1/2.
Tap to reveal solution
mediumdistasked: SIG, Optiver
Expected Maximum of Three Dice
Roll three independent fair six-sided dice. What is the expected value of the maximum?
Show hint
Use the tail-sum formula: E[X] = sum_{k=1}^{6} P(X ≥ k).
Tap to reveal solution
mediumbayesasked: Jane Street, SIG
Two-Children Problem
A man has two children. (a) Given that at least one is a boy, what is the probability both are boys? (b) Given that the eldest is a boy, what is the probability both are boys?
Show hint
The information you're given is different in (a) vs (b). Enumerate the sample space.
Tap to reveal solution
mediumEVasked: Jane Street
St. Petersburg Paradox
A casino offers a game: flip a fair coin until tails. If tails appears on the k-th flip, you win 2^k dollars. How much would you pay to play?
Show hint
Compute the expected payout. Then notice what utility theory says about the gap.
Tap to reveal solution
mediumEVasked: SIG, Jane Street, Optiver
Coin: Expected Flips to HH vs HT
You flip a fair coin until you see HH (two heads in a row). What is the expected number of flips? What about until HT?
Show hint
After a single H, what happens on the next flip determines very different outcomes. Set up states and solve.
Tap to reveal solution
mediumteaserasked: Jane Street, SIG
Ants on a Rod
N ants are placed on a meter-long rod at distinct random positions. Each ant faces left or right (independently 50/50) and walks at 1 m/s. When two ants collide they instantly reverse direction. When an ant reaches an end, it falls off. What is the expected time until the rod is empty?
Show hint
Two ants colliding is equivalent to two ants passing through each other (relabel them).
Tap to reveal solution
hardEVasked: Two Sigma, SIG
Longest Streak of Heads in N Flips
What is the expected length of the longest streak of consecutive heads in n flips of a fair coin?
Show hint
Approximately log_2(n). Get the leading constant; the rest is a small additive term.
Tap to reveal solution
hardmarkovasked: Jane Street, Optiver
Coin Pattern Race: HHH vs THH
Two players bet on coin patterns. Player A wins if HHH appears first; player B wins if THH appears first. Both watch the same sequence of fair flips. Who has the edge?
Show hint
Set up the Markov chain. Or notice: any HHH start was preceded by something — almost always T.
Tap to reveal solution
mediumbayesasked: HRT, Optiver
Russian Roulette: Spin or Not?
A revolver has 6 chambers, 2 of which (adjacent) hold bullets. The cylinder is spun once. You're forced to play and the first trigger pull is a click (empty). Before the second trigger pull, you're offered: spin again or just pull. What do you do?
Show hint
Condition on which of the 4 empty chambers was the one you survived.
Tap to reveal solution
mediumEVasked: Jane Street, HRT, SIG
Coupon Collector
A cereal box contains one of n different toys, uniformly at random. You buy boxes one at a time. What is the expected number of boxes you must buy to collect all n toys?
Show hint
Decompose the journey into phases: time to get the next NEW toy.
Tap to reveal solution
easybayesasked: everywhere — but they're testing you can explain *why*
Monty Hall
Three doors hide one car and two goats. You pick a door. The host (who knows what's behind each door) opens a different door revealing a goat, then offers you the option to switch. Should you switch?
Show hint
Condition on where the car actually is. The host's action is not independent of that.
Tap to reveal solution
easybayesasked: everywhere — it's the test of whether you've internalized Bayes
Bayes: The Diagnostic Test
A disease has 1% prevalence in the population. A test has 99% sensitivity (P[positive | sick] = 0.99) and 99% specificity (P[negative | healthy] = 0.99). You test positive. What is the probability you have the disease?
Show hint
Imagine a population of 10,000.
Tap to reveal solution
mediumbayesasked: SIG
Three Coins, One Biased
Three coins. Coin A is fair. Coin B comes up heads with probability 1/4. Coin C with probability 3/4. You pick one uniformly at random and flip it twice — both heads. What is the probability you picked coin C?
Show hint
Bayes. The likelihoods differ by a factor of (3/4)^2 / (1/4)^2 = 9.
Tap to reveal solution
harddistasked: Citadel
Distance Between Two Random Points in a Unit Square
Two points are chosen uniformly at random in the unit square [0,1]². What is the expected Euclidean distance between them?
Show hint
Decompose into x and y components. E[(X_1 - X_2)^2] is easy; E[|X_1 - X_2|] is easier than the full integral.
Tap to reveal solution
mediumEVasked: Jane Street, HRT
Boys and Girls Country
In a country, every couple keeps having children until they have a boy, then stops. (Genders are 50/50 i.i.d.) What is the expected ratio of boys to girls in the country?
Show hint
Linearity. Boys are tied to families; girls are accumulated before a boy arrives.
Tap to reveal solution
easycountingasked: everywhere
Birthday Paradox
How many people do you need in a room before the probability of a shared birthday exceeds 1/2? (Ignore leap years.)
Show hint
Compute P(all different) and take the complement.
Tap to reveal solution
mediumEVasked: Jane Street
First Heart in a Shuffled Deck
Cards are turned over one at a time from a shuffled standard 52-card deck. What is the expected position of the first heart?
Show hint
Think of the 13 hearts as dividers among the 39 non-hearts. By symmetry, expected gaps are equal.
Tap to reveal solution
mediumEVasked: Jane Street
The Wallet Game
Two players each put their wallets on the table. Whoever's wallet has less money wins both wallets. From your perspective, the EV of playing is positive (you either win your opponent's wallet plus your own = 2x your amount, or you lose your amount). Same logic applies to your opponent. How can it be a positive-EV game for both?
Show hint
Same issue as the two-envelope paradox.
Tap to reveal solution
mediumEVasked: HRT
The Hat Check Problem
N people leave their hats at a coatroom. The attendant returns the hats uniformly at random. What is the expected number of people who get their own hat back?
Show hint
Linearity of expectation. Don't compute the full derangement count.
Tap to reveal solution
mediumteaserasked: Two Sigma
Friendship Paradox
In a social network, your friends have more friends than you do, on average. Why?
Show hint
Sampling bias: popular nodes appear in more friend-lists.
Tap to reveal solution
mediumcountingasked: Jane Street
100 Light Switches
100 light bulbs labeled 1..100 are off. 100 people walk through. Person k flips every k-th switch (the bulb's state toggles for every divisor of its number). At the end, which bulbs are on?
Show hint
A bulb is on iff it was toggled an odd number of times. Count divisors.
Tap to reveal solution
mediumEVasked: Jane Street
Two Shuffled Decks — Expected Matches
Two standard 52-card decks are shuffled independently. You turn over cards one at a time from both decks in sync. What is the expected number of positions where the two decks show the same card?
Show hint
Linearity. For each position, compute P(match) and sum.
Tap to reveal solution
hardrand walkasked: Citadel, HRT
Drunkard's Walk Returns to Origin
A drunkard starts at 0 on the integer line. Each step they go +1 or -1 with equal probability. Will they almost surely return to the origin? What about in 2D? 3D?
Show hint
Pólya's theorem. The answer depends on dimension.
Tap to reveal solution
mediumdistasked: HRT, SIG
Poisson Process Arrival Time
Buses arrive at a stop according to a Poisson process with rate 1 per 10 minutes. You arrive at the stop at a random time. What is the expected time until the next bus?
Show hint
Don't say 5 minutes. Think about the 'inspection paradox.'
Tap to reveal solution
hardstoppingasked: Jane Street, SIG
The Secretary Problem (Optimal Stopping)
You interview n candidates one at a time, in random order. After each you must accept (and stop) or reject (forever). You can rank candidates only relative to those already seen. What strategy maximizes the probability of hiring the best, and what is that probability?
Show hint
Sample-then-leap: reject the first k as a calibration, then hire the next one better than all of them.
Tap to reveal solution
mediumdistasked: HRT, Citadel
Estimating a Biased Coin from k Flips
A coin has unknown bias p, uniform prior on [0, 1]. You flip it n times and see k heads. What is the posterior distribution and the Bayes estimate of p?
Show hint
Beta-Bernoulli conjugacy.
Tap to reveal solution
hardrand walkasked: Two Sigma
Two Snakes Approach Each Other
Two snakes start at positions 0 and L on the integer line. Each second, each snake independently moves +1 or -1 (50/50). What is the probability they ever meet?
Show hint
Difference of two independent random walks is itself a random walk with double the step size. Reduce to a single random walk hitting 0.
Tap to reveal solution
hardEVasked: HRT
Two-Envelope Paradox
Two envelopes are presented. One contains twice the amount of money the other does. You pick one; it contains X. The 'naive' EV argument: the other envelope has 2X with prob 1/2 and X/2 with prob 1/2, so its EV is 5X/4 — always switch. But by symmetry, both envelopes look the same. Where's the error?
Show hint
The unconditional prior on the smaller amount matters. The '1/2 / 1/2' framing is implicitly conditional on X.
Tap to reveal solution
mediumbayesasked: SIG
Bertrand Box Paradox
Three boxes: one contains two gold coins, one contains two silver coins, one contains one of each. You pick a box uniformly at random, then a coin uniformly at random from that box. The coin is gold. What is the probability the other coin in the same box is also gold?
Show hint
Count gold coins, not boxes.
Tap to reveal solution
mediumrand walkasked: Jane Street, SIG
Gambler's Ruin
You start with $k and bet $1 at a time on a fair coin (50/50). You stop when you hit $0 (ruined) or $n (target). What is the probability you reach $n before $0?
Show hint
It's a harmonic / linear / discrete-Laplace equation. Solution is linear in k.
Tap to reveal solution
hardEVasked: SIG
Frog Jumping on N Stones
A frog at stone 0 wants to reach stone n. From stone k it jumps uniformly to a random stone in {k+1, k+2, ..., n}. What is the expected number of jumps to reach n?
Show hint
Let f(k) = expected jumps from k to n. Set up the recursion.
Tap to reveal solution
hardcountingasked: Jane Street, Two Sigma
Ballot Problem (Catalan)
In an election, candidate A receives a votes and candidate B receives b votes, with a > b. If votes are counted in a uniformly random order, what is the probability A is strictly ahead at every step?
Show hint
Reflection principle. Or recognize this is a Catalan-flavored random walk.
Tap to reveal solution
mediumdistasked: Jane Street, Citadel
Two Random Points on a Circle
Two points are chosen uniformly at random on the circumference of a circle. What is the probability the arc between them (the shorter one) is less than 60°?
Show hint
Fix one point WLOG; the answer depends only on the other point's relative position.
Tap to reveal solution
mediumEVasked: Jane Street, Citadel
Sum of Uniforms Until Exceeding 1
You draw uniform [0,1] random variables one at a time and add them. What is the expected number drawn until the cumulative sum first exceeds 1?
Show hint
Use the volume / geometric argument: P(N > k) = P(sum of k uniforms ≤ 1) = 1/k!.
Tap to reveal solution
mediumEVasked: SIG
Expected Rolls to Exceed 100
Roll a fair six-sided die repeatedly, summing the results. What is the expected number of rolls until the running sum exceeds 100?
Show hint
Asymptotically, the sum grows by 3.5 per roll. Renewal theory.
Tap to reveal solution