50 questions reported from interviews at 9 trading firms, from the Quant Bible. Try each one before opening the hint. Every answer has been checked by exact calculation or simulation; 24 of them come with a simulator you can run yourself. Where the original had a slip (9 cases), the corrected answer is shown with a note.
Showing all 50 questions
Jane StreetCombinatorics
There are 10 people in a room. How many ways are there to choose three of them?
Answer
(310)=120
Solution
Order doesn’t matter, so it’s a combination: (310)=3!10⋅9⋅8=120. A quick warm-up; answer instantly and move on.
Jane StreetExpected valueSimulator
We play a game with one six-sided die. (a) You are paid the number you roll. What is a fair price? (b) Now you may re-roll once, keeping the second roll. What is a fair price?
Hint
For (b), compare each face with what a fresh roll is worth.
Answer
(a) $3.50. (b) $4.25.
Solution
(a) 61(1+2+⋯+6)=3.5.
(b) A re-roll is worth 3.5, so keep 4, 5 or 6 and re-roll 1, 2 or 3: 63⋅3.5+61(4+5+6)=4.25.
Same game, but you may re-roll as many times as you like, paying $1 each time. What is the optimal strategy and the fair price?
Hint
Call the game’s value V. You should keep any roll worth more than V−1.
Answer
Keep any roll of 3 or more (or 4 or more; both are optimal). Fair price $4.
Solution
Let V be the value. Keeping faces t and above gives V=61∑x≥tx+6t−1(V−1).
t=4: V=2.5+21(V−1)⇒V=4.
t=3: V=3+31(V−1)⇒V=4.
t=5: V=611+64(V−1)⇒V=3.5.
The rule “keep anything above V−1=3” is self-consistent: 3 itself is break-even.
Correction to the original.The original solves for the strategy “re-roll with probability p” and concludes a payoff of 3.5 is optimal. Threshold strategies do better; the game is worth $4.
Rank by expected value: the product of two dice, the square of one die, and the square of the median of five dice.
Hint
Two of these are quick. For the median, think about how spread out it is compared with a single die.
Answer
Product of two (12.25) < square of the median of five (≈ 13.62) < square of one (≈ 15.17).
Solution
Product of two independent dice: E[XY]=E[X]E[Y]=3.52=12.25. Square of one die: E[X2]=691≈15.17.
For the median M use E[M2]=(E[M])2+Var(M). By symmetry E[M]=3.5, so E[M2]=12.25+Var(M), while one die gives 12.25+1235. The median of five dice is far less spread out than one die (an extreme median needs three 6s or three 1s), so 0<Var(M)<1235 and it lands strictly between the other two. Exact enumeration over 65 outcomes gives E[M2]≈13.62.
Jane StreetExpected valueCorrectedSimulator
You roll a 100-sided die once for a fixed price, then may re-roll as often as you like for $1 each. When you stop you get the face shown. What is the optimal strategy, and the fair fixed price?
Hint
Keep rolls of t or more. Then Vt=2t+100−101−tt−1. Maximise over t.
Answer
Keep any roll of 87 or more. Fair price 1223/14≈$87.36.
Solution
With threshold t there are k=101−t stopping faces with average 2t+100, and each round fails with probability 100t−1. Solving V=100k⋅2t+100+100t−1(V−1) gives
Vt=2t+100−101−tt−1.
V86=87.33, V87=87.357, V88=87.31, so stop at 87 or more. Consistency check: you keep any face above V−1≈86.4.
Correction to the original.The original stops at “X=50.5p”. The full solution is above.
Jane StreetGames & strategy
You and I each roll a hidden die. A third party puts the sum in a jar. We take turns either raising the bid on the jar by a positive integer or passing. When someone passes, the last bidder pays their bid and receives the jar. What is your strategy?
Answer
Open-ended: there is no single answer. Show a consistent, defensible strategy.
Solution
The interviewer wants to see structured thinking, not a closed form. A good approach:
Your die d tells you the jar is worth d+3.5 in expectation before any bidding.
Each of the opponent’s bids is evidence about their die. Assume they play the same strategy as you (“you claim it’s optimal”).
Write a rule per die value: bid up to a ceiling that depends on d and on what their bids imply, and pass above it.
One conservative strategy never bids above d+1 (the jar is at least d+1), so it can never lose money; then discuss how much expected profit it gives up.
Jane StreetMarket making
Make me a market on the number of magazines in the Airbnb I’m staying in.
Answer
Something like 2 @ 8, with clearly stated assumptions, then adjust as they trade.
Solution
This checks that you speak market-making language (bid, ask, width, “I’ll buy at…, sell at…”). It isn’t a Fermi problem with a deep answer. Give a central guess with a reason (“a coffee table plus a rack: about 5”), make the width reflect how unsure you are, and move sensibly after each trade.
Make markets on dice games: the product of a d6 and a d12; the maximum of a d3, a d4 and a d8. The interviewer will take one side of each, but chooses which.
Hint
For a maximum, use E[M]=∑m≥0P(M>m).
Answer
Product: fair 22.75. Maximum: fair 39/8=4.875. Quote tightly around those, wider for the more uncertain product.
Solution
Product of independent dice: E=3.5×6.5=22.75, with a wide spread (from 1 to 72), so show a wider market.
Maximum: P(M≤m)=min(3m,1)min(4m,1)min(8m,1), and E[M]=∑m=07(1−P(M≤m))=839=4.875. Since they will trade against you on one side, centre on fair value and pick a width you’re comfortable losing half of.
Virtual ski-ball: for each hole you know the probability of scoring if you aim at it. You watch an opponent’s strategy for 5 practice rounds, then bet chips on one 10-throw round against them (win and double your stake, lose and lose it). Strategies seen: always aim at the 10-point hole (100% success); aim at the 100-point hole until it hits, then switch to 10s.
Answer
Open-ended. Model each strategy’s score distribution, pick your best response, and size the bet to your edge.
Solution
From the per-hole probabilities, compute the distribution of 10-throw scores for each candidate strategy (yours and theirs). It is a sum of independent throws, so it can be simulated or convolved.
Identify the opponent’s strategy from the practice rounds, then choose the strategy that maximises your probability of beating it (not your expected score: a risky strategy can win more often against a safe opponent).
Bet more when your win probability is well above 50%, along the lines of Kelly sizing.
There are 10 coins: 9 of unknown bias (you are given the distribution the biases come from) and 1 known to be fair. You pay 50 chips to play and get 100 flips; each head pays 1 chip. Should you play? You can track each coin’s heads, tails and flip count. Design an exploration–exploitation strategy.
Answer
Play only if the expected heads under a good adaptive strategy exceed 50; use a multi-armed-bandit approach such as Thompson sampling or upper confidence bounds.
Solution
The fair coin alone guarantees 50 expected heads, so the game breaks even at worst. Exploring the unknown coins can only add value if their prior allows biases above 0.5.
This is a multi-armed bandit. Keep a posterior for each coin’s bias (a Beta distribution is natural), flip the coin with the best sampled bias (Thompson sampling) or the highest upper confidence bound, and update after every flip.
Early flips explore; later flips exploit the best coin found. With only 100 flips, stop exploring fairly early.
Jane StreetGames & strategy
You and the interviewer take turns: throw a chip at a wall, or pass. If both pass in a row, whoever threw the chip closest to the wall (over all throws) wins 20 chips; the other gets nothing. Thrown chips aren’t returned. (Virtually, throws were two unknown random-number generators giving a distance.)
Answer
Open-ended. Keep throwing while the expected gain in win probability × 20 exceeds the 1-chip cost.
Solution
Each throw costs 1 chip and is worth 20× (increase in your probability of ending closest).
Estimate both distance distributions from observed throws: they are unknown, so early throws are partly exploration.
If you are currently closest, passing puts pressure on them: they must pay to beat you. If you are behind, throw while the chance of beating the current best is above about 1 in 20 per chip (less if they will respond).
Jane StreetStatistics
Corr(X,Y)=0.9 and Corr(Y,Z)=0.8. What are the best bounds on Corr(X,Z)?
Hint
A correlation matrix must be positive semidefinite.
Answer
0.458≤Corr(X,Z)≤0.982
Solution
With c=Corr(X,Z) the determinant of the correlation matrix must be non-negative: −c2+1.44c−0.45≥0, i.e. c∈0.72±0.19×0.36. Geometrically, correlations are cosines of angles: X is 25.8° from Y and Z is 36.9° from Y, so X and Z are between 11.0° and 62.7° apart.
n ants are equally spaced around a circle, each facing clockwise or anticlockwise at random. All walk at one revolution per minute; when two meet, both turn around. After one minute, what is the probability every ant is back in its own starting spot?
Hint
Pretend colliding ants pass through each other. What stays the same?
Answer
2n−11 if n is odd; 2n2+(n/2n) if n is even.
Solution
Two insights:
Treat ants as indistinguishable: a collision looks the same as two ants passing through. So after one minute the set of occupied positions is the same as at the start.
Ants never pass each other, so their cyclic order is fixed and the labels are rotated by some amount. That rotation equals the net number of ants crossing a fixed point, which is (clockwise − anticlockwise) ants, mod n.
Everyone is home iff 2⋅#cw−n≡0(modn): all clockwise, all anticlockwise, or (for even n) exactly half each. Count those configurations out of 2n.
Jane StreetProbabilityCorrectedSimulator
Bag A has 8 blue and 4 red balls; bag B has 4 blue and 8 red. You pick a bag at random and draw 3 balls without replacement: 2 blue and 1 red. What is the probability you picked bag B?
Answer
3/10
Solution
Bayes with hypergeometric likelihoods:
P(2B1R∣A)∝(28)(14)=112,P(2B1R∣B)∝(24)(18)=48,
so P(B∣draw)=112+4848=0.3.
The shortcut “cancel one blue against one red and condition on a single blue” works only with replacement (it would give 1/3). Without replacement, removing balls changes the bags differently.
Correction to the original.The original gives 2/3, using the cancel-a-pair shortcut. Exact enumeration gives 3/10; even with replacement the answer for bag B would be 1/3, not 2/3.
There is a 40% chance of rain on Saturday and 70% on Sunday. What is the probability it doesn’t rain all weekend? State your assumptions, then give bounds without them.
Answer
0.18 if independent; in general between 0 and 0.3.
Solution
Independent: 0.6×0.3=0.18.
No assumptions: P(no rain)=1−P(A∪B) and max(P(A),P(B))≤P(A∪B)≤min(1,P(A)+P(B)), so 0.7≤P(A∪B)≤1 and 0≤P(dry)≤0.3.
Virtu FinancialProbabilitySimulator
20 points are spread at random on a circle. Choose 4 of them at random and label them A, B, C, D. What is the probability chords AB and CD intersect?
Hint
The 20 points don’t matter. Look at the cyclic order of A, B, C, D.
Answer
1/3
Solution
Choosing 4 of 20 random points is the same as choosing 4 random points. The chords cross exactly when C and D separate A and B around the circle. Fix A; of the three equally likely positions of B in the cyclic order of the other three points, exactly one (B opposite A, i.e. ACBD or ADBC) separates C from D. So 1/3. (Counting all 24 orderings: 8 of them cross.)
Virtu FinancialProbability
A 4-engine plane crashes if 3 or more engines fail; a 2-engine plane crashes if both fail. Each engine fails independently with probability p. Is either plane always safer? For which p are they equally safe?
Answer
Neither is always safer. Equal at p=1/3; the 4-engine plane is safer for p<1/3.
Solution
P(4-engine crash)=4p3(1−p)+p4, P(2-engine crash)=p2. Setting them equal: 4p(1−p)+p2=1⇒3p2−4p+1=0⇒p=31 (or 1). Test p=41: 4-engine ≈0.051 vs 0.0625; at p=21: 0.3125 vs 0.25.
You flip a coin until the first head and are paid the number of flips. Fair price? What if you’re paid 2flips? What would you actually pay?
Answer
$2 for the first game. The second has infinite expected value; any real price is a judgement about risk.
Solution
Let X be the payout. Conditioning on the first flip, X=21⋅1+21(X+1), so X=2.
Paying 2n: E=∑n≥12n2−n=∑1=∞, the St Petersburg paradox. Nobody pays infinity: the counterparty can’t pay out huge amounts, and utility is concave. One defensible answer ignores outcomes rarer than 1 in 32, which caps the value at $5.
Virtu FinancialProbabilitySimulator
Your camera holds one photo (a new photo replaces the old). You walk past a row of houses of unknown length, with a Uniform(0, 1) generator. Design a strategy so that at the end every house is equally likely to be the one in memory.
Answer
Photograph house i with probability 1/i.
Solution
This is reservoir sampling. Take house 1 with probability 1. If house i is replaced with probability 1/i, then by induction each of the first i houses is in memory with probability 1/i: the newest with 1/i, and each earlier one with i−11⋅(1−i1)=i1.
Virtu FinancialExpected valueSimulator
Start with {0,1,…,n−1}. Repeatedly pick a number uniformly at random from what’s left and discard it and everything above it, until you pick 0. What is the expected number of picks?
Answer
Hn=1+21+⋯+n1
Solution
Let En be the answer for n numbers. The first pick is 0 with probability n1; otherwise it is uniform on 1..n−1 and leaves {0,…,x−1}. A cleaner view: number k is ever picked iff it is picked before all of 0..k−1, which has probability k+11. By linearity En=∑k=0n−1k+11=Hn. For n=4: 2.08.
How do you test whether the slope in a simple linear regression is significant? And how do you stop a regression with many covariates from overfitting?
Answer
A t-test on β^/se(β^); regularisation (ridge, lasso, elastic net) plus out-of-sample validation.
Solution
t=β^1/se(β^1) follows a tN−2 distribution under β1=0; ∣t∣>2 is the usual threshold. For overfitting: penalise coefficients (L1, L2 or both), choose λ by cross-validation, and judge on held-out data.
Design a data structure that keeps the minimum SPX price over the last 30 minutes. Prices arrive at random times; queries for the minimum also arrive at random times.
Hint
A price that is higher than a newer price can never be the minimum again.
Answer
A monotonic deque: amortised O(1) per update and per query.
Solution
Keep a double-ended queue of (time, price) with prices increasing from front to back.
New price: pop from the back while the back’s price ≥ the new price (they can never be the minimum again), then push the new one.
Query: pop from the front while its time is older than 30 minutes; the front is the minimum.
Every price is pushed and popped at most once, so the amortised cost is O(1).
Correction to the original.The original keeps a sorted list plus a dictionary of ages updated on every query, which costs O(n) per operation. The monotonic deque is the answer interviewers look for.
OptiverStatistics
Mental maths: estimate 50 to two decimal places without a calculator.
Answer
≈7.07
Solution
Start from a nearby square: 49=7. One Newton step: a2+d≈a+2ad=7+141≈7.071. Optiver and other options firms test fast arithmetic like this, along with fractions and percentages, under time pressure.
OptiverStatistics
Work starts at 9:00. Your last five commutes took 20, 40, 35, 15 and 25 minutes. Assuming commutes are normal, when must you leave to be on time 95% of the time? To leave later with the same reliability, would you rather cut the mean or the standard deviation by a minute?
Answer
About 8:15. Cut the standard deviation.
Solution
Mean 27 minutes, sample standard deviation 430/4≈10.4. One-sided 95% needs 27+1.645×10.4≈44 minutes, so leave by about 8:16 (8:15 to be safe).
The required buffer is μ+1.645σ. Cutting μ by a minute saves 1 minute; cutting σ by a minute saves 1.645 minutes.
Consider arrangements of the letters ABCD. In how many are exactly 1, 2, 3 and 4 letters out of their original place?
Answer
0, 6, 8 and 9.
Solution
Exactly 1 out of place: impossible (if three letters are home, so is the fourth).
Exactly 2: choose the pair to swap, (24)=6.
Exactly 3: choose the fixed letter (4 ways) and derange the other three (2 ways): 8.
All 4: the derangement number D4=9. Check: 1+0+6+8+9=24=4!.
OptiverCombinatorics
A batter has 100 at-bats, a .300 average and a .500 slugging percentage. (a) What is the most singles possible? (b) With no home runs, how many hit combinations are possible? (c) Generalise to x at-bats.
Hint
30 hits and 50 total bases. Singles give 1 base, doubles 2, triples 3, home runs 4.
Answer
(a) 23. (b) 11. (c) x/10+1 (for x divisible by 10).
(a) Maximise s by minimising extra-base hits: h=6,t=1 uses 7 hits, so s=23.
(b) With h=0: d+2t=20, so t=0,1,…,10: 11 combinations.
(c) Extra bases are 0.2x, so t runs from 0 to 0.1x: x/10+1 combinations.
Akuna CapitalProbabilitySimulator
Draw n i.i.d. Uniform(0, 1) numbers. What is the probability their sum is at most 1?
Answer
1/n!
Solution
The outcomes fill the unit hypercube (volume 1). The region with x1+⋯+xn≤1 is a simplex: a triangle of area 21 in 2D, a tetrahedron of volume 61 in 3D, and in general volume n!1.
Akuna CapitalProbabilityCorrectedSimulator
Using a fair coin, simulate three outcomes with probability 1/3 each. In general how many flips do you need for n equally likely outcomes? If you only need one event of probability 1/3, what is the smallest expected number of flips?
Answer
Two flips with one outcome rejected; ⌈log2n⌉ flips per attempt; 2 flips on average.
Solution
Flip twice: HH, HT, TH are the three outcomes; on TT, start again.
k flips give 2k outcomes, so you need 2k≥n: k=⌈log2n⌉ per attempt, rejecting the leftover outcomes.
For one 31 event: flip; H means “no”. On T flip again: TH means “yes”, TT means start over. Then E=1+21(1+21E), so E=2. This is optimal: it reads off the binary expansion 31=0.010101…2 one digit per flip.
Correction to the original.The original writes the condition as 2k<n; it should be 2k≥n.
CitadelProbabilitySimulator
Two ants start at opposite vertices of an octahedron. Ant A moves to a random neighbouring vertex (probability 1/4 each), then ant B does the same, and so on, until one ant moves onto the other’s vertex. If A moves first, what is the probability A is the one to land on B?
Hint
The state is just the distance between the ants (1 or 2) and whose turn it is.
Answer
2/5
Solution
Let W1 and W2 be the probability the ant about to move wins from distance 1 and 2. From distance 2 every move reaches distance 1, so W2=1−W1. From distance 1, of the mover’s 4 neighbours: 1 is the other ant (win), 2 are still adjacent to it, and 1 is opposite it. So
W1=41+21(1−W1)+41(1−W2)=43+41W1−21W1,
giving W1=53 and W2=52. A starts at distance 2: 52.
CitadelExpected valueSimulator
X∼N(0,1) and Y∼N(0,4), independent. What is E∣Y−X∣?
Answer
10/π≈1.784
Solution
Y−X∼N(0,5). For Z∼N(0,σ2), E∣Z∣=σ2/π (twice the integral of zf(z) over z>0). So E∣Y−X∣=52/π=10/π. Options traders know this as the straddle approximation: an at-the-money straddle is worth about 0.8σT.
CitadelCombinatoricsSimulator
You deal 6 sets of 3 cards from a standard deck (18 cards in total). What is the probability that exactly one ace is among them?
Answer
4(1748)/(1852)≈0.398
Solution
Choose which ace (4 ways) and 17 non-aces from 48, out of all (1852) hands: (1852)4(1748)≈0.398. (The grouping into sets of three doesn’t matter for this count. If the question means “exactly one of the six sets holds an ace”, say which reading you are answering.)
CitadelProbabilitySimulator
100 passengers board a 100-seat plane in order. Passenger 1 is drunk and sits in a random seat. Each later passenger takes their own seat if it’s free, otherwise a random free seat. What is the probability passenger 100 gets their own seat?
Answer
1/2
Solution
Whenever someone has to choose randomly, seat 1 and seat 100 are equally likely to be chosen, and the first of those two to be taken decides everything: if seat 1 goes first, everyone else (including 100) gets their seat; if seat 100 goes first, passenger 100 doesn’t. By symmetry each happens with probability 21.
CitadelAlgorithms
Find the k largest elements of an array of size n. What is the most efficient approach?
Answer
A size-k min-heap in O(nlogk), or quickselect in O(n) average.
Solution
Sort and take the top k: O(nlogn).
Keep a min-heap of size k: for each element, if it beats the heap’s minimum, replace it. O(nlogk) time and O(k) memory; good for streams.
Heapify everything (O(n)) and pop k times: O(n+klogn).
Quickselect to find the k-th largest, then partition: O(n) on average.
CitadelAlgorithms
Count the pairs of elements in an array that sum to m.
Answer
Hash map of counts, O(n).
Solution
Count occurrences of each value in a hash map. For each distinct value v, add count[v]⋅count[m−v], handling v=m−v with (2count[v]) and counting each unordered pair once. Linear time. (Or single pass: for each element, add how many times m−x has been seen so far, then record x.)
CitadelAlgorithms
Given half an hour of stock prices, find the maximum profit from one buy followed by one sell (no shorting).
Answer
One pass: track the minimum price so far and the best price − minimum. O(n).
Solution
Walk forwards keeping the lowest price seen so far. At each price, the best sale today is price − minimum; keep the largest. One pass, O(n) time, O(1) memory. (Walking backwards with a running maximum works the same way.)
CitadelRegressionCorrected
In simple regression, β is the slope from regressing Y on X and β′ is the slope from regressing X on Y. Bound ββ′.
Answer
0≤ββ′≤1; in fact ββ′=ρ2.
Solution
For centred data, β=∥X∥2⟨X,Y⟩ and β′=∥Y∥2⟨X,Y⟩, so ββ′=∥X∥2∥Y∥2⟨X,Y⟩2=cos2θ=ρ2. Cauchy–Schwarz gives ⟨X,Y⟩2≤∥X∥2∥Y∥2.
Correction to the original.The original bounds the product between −1 and 1. As a squared cosine it lies in [0,1].
A sequence a1,…,an is i.i.d. with mean μ and variance σ2. Replace it by its differences a2−a1,…,an−an−1. What are the mean and variance of the new terms?
Answer
Mean 0, variance 2σ2 per term (and neighbouring differences have correlation −21).
Solution
E[ai+1−ai]=0. By independence Var(ai+1−ai)=σ2+σ2=2σ2. A detail worth adding: consecutive differences share a term, Cov(ai+1−ai,ai−ai−1)=−σ2, so they are negatively correlated. Differencing white noise creates fake mean reversion, a classic trap with price data.
X and Y are i.i.d. standard normal. What is P(Y>3X)?
Answer
1/2
Solution
Y−3X∼N(0,10) is symmetric around 0, so P(Y−3X>0)=21. Or: the joint density of (X,Y) is radially symmetric, and the line y=3x through the origin cuts it in half.
Hudson River TradingProbabilitySimulator
X and Y are i.i.d. standard normal. What is P(Y>3X∣X>0)?
Answer
arctan(1/3)/π≈0.102
Solution
Use radial symmetry: probability is proportional to angle. The condition X>0 is a half-plane (angle π). Within it, Y>3X is the wedge between the line y=3x (angle arctan3) and the positive y-axis (angle π/2), of angle π/2−arctan3=arctan31. Answer: arctan(1/3)/π.
Hudson River TradingExpected value
You note the height of the first person to walk by, then count how many more people pass before someone is taller. What is the expected count?
Answer
Infinite.
Solution
If the first person is at percentile p, each later person is taller with probability 1−p, so the expected wait is 1−p1. The percentile is Uniform(0, 1) whatever the height distribution, so the answer is ∫011−pdp=∞. The rare chance that the first person is one of the tallest people alive makes the expectation diverge.
Hudson River TradingExpected valueSimulator
Keep adding Uniform(0, 1) draws to a running total starting at 0. What is the expected number of draws until the total exceeds 1?
Answer
e≈2.718
Solution
Let f(x) be the expected draws to exceed x (for 0≤x≤1). Then f(x)=1+∫0xf(x−t)dt=1+∫0xf(u)du, so f′=f with f(0)=1, giving f(x)=ex and f(1)=e. Alternatively: P(more than n draws needed)=P(sum of n≤1)=n!1 (the Akuna question), and E=∑n≥0n!1=e.
Two SigmaCombinatorics
1,000 bottles of wine, one poisoned. A rat that drinks any poison dies within an hour. With 10 rats and one hour, how do you find the bottle? What is the most bottles you can handle with n rats? With k hours?
Answer
Binary encoding; 2n bottles; (k+1)n with k hours.
Solution
Write each bottle’s number in binary with 10 digits; rat i drinks from every bottle whose i-th digit is 1. The set of dead rats spells out the poisoned bottle’s number. So n rats handle 210=1024, and in general 2n.
With two hours, use base 3: digit 1 means “drink in hour 1”, digit 2 “drink in hour 2”, 0 “never”. Each rat then reports one of three outcomes (dies in hour 1, dies in hour 2, survives): 3n bottles. With k hours, (k+1)n.
Two SigmaExpected valueCorrectedSimulator
Build a sequence of die rolls: on a 1, stop; on an even number, append it and continue; on a 3 or 5, throw the whole sequence away and start again. What is the expected length of the final sequence (including the 1)?
Hint
Look at one attempt. Condition on it ending in a 1 rather than a 3 or 5.
Answer
2
Solution
An attempt of length L (that is, L−1 evens then a 1) has probability (21)L−161. Attempts that end in 1 rather than 3/5 have total probability ∑L(21)L−161=31. So the kept sequence has P(L)=(21)L−161/31=(21)L: geometric with mean 2.
The tempting answer, “ignore 3 and 5, so it’s a 1-in-4 chance each roll and the length is 4”, is wrong because throwing out long sequences (which had more chances to hit a 3 or 5) biases the kept ones towards being short.
Correction to the original.The original answers 4 using that tempting argument. Conditioning correctly gives 2, as the simulation confirms.
Five RingsProbabilitySimulator
A knockout tournament randomly pairs the remaining teams each round (with a random bye if the number is odd). All teams are equally good. Teams A and B are in it. What is the probability they play each other with 8 teams? 9 teams? n teams?
Hint
They meet at most once. So the probability equals the expected number of games they play together.
Answer
2/8, 2/9, and 2/n in general.
Solution
A and B play either once or never, so P(meet) equals the expected number of A-vs-B games. A knockout with n teams has exactly n−1 games, and by symmetry each game is equally likely to be any of the (2n) pairs. By linearity:
P(meet)=(n−1)⋅(2n)1=n2.
This indicator trick (“probability = expected count of something that happens 0 or 1 times”) is worth remembering.
A drawer holds n pairs of socks labelled 1 to n. You draw two socks at a time, without replacement, until the drawer is empty. A pair is satisfactory if its labels differ by at most 1. You win if every pair is satisfactory. What is the win probability for n=3? For general n?
Hint
Drawing pairs one at a time is the same as a uniformly random pairing of all 2n socks. Look at what happens to the two socks labelled 1.
Answer
1/3 for n=3. In general Pn=2n−11Pn−1+(2n−1)(2n−3)2Pn−2, P1=P2=1.
Solution
A sock labelled 1 can only pair with another 1 or a 2. Either the two 1s are paired together (probability 2n−11), leaving the game on n−1 pairs; or both 1s are paired with the two 2s (probability (2n−1)(2n−3)2), leaving n−2 pairs. Any other pairing of the 1s eventually strands a sock. Hence the recursion.
For n=3: P3=51+152=31. Direct check: of the 15 ways to pair 112233, the winners are {11,22,33}, two ways of {11,23,23} and two ways of {12,12,33}: 5 out of 15. Next values: P4=11/105, P5=1/45.
Correction to the original.The original says 2/3 for n=3, though its own recursion gives 1/3. Exhaustive enumeration and simulation agree on 1/3.
Five RingsGames & strategyCorrected
You and the interviewer take opposite sides of the n=3 sock game at even odds, and you have $100. How much do you bet in a single round? If you can play forever, what is your betting strategy?
Answer
One round: a judgement about risk. Repeated: Kelly. The game wins with probability 1/3, so take the losing side and bet f∗=32−31=31 of your wealth each round.
Solution
Expected return per $1 on the side with win probability p at even odds is 2p−1. With p=31 for the game, you want the other side, with p=32 and edge 31.
For repeated bets, maximise long-run log wealth: the Kelly fraction is f∗=ap−bq for losing fraction a and winning fraction b of the stake. With a=b=1, f∗=32−31=31.
Correction to the original.The original uses p=2/3 for the game itself. Since the game actually wins only 1/3 of the time, the same Kelly fraction applies to the opposite side.
Paint the outside of a 3×3×3 cube red and cut it into 27 unit cubes. Pick one at random and roll it: the top face is red. What is the probability it came from a corner?
Answer
4/9
Solution
Condition on red faces, not cubes. There are 54 red faces in total (6×9). Corner cubes contribute 8×3=24 of them. Each red face is equally likely to be the one on top, so 5424=94.
You have $1 and your opponent has $2. Each game you each bet $1; you win each game with probability 2/3. You play until someone is broke. What is the probability you win?
Answer
4/7
Solution
Let Px be your win probability holding x dollars (x=0..3), with P0=0 and P3=1. Then P1=32P2 and P2=32+31P1. Substituting, P1=94+92P1, so P1=74. (Gambler’s ruin: 1−r31−r with r=q/p=21.)
SIGExpected value
A stock trades at $10. There is a 50% chance of a takeover. Without one, it goes to $5 (40%) or $0 (60%). With one, it goes to $15 (80%) or $x (20%). Ignoring the time value of money, what would you pay for the right to buy the stock at $22 once everything settles?
Hint
First find x from the current price.
Answer
$0.80
Solution
The current price is the expected value: 10=0.5(0.4⋅5)+0.5(0.8⋅15+0.2x)=1+6+0.1x, so x=30.
The call struck at 22 pays only in the $30 outcome, which has probability 0.5×0.2=0.1: worth 0.1×(30−22)=$0.80.