How Question library's process runs, as candidates and the firm describe it, and the questions candidates report, each with a worked solution. Free, no sign-up.
A large general bank of probability, statistics, brainteaser, game-theory, finance and stochastic-calculus questions, not tied to any one firm. Each one comes from an open collection of interview puzzles, rewritten in our own words with our own hints and a worked solution. Filter by topic and difficulty, and use it for volume once you have worked through the firm-reported questions.
Try each one before opening the solution. Interviewers change the numbers, so learn the method.
Easy · BrainStellar · Logic · practice question on a reported topic
An explorer walks 1 mile south, then 1 mile east, then 1 mile north, and ends up exactly where they started.
Model answer
The North Pole works: south and north are the same line of longitude, and walking east just circles the pole at a fixed distance. So the bear is a polar bear: white.
There are also infinitely many starting points near the South Pole: start 1 mile north of a circle of latitude whose circumference is 1/n miles. The southward mile takes you onto that circle, the eastward mile goes round it n times, and the northward mile brings you back. (No bears there, though.)
Easy · BrainStellar · Logic · practice question on a reported topic
Three switches outside a closed room control one light bulb inside; only one of them works. All start off. You can flip switches as often as you like, but once you open the door you can't touch them again.
What is the fewest times you need to enter the room to know which switch controls the bulb?
Answer and worked solution
Answer: 1
Key idea. Use a second property of the bulb (heat) to get three distinguishable outcomes from one visit.
Turn switch 1 on for ten minutes, then off. Turn switch 2 on and go in.
Bulb on: switch 2. Bulb off but warm: switch 1. Bulb off and cold: switch 3.
So 1 visit is enough.
Check. One visit with three distinct outcomes covers three switches exactly.
Trap. Answering 2 by treating the bulb as only on/off.
Easy · BrainStellar · Probability · practice question on a reported topic
You have 50 good and 50 rotten sweets and two boxes. You may split them between the boxes however you like (neither box empty). Then a box is chosen at random and a sweet drawn from it at random.
What is the highest possible probability of drawing a good sweet?
Answer and worked solution
Answer: 0.74747
Key idea. Make one box a guaranteed win with as few good sweets as possible, and leave the rest in the other.
Box 1: one good sweet. Box 2: 49 good and 50 rotten.
P = ½ × 1 + ½ × 49/99.
= 148/198 = 74/99 ≈ 0.747.
Check. It beats the 0.5 from splitting evenly, and it can't reach 1 because box 2 must hold the rotten sweets.
Trap. Splitting the sweets evenly between the boxes, which gives exactly 0.5.
Easy · BrainStellar · Game theory · practice question on a reported topic
100 tigers and one sheep live on an island with plenty of grass. A tiger that eats the sheep turns into a sheep itself, and can then be eaten. Tigers would like to eat the sheep, but above all want to survive. All are perfectly rational.
Model answer
The sheep survives. Work up from small cases. With 1 tiger, it eats the sheep (no one can eat it afterwards). With 2 tigers, neither eats: whoever did would become a sheep facing 1 tiger and be eaten. With 3, a tiger can eat safely, because it leaves the 2-tiger case where the new sheep survives. In general the sheep is eaten when the number of tigers is odd and survives when it's even. 100 is even, so no tiger moves.
Medium · BrainStellar · Game theory · practice question on a reported topic
A duck is in the middle of a circular pond of radius R. A fox that can't swim runs round the edge four times as fast as the duck swims. The duck can only take off from the shore.
(a) The duck swims in circles round the centre. What is the largest radius, as a fraction of R, at which it can still circle faster (in angle) than the fox?
Answer and worked solution
Answer: 0.25
Key idea. The duck wins the angular race wherever v/r > 4v/R.
v/r > 4v/R ⇔ r < R/4.
So just inside radius R/4 = 0.25R the duck can gain angle on the fox until it is directly opposite.
Check. At r = R/4 their angular speeds are equal, so it has to be strictly inside.
(b) From just inside that circle, directly opposite the fox, the duck swims straight for the shore. Up to what speed ratio (fox speed ÷ duck speed) does this escape work?
Answer and worked solution
Answer: 4.1416
Key idea. Race the duck's straight swim against the fox's half lap.
With fox speed kv, the duck can circle opposite at radius R/k, then swim (1 − 1/k)R.
Duck's time (1 − 1/k)R/v; fox's time πR/(kv).
Duck wins if k − 1 < π, i.e. k < 1 + π ≈ 4.14.
Check. k = 4 is below 4.14, so a duck facing a 4× fox escapes.
Trap. Swimming straight out from the centre: the duck needs R/v while the fox needs πR/(4v), and π/4 < 1.
Easy · BrainStellar · Logic · practice question on a reported topic
You have two cords. Each takes exactly an hour to burn from one end, but they burn unevenly, so half a cord's length doesn't mean half an hour.
(a) You light cord 1 at one end and cord 2 at both ends at the same moment. When cord 2 has burnt out, how many minutes of burning are left in cord 1?
Answer and worked solution
Answer: 30
Key idea. Two flames burn an hour's worth of cord in half the time, however unevenly it burns.
Cord 2 burns out after 30 minutes.
Cord 1 has burned for 30 minutes from one end, so 30 minutes of burning remain.
Check. Each cord holds 60 minutes of burning in total, whatever its shape.
Trap. Measuring by length, which fails because the burn rate varies.
(b) At that moment you light the other end of cord 1. How many minutes until it burns out?
Answer and worked solution
Answer: 15
Key idea. Lighting the second end halves whatever burning time remains.
30 minutes of one-end burning, now consumed from both ends: 15 minutes.
Check. Total from the start: 30 + 15 = 45 minutes, the other classic interval these cords can time.
Medium · BrainStellar · Logic · practice question on a reported topic
Temperature varies continuously over the Earth's surface.
Model answer
Take any great circle, such as the equator, and let t(θ) be the temperature at angle θ. Define f(θ) = t(θ) − t(θ + π), the difference between a point and its opposite.
Then f(π) = t(π) − t(2π) = t(π) − t(0) = −f(0). So either f(0) = 0 already, or f takes opposite signs at 0 and π. f is continuous, so by the intermediate value theorem it is zero somewhere in between. At that θ the two opposite points have exactly the same temperature.
Easy · BrainStellar · Probability · practice question on a reported topic
On a certain road the probability of at least one accident in an hour is 3/4. Assume accidents in separate stretches of time are independent and the rate is constant.
What is the probability of at least one accident in half an hour?
Answer and worked solution
Answer: 0.5
Key idea. Probabilities of "nothing happens" multiply over independent intervals.
P(no accident in an hour) = 1/4 = q².
q = 1/2, so P(at least one in half an hour) = 1 − 1/2 = 1/2.
Check. Two half-hours: 1 − (1/2)² = 3/4, as given.
Trap. Halving 3/4 to get 3/8: probabilities of "at least one" don't scale linearly.
Medium · BrainStellar · Logic · practice question on a reported topic
100 prisoners stand in a line, each wearing a red or blue hat. Each sees every hat in front of them but not their own or those behind. Starting from the back, each says "red" or "blue" aloud, and goes free if it matches their own hat. Everyone hears every answer. They can agree a plan beforehand.
How many prisoners can the best plan guarantee to free?
Answer and worked solution
Answer: 99
Key idea. The last prisoner sacrifices their guess to announce a parity; everyone else deduces their own hat.
The back prisoner says "red" if they see an even number of red hats, "blue" if odd.
Each prisoner after that counts the red hats ahead plus the red answers already given (all correct), and compares with the announced parity to find their own colour.
So 99 are guaranteed, and the first has a 50% chance.
Check. No plan can guarantee the first prisoner, who has no information about their own hat.
Trap. Pairing up prisoners, which only guarantees about half.
Easy · BrainStellar · Logic · practice question on a reported topic
At a fork in the road stand two brothers. One always tells the truth and one always lies; you don't know which is which. One road is right.
Model answer
Ask either brother: "If I asked your brother which road is right, which would he point to?" Then take the other road.
If you asked the truth-teller, he truthfully reports the liar's wrong answer. If you asked the liar, he lies about the truth-teller's right answer. Either way you hear the wrong road. (A question that routes through both of them always comes out as one lie.)
Easy · BrainStellar · Logic · practice question on a reported topic
One glass holds 100 ml of water and another 100 ml of wine. You move 10 ml of water into the wine and stir, then move 10 ml of the mixture back into the water.
How many ml of wine are now in the water glass?
Answer and worked solution
Answer: 100/11 ≈ 9.0909
Key idea. Track the wine in the 10 ml taken back.
The wine glass has 100 ml wine in 110 ml.
10 ml of it holds 10 × 100/110 = 100/11 ≈ 9.09 ml of wine.
Check. The water in the wine glass is 10 − 10 × 10/110 = 100/11 too: they are always equal.
Trap. Thinking the water glass ends up "less contaminated" because the mixture was diluted.
Easy · BrainStellar · Probability · practice question on a reported topic
Trains to the north and to the south each run every 10 minutes, but each southbound train leaves 1 minute after a northbound one. A commuter arrives at a random moment and takes whichever train comes first.
What fraction of the time does the commuter go south?
Answer and worked solution
Answer: 0.1
Key idea. The first train is the one whose departure you arrive just before.
Southbound comes first only if you arrive in the 1 minute between a northbound and the next southbound.
So P(south) = 1/10 = 0.1.
Check. Both lines run equally often, yet one is taken 9 times as often: it's the timing, not the frequency.
Trap. Answering ½ because both trains run equally often.
Medium · BrainStellar · Logic · practice question on a reported topic
Without a calculator, decide which is larger: eπ or πe.
Model answer
eπ is larger. Take the (πe)-th root of both: compare e1/e with π1/π. The function x1/x = e(ln x)/x has derivative proportional to (1 − ln x)/x², so it rises up to x = e and falls after. Its maximum is at x = e, so e1/e > π1/π, and raising both sides to the power πe gives eπ > πe.
Medium · BrainStellar · Logic · practice question on a reported topic
People stand in a circle numbered 1, 2, 3, …. Person 1 eliminates person 2, person 3 eliminates person 4, and so on round and round, each survivor eliminating the next person still standing, until one is left.
(a) With 1,024 people, which position survives?
Answer and worked solution
Answer: 1
Key idea. With 2k people every lap halves the circle and person 1 starts the next lap.
1,024 = 210: after each lap the count is still a power of two and person 1 shoots first.
Medium · BrainStellar · Logic · practice question on a reported topic
In a pitch-dark room you're handed a 52-card deck in which exactly 10 cards are face up, the rest face down. You can't see or feel which are which.
Model answer
Count off any 10 cards into a second pile and turn that whole pile over.
Say the 10 cards you took include k face-up cards. Then the big pile has 10 − k face-up cards left. Your small pile had k face up and 10 − k face down; turned over, it has 10 − k face up. Both piles now have 10 − k face-up cards, whatever k was.
Hard · BrainStellar · Logic · practice question on a reported topic
In a town of 100 couples, every wife knows which other husbands are unfaithful but not whether her own is. A wife who becomes certain her husband is unfaithful throws him out that midnight, and everyone sees. Everyone is a perfect reasoner. One day the mayor announces that at least one husband is unfaithful. Nothing happens for nine nights; on the tenth night some husbands are thrown out.
How many husbands are thrown out on the tenth night?
Answer and worked solution
Answer: 10
Key idea. Induction on the number k of unfaithful husbands: their wives all act on night k.
k = 1: his wife sees no one else, so it must be hers; she acts on night 1.
k = 2: each wife sees one. When night 1 passes quietly, she knows it isn't the one-husband case, so her own is the second; both act on night 2.
In general, k quiet nights rule out "k or fewer". Action on night 10 means 10 husbands.
Check. The announcement matters even though every wife already knew there was at least one: it makes it common knowledge.
Medium · BrainStellar · Game theory · practice question on a reported topic
You and the devil take turns putting identical coins flat on a round table, never overlapping. Whoever can't place a coin loses. You may go first.
Model answer
Put your first coin exactly in the centre. After that, whenever the devil places a coin, put yours at the point diametrically opposite it through the centre.
The position is symmetric after each of your moves, so if the devil found room, the mirror-image spot is free too (it can't overlap his new coin, since only the centre is its own mirror image, and that's taken). So you always have a move, and the devil runs out first.
Medium · BrainStellar · Combinatorics · practice question on a reported topic
One of 1,000 bottles of wine is poisoned. Poison takes three weeks to act and you have four, so you get a single round of tests: each tester can sip from any number of bottles, and after three weeks you see who has died.
What is the fewest testers that always identifies the poisoned bottle?
Answer and worked solution
Answer: 10
Key idea. Each tester gives one bit; you need enough bits to label every bottle.
n testers give 2n outcomes; you need 2n ≥ 1000.
29 = 512 is too few; 210 = 1024 is enough.
With binary labels, the set of dead testers spells out the bottle number: 10 testers.
Easy · BrainStellar · Logic · practice question on a reported topic
Three friends share everything equally. A brings 5 logs, B brings 3 and C none. They burn all 8 logs cooking a shared meal, and C pays $8 for his share of the wood.
How many of the $8 should go to A?
Answer and worked solution
Answer: 7
Key idea. Pay each supplier for the wood that went to C, not in proportion to what they brought.
Each used 8/3 logs. C's $8 buys 8/3 logs, so $3 a log.
A gave C 5 − 8/3 = 7/3 logs; B gave 3 − 8/3 = 1/3.
A gets 7/3 × 3 = $7, B gets $1.
Check. 7 + 1 = 8, and A supplied seven times as much of C's wood as B.
Trap. Splitting $5 : $3 in proportion to the logs brought.
Medium · BrainStellar · Logic · practice question on a reported topic
A hotel has rooms 1, 2, 3, … without end, and every room is full.
Model answer
One new guest: move the guest in room n to room n + 1 for every n. Room 1 is free.
Infinitely many new guests (a countable queue): move the guest in room n to room 2n. All the odd rooms are free; give the k-th newcomer room 2k − 1.
Infinitely many coaches, each with infinitely many passengers: first move existing guests to the even rooms. Then give passenger p of coach c a room by a one-to-one rule from pairs (c, p) to odd numbers, for example room 3c·5p (distinct by unique factorisation, always odd), or by walking the (c, p) grid diagonal by diagonal. Pairs of whole numbers are countable, so everyone fits.
Easy · BrainStellar · Expected value · practice question on a reported topic
You pay $1 and pick a number from 1 to 6. Three fair dice are rolled, and you're paid $1 for each die showing your number. Your $1 stake isn't returned.
What is your expected payout?
Answer and worked solution
Answer: 0.5
Key idea. The payout is the number of dice showing your number; its expectation is a sum of three equal pieces.
E = 3 × 1/6 = $0.50, so you lose 50 cents per dollar on average.
Check. Six players covering every number are paid $3 in total on every roll, $0.50 each, even if the dice are biased.
Trap. Adding up the chances of "at least one match" and forgetting that a double pays twice.
Medium · BrainStellar · Probability · practice question on a reported topic
A and B are in separate rooms. Each tosses a fair coin and then guesses the other's coin. The team wins $3 if both guesses are right, and it costs $1 to play. They can agree a strategy beforehand but can't communicate afterwards.
(a) With the best strategy, what is the probability that both guess right?
Answer and worked solution
Answer: 0.5
Key idea. Make both guesses right on the same outcomes: each guesses the other's coin matches their own.
If the coins match, both guesses are right; if not, both are wrong.
P(coins match) = ½.
Check. No strategy can beat ½: A's guess is right with probability ½ whatever she does, since B's coin is independent of everything A knows.
Trap. Answering ¼, as if the guesses had to be independent.
(b) What is the team's expected profit per game with that strategy, in dollars?
Answer and worked solution
Medium · BrainStellar · Markov chains · practice question on a reported topic
Snowflakes fall one after another. A flake is a stellar dendrite with probability 0.6 if the flake before it was one, and with probability 0.2 if it wasn't.
In the long run, what fraction of flakes are stellar dendrites?
Answer and worked solution
Answer: 1/3 ≈ 0.33333
Key idea. Stationary distribution of a two-state chain: x = px + q(1 − x), so x = q/(1 − p + q).
x = 0.6x + 0.2(1 − x) ⇒ 0.6x = 0.2.
x = 1/3.
Check. Balance: flow into "dendrite" is 0.2 × 2/3 and flow out is 0.4 × 1/3, both 2/15.
Trap. Averaging 0.6 and 0.2 to get 0.4, ignoring how long the chain stays in each state.
Hard · BrainStellar · Game theory · practice question on a reported topic
A city has 66 people, the king included, each paid $1. The king (who can't vote) proposes new whole-dollar salaries summing to $66. Each citizen votes yes if their pay goes up, no if it goes down, and abstains otherwise; a plan passes if yes votes outnumber no votes. The king can propose plan after plan.
What is the most the king can end up paid?
Answer and worked solution
Answer: 63
Key idea. Repeatedly raise a bare majority of the paid citizens and zero the rest, then outvote the last few rich ones with $1 bribes to paupers.
Give 33 voters $2 and everyone else (the king too) $0: 33 yes, 32 no.
Then concentrate the $66 in 17 of those 33 (17 yes, 16 no), then 9, 5, 3 and 2 people.
Finally take the money from those 2, give $1 to each of 3 paupers and keep $63: 3 yes, 2 no. The king ends with $63.
Check. Each step passes because the winners outnumber the losers by one.
Easy · BrainStellar · Combinatorics · practice question on a reported topic
At a party of n ≥ 2 people, some pairs are friends (friendship is mutual).
Model answer
Each person has between 0 and n − 1 friends: n possible counts. But 0 and n − 1 can't both occur, since someone friends with everyone means no one has zero friends. So at most n − 1 different counts are used by n people, and by the pigeonhole principle two people have the same number of friends.
Medium · BrainStellar · Expected value · practice question on a reported topic
A monkey rolls a fair die and eats that many bananas, except that on a 6 it eats 5 bananas and rolls again (and so on, as long as it keeps rolling 6s).
What is the expected number of bananas eaten?
Answer and worked solution
Answer: 4
Key idea. Condition on the first roll: a 6 restarts the same game after 5 bananas.
E = 15/6 + (5 + E)/6.
(5/6)E = 20/6, so E = 4.
Check. Each roll is a 6 with probability 1/6, so there are 6/5 rolls on average.
Medium · BrainStellar · Probability · practice question on a reported topic
A knockout chess tournament has 16 players of distinct strengths; the stronger player always wins. In every round the remaining players are paired at random.
What is the probability that the two strongest players meet in the final?
Answer and worked solution
Answer: 8/15 ≈ 0.53333
Key idea. They reach the final together unless the random pairing matches them earlier.
Hard · BrainStellar · Logic · practice question on a reported topic
N people each get a hat with a number from 0 to N − 1 (repeats allowed). Each sees everyone else's number but not their own, and all guess their own number at the same moment. They may agree a plan beforehand.
Model answer
Number the people 0 to N − 1. Person i assumes the total of all hats is congruent to i (mod N) and guesses whatever number would make that true: (i − sum of the hats they see) mod N.
The real total is congruent to exactly one value m mod N, so person m's assumption is right and their guess is correct. Everyone else is wrong, but exactly one person is always right, which is all the plan needs.
Medium · BrainStellar · Logic · practice question on a reported topic
I think of three positive whole numbers x, y and z. You may ask twice for the value of ax + by + cz with integers a, b, c of your choice (the second choice can depend on the first answer).
Model answer
First ask for x + y + z (a = b = c = 1). Each number is at most that total, so it has at most d digits, where d is the number of digits of the total.
Then ask with (a, b, c) = (1, 10d, 102d). The answer is x + y·10d + z·102d: the last d digits are x, the next d are y and the rest are z, with no carrying because each is under 10d.
Easy · BrainStellar · Logic · practice question on a reported topic
Two opposite corners are cut from an 8 × 8 chessboard, leaving 62 squares.
Model answer
It can't be covered by 31 dominoes. Opposite corners are the same colour, so the board now has 32 squares of one colour and 30 of the other. Every domino covers one black and one white square, so 31 dominoes cover 31 of each. 30 ≠ 32, so no tiling exists.
Medium · BrainStellar · Logic · practice question on a reported topic
A hat holds 13 apples, 15 bananas and 17 cherries. When two different fruits collide they both turn into the third kind (an apple and a banana become two cherries, and so on).
Model answer
No sequence of collisions leaves only one kind of fruit. Look at the differences between the counts modulo 3. A collision changes two counts by −1 and the third by +2, so every difference between two counts changes by 0 or ±3: the differences mod 3 never change.
At the start, apples − bananas = −2, bananas − cherries = −2 and apples − cherries = −4: none is divisible by 3. If all 45 fruits were one kind, two of the counts would be 0 and their difference 0, which is divisible by 3. So that state can't be reached.
Hard · BrainStellar · Combinatorics · practice question on a reported topic
Every point with whole-number coordinates in the plane is coloured black or white.
Model answer
Yes, there is always a rectangle with sides parallel to the axes and four corners of the same colour. Look at the three rows y = 0, 1, 2. Each column contributes a pattern of three colours, and there are only 23 = 8 patterns. So among 9 columns two have the same pattern.
In that pattern three points are coloured with two colours, so two of them match. Those two rows, in those two columns, give four corners of the same colour.
Hard · BrainStellar · Logic · practice question on a reported topic
Bulbs 1 to n stand in a circle, all on. At step t you look at bulb t (mod n): if it's on, you toggle bulb t + 1; if it's off, you do nothing. You keep going round.
Model answer
Call a state the pattern of bulbs together with your position. There are finitely many states, so some state repeats. Each step is reversible: from a state you can work out the one before it (go back one position; whether bulb t + 1 was toggled depends on bulb t, which this step didn't change). So the process is a permutation of a finite set, and every state lies on a cycle. The starting state (all on, position 1) therefore comes round again: eventually all the bulbs are on again.
Medium · BrainStellar · Logic · practice question on a reported topic
100 zombies stand a unit apart on a line, all walking at the same speed. The 50 on the left walk right and the 50 on the right walk left. When two meet, both turn round.
How many collisions happen in total?
Answer and worked solution
Answer: 2500
Key idea. Pretend they pass through each other: the collisions are the crossings of right-walkers with left-walkers to their right.
Each of the 50 right-walkers meets all 50 left-walkers.
50 × 50 = 2,500 collisions.
Check. In general, add up, over each right-walker, the number of left-walkers to its right.
Trap. Tracking individual zombies as they bounce, which is hopeless.
Hard · BrainStellar · Logic · practice question on a reported topic
On an n × n board a square becomes infected when at least two of its four neighbours are infected.
Model answer
Track the perimeter of the infected region (the number of edges between infected and healthy squares, including the board's edge). When a square is infected because at least two neighbours are, at least two of its edges stop being boundary and at most two new ones appear, so the perimeter never increases.
Fewer than n infected squares start with perimeter at most 4(n − 1) < 4n, but the whole board has perimeter 4n. So fewer than n starting squares can never infect the whole board.
Hard · BrainStellar · Expected value · practice question on a reported topic
A postman puts one letter in each of two empty boxes. Each further letter goes into a box chosen with probability proportional to the letters already in it. He delivers 10 letters in total.
What is the expected number of letters in the emptier box?
Answer and worked solution
Answer: 25/9 ≈ 2.7778
Key idea. In a Pólya urn starting from (1, 1), box 1's count is uniform on 1 to n − 1.
Medium · BrainStellar · Expected value · practice question on a reported topic
A widget is worth V to its owner, uniform between $0 and $100 as far as you know. It's worth 1.8V to you. You make one offer x; the owner sells if x is more than V.
(a) What is your expected profit if you offer $50?
Answer and worked solution
Answer: -2.5
Key idea. Winning tells you V is low: you only buy widgets worth less than your bid.
P(win) = 1/2 and E[V | win] = 25, worth 45 to you.
Expected profit = ½ × (45 − 50) = −$2.50.
Check. For any offer x the expected profit is (x/100)(0.9x − x) < 0.
Trap. Using the unconditional average V = 50, worth 90 to you.
(b) What offer maximises your expected profit?
Answer and worked solution
Answer: 0
Key idea. Adverse selection: whatever you offer, the widgets you win are worth less than you paid on average.
Expected profit = (x/100)(0.9x − x) = −0.001x², which is negative for every x > 0.
So the best offer is $0: don't bid.
Check. The 80% advantage would need to exceed 100% for any bid to pay.
Easy · BrainStellar · Probability · practice question on a reported topic
A consistent archer fires three arrows; their distances from the centre are independent and identically distributed. You're told the first was closer than the second.
What is the probability that the third is the closest of the three?
Answer and worked solution
Answer: 1/3 ≈ 0.33333
Key idea. Symmetry: all 3! orderings are equally likely; condition by keeping half of them.
Orderings with 1 before 2: (1, 2, 3), (1, 3, 2), (3, 1, 2).
Shot 3 is best in one of the three: 1/3.
Check. The information about shots 1 and 2 says nothing about shot 3's rank against them.
Trap. Answering ½ by thinking it's now a race between shots 1 and 3.
Medium · BrainStellar · Logic · practice question on a reported topic
Both hands of a clock start at 12. The minute hand goes clockwise round 5 times (at varying speeds) while the hour hand goes anticlockwise round 4 times, and both end back at 12 together.
How many times do the hands pass each other, not counting the start and end?
Answer and worked solution
Answer: 8
Key idea. In the minute hand's frame the hour hand makes 9 laps, meeting it once per lap.
9 meetings including the one at the very end.
Excluding it: 8.
Check. Varying speeds don't matter: only the total relative angle counts.
Trap. Answering 1 (= 5 − 4), as if both turned the same way.
Hard · BrainStellar · Logic · practice question on a reported topic
Children sit in a circle, each with an even number of sweets. On each whistle every child passes half their sweets to the child on their left; then anyone with an odd number gets one more from the teacher.
Model answer
Let M be the largest holding. After a whistle a child has half their own sweets plus half their neighbour's, so at most M, and topping up an odd number stays at most M because M is even. The maximum never rises.
The minimum m never falls, and any child holding m whose right-hand neighbour holds more ends the round with more than m. So each round the run of children holding the minimum shrinks, until the minimum itself rises. The minimum can't rise past the maximum, and the teacher adds sweets each time, so this can't go on forever: eventually everyone has the same number.
Hard · BrainStellar · Logic · practice question on a reported topic
100 coins of radius 1 lie on a rectangular table without overlapping, and no further coin can be added without overlapping.
Model answer
Every point of the table is within distance 2 of some coin's centre: otherwise a radius-1 coin could be placed there without overlapping. So coins of radius 2 on the same 100 centres cover the table.
Now shrink by a factor of 2: the table becomes four half-size copies arranged in a 2 × 2 grid. Cover each quarter with the halved arrangement of radius-1 coins: 4 × 100 = 400 coins of radius 1 cover the original table.
Hard · BrainStellar · Logic · practice question on a reported topic
Four coins sit at the corners of a unit square. A move reflects one coin through another (the "jumper" lands on the far side of the "mirror", the same distance away).
Model answer
You can't make a 2 × 2 square. Every move keeps all coins on points with whole-number coordinates (a reflection of a lattice point through a lattice point is a lattice point). Moves are also reversible. So if a 1 × 1 square could grow into a 2 × 2 square, reversing the moves would shrink a 2 × 2 square into a 1 × 1 one, and repeating would shrink a 1 × 1 square into a ½ × ½ square, which needs points off the integer lattice. Contradiction.
Hard · BrainStellar · Expected value · practice question on a reported topic
A bowl holds a number of noodles. You repeatedly pick two free ends at random (every free end equally likely) and tie them together, until no free ends remain.
(a) With 100 noodles, what is the expected number of loops?
Answer and worked solution
Answer: 3.2843
Key idea. Each tie closes a loop with probability 1/(2k − 1) when k pieces remain; use linearity.
E[loops] = 1/1 + 1/3 + 1/5 + … + 1/199.
That sum is about 3.28.
Check. It grows like ½ ln N, so even a million noodles give only about 8 loops.
(b) With 3 noodles, what is the probability of ending with a single loop through all of them?
Answer and worked solution
Answer: 8/15 ≈ 0.53333
Key idea. Every tie except the last must join two different pieces.
k = 3: 4/5. k = 2: 2/3.
P = 4/5 × 2/3 = 8/15.
Check. The last tie always closes the loop, so it isn't in the product.
Hard · BrainStellar · Probability · practice question on a reported topic
A jar holds 10 red, 20 blue and 30 green candies. You take them out one at a time at random.
What is the probability that, at the moment the last red candy comes out, at least one blue and one green are still in the jar?
Answer and worked solution
Answer: 7/12 ≈ 0.58333
Key idea. Condition on which colour is last overall; then compare the other two colours.
Green last (30/60): need the last of the 30 red-and-blue candies to be blue: 20/30.
Blue last (20/60): need the last of the 40 red-and-green to be green: 30/40.
P = ½ × 2/3 + ⅓ × ¾ = 1/3 + 1/4 = 7/12.
Check. If red were last overall the event fails, and that has probability 1/6; 7/12 is well below 5/6.
Hard · BrainStellar · Game theory · practice question on a reported topic
A plane sees an invisible submarine's position once. The submarine then moves in a straight line at constant speed v in an unknown direction. The plane flies at 2v and catches the submarine if it is ever directly above it.
Model answer
After time t the submarine is somewhere on a circle of radius vt round its starting point. The plane first flies towards that point until it is on the expanding circle: starting distance d away, it meets the circle at distance d/3 from the point (it covers 2d/3 while the circle grows to d/3).
Then it spirals outwards, staying on the circle (its radial speed matches v, the rest of its speed 2v goes round). Within one full turn it passes over every direction, so it is above the submarine at some point. The spiral is logarithmic, r(θ) = (d/3)·eθ/√3, so it is caught by the time the circle's radius is (d/3)·e2π/√3.
Hard · BrainStellar · Logic · practice question on a reported topic
A spy starts at an unknown integer A on a line and moves B units each second (B an unknown integer, possibly negative). At each second you may ask "is the spy at position x?".
Model answer
At time n the spy is at A + Bn. The pair (A, B) is one of countably many integer pairs, so list them all: (0, 0), (1, 0), (0, 1), (−1, 0), … walking outwards. At time n, take the n-th pair (a, b) on the list and ask whether the spy is at a + bn. When n reaches the position of the true (A, B) on the list, you ask exactly the right place. Every pair appears eventually, so the spy is caught in finite time.
Hard · BrainStellar · Logic · practice question on a reported topic
You have N = 2k coins that look alike. Some are heavy gold, the rest light fakes. You have a two-pan balance and want to know how many are gold.
Model answer
About k(k + 1)/2 = O((log N)²) weighings suffice. The key step: split any group of 2m coins into two halves whose number of gold coins differ by at most one, using O(m) weighings (for example, start with two halves, weigh them, and swap coins between them in a binary search until the pans balance or differ by one coin). Recurse on one half: knowing whether the halves balanced and the count in one half gives the count in the whole. That is T(N) = T(N/2) + O(log N), so O(log² N) in total.
Hard · BrainStellar · Logic · practice question on a reported topic
Among N agents fewer than half are traitors. You may ask agent i whether agent j is honest; honest agents always answer truthfully, traitors may say anything.
Model answer
Use a chain (like finding a majority element). Keep a current candidate and a chain of people vouched for in sequence. Ask the last person in the chain about the next agent: if they say "honest", extend the chain; if "traitor", drop both of them (at least one is a traitor, so honest people remain a majority among the rest). When everyone has been processed, the last person in the surviving chain is honest: honest agents are a strict majority, so they can't all be cancelled, and anyone vouched for by an honest person is honest.
This uses at most N − 1 questions. If traitors were half or more, no strategy could work, since they could mimic the honest agents.
Hard · BrainStellar · Combinatorics · practice question on a reported topic
Five people want a safe that any 3 of them can open together but no 2 can. They fit several locks (all must be opened), each with keys that open only that lock.
(a) What is the fewest locks needed?
Answer and worked solution
Answer: 10
Key idea. Each pair needs its own lock whose keys are held by exactly the other three.
Two pairs can't share a lock: together they involve at least 3 people, one of whom would need the key.
So one lock per pair: C(5, 2) = 10 locks.
Check. Any 3 people can open every lock, because only the 2 people of that lock's pair lack its key.
(b) How many keys does each person carry?
Answer and worked solution
Medium · BrainStellar · Logic · practice question on a reported topic
Petrol stations round a circular road hold, between them, exactly enough fuel to drive once round.
Model answer
Imagine driving round once starting anywhere, allowed to have negative fuel, and plot the tank level. Over the full lap the level returns to its starting value (total fuel = total distance). Start at the station where this imaginary level is lowest. From there the level never drops below its starting value of zero, so with a real empty tank you never run out.
Hard · BrainStellar · Logic · practice question on a reported topic
Can 53 bricks of size 1 × 1 × 4 be packed into a 6 × 6 × 6 box (faces parallel to the box)?
Model answer
No. Split the box into 27 cubes of size 2 × 2 × 2 and colour them in a 3D chessboard pattern: 14 of one colour and 13 of the other. Along any axis-parallel line the 2-cubes alternate colour, so a 1 × 1 × 4 brick always covers 2 unit cells of each colour (2 + 2, or 1 + 2 + 1 across three cubes). The colour with only 13 cubes has 13 × 8 = 104 unit cells, so at most 104/2 = 52 bricks fit. 53 is impossible.
Hard · BrainStellar · Logic · practice question on a reported topic
A finite sequence of real numbers has every 8 consecutive terms summing to a positive number and every 5 consecutive terms summing to a negative number.
What is the longest such a sequence can be?
Answer and worked solution
Answer: 11
Key idea. A double-counting grid shows 12 is impossible; 11 can be achieved.
With 12 terms, arrange the eight 5-sums starting at positions 1–8 as rows; the columns are the five 8-sums starting at 1–5.
Total by rows is negative, by columns positive: contradiction.
So at most 11, and 11 is possible (e.g. 1 at positions 1, 3, 4, 6, 8, 9, 11 and −1.6 elsewhere).
Check. In general the bound is a + b − 2 = 8 + 5 − 2 = 11.
Hard · BrainStellar · Game theory · practice question on a reported topic
The numbers 1 to N are written down. Players take turns choosing a remaining number and crossing out it and all its divisors. Whoever crosses out the last number wins.
Model answer
The first player always has a winning strategy (for N ≥ 2), by strategy stealing. The game is finite with no draws, so one player has a winning strategy. Suppose the second player did. Let the first player cross out just the number 1. If the second player's winning reply is some number x, the first player could instead have played x at the start: crossing out x also crosses out 1, giving exactly the same position. Then the first player can follow the second player's winning strategy. Contradiction, so the first player wins. (The argument doesn't say what the winning moves are.)
Hard · BrainStellar · Statistics · practice question on a reported topic
A country is split into clans. 1,000 people chosen at random each report the size of their own clan. You want the average clan size.
Model answer
The plain average of the reports is biased upwards: a clan of size n is n times as likely to be sampled as a clan of size 1 (size-biased sampling). Weight each report by 1/n to undo this. The estimate is the harmonic mean of the reported sizes:
average clan size ≈ (number of respondents) ÷ Σ (1/ni) over respondents.
Each respondent stands for 1/n of a clan, so Σ 1/ni estimates the number of clans sampled and 1,000 divided by it estimates people per clan.
Hard · BrainStellar · Logic · practice question on a reported topic
Countably many prisoners stand in a line, each seeing all the hats in front of them (red or blue) but none behind, and hearing nothing. Each must guess their own hat. They may agree a plan beforehand.
Model answer
Call two infinite red/blue sequences equivalent if they differ in only finitely many places. Before the line-up, the prisoners use the axiom of choice to pick one representative sequence from each equivalence class.
Each prisoner sees all but finitely many hats, so they know which class the actual sequence is in, and therefore its agreed representative. Each guesses the colour that representative has in their own position. The actual sequence differs from the representative in only finitely many places, so only finitely many prisoners guess wrong.
(It's a non-constructive plan, which is why it needs the axiom of choice.)
Easy · BrainStellar · Probability · practice question on a reported topic
Three bullets sit in adjacent chambers of a six-chamber revolver. The cylinder is spun, the trigger pulled, and it clicks: empty. The gun is handed to you.
(a) If the cylinder simply advances one chamber, what is your chance of a bullet?
Answer and worked solution
Answer: 1/3 ≈ 0.33333
Key idea. Condition on which empty chamber clicked; only one of them is followed by a bullet.
Empty chambers E1, E2, E3 come before the block of bullets B1, B2, B3.
Only after E3 does a bullet follow: 1/3.
Check. With the bullets adjacent, the empties are adjacent too, which is what keeps this low.
(b) If the cylinder is spun again first?
Answer and worked solution
Answer: 0.5
Key idea. A spin resets everything.
3/6 = ½, worse than not spinning.
Check. Not spinning: 1/3. Spinning: 1/2. Don't spin.
Hard · BrainStellar · Game theory · practice question on a reported topic
Seven pirates of strict seniority split 100 coins. The most senior proposes a split, everyone votes (the proposer too), and it passes with at least half the votes; otherwise the proposer is thrown overboard and the next one proposes. Pirates are rational, want coins most, and otherwise enjoy throwing people overboard.
How many coins does the most senior pirate keep?
Answer and worked solution
Answer: 97
Key idea. Backward induction: buy the votes of the pirates who'd get nothing if you died.
Medium · BrainStellar · Conditional probability · practice question on a reported topic
A car is behind one of four doors. You pick one. The host, who knows where the car is, opens one of the other doors that hides a goat. You then switch to one of the two remaining closed doors, chosen at random.
What is your probability of winning the car?
Answer and worked solution
Answer: 0.375
Key idea. Your original door keeps its 1/4; the other two closed doors share 3/4 equally.
Each other closed door has probability 3/8.
Switching to either one wins with probability 3/8.
Check. 3/8 beats staying (1/4), as in the three-door game.
Trap. Thinking the three closed doors are now equally likely (1/3 each).
Medium · BrainStellar · Expected value · practice question on a reported topic
A coin lands heads with probability 0.8. To get a fair result you toss it in pairs: HT means "you", TH means "me", and HH or TT means toss another pair.
What is the expected total number of tosses?
Answer and worked solution
Answer: 6.25
Key idea. Pairs until success are geometric with success probability 2p(1 − p).
2 × 0.8 × 0.2 = 0.32, so 1/0.32 = 3.125 pairs on average.
Tosses = 2 × 3.125 = 6.25.
Check. The formula 1/(p(1 − p)) gives 1/0.16 = 6.25.
Hard · BrainStellar · Combinatorics · practice question on a reported topic
You have three identical eggs and a 100-floor building. An egg breaks when dropped from floor f or higher and survives below that. You want to find f for certain.
What is the fewest drops that guarantees finding f?
Answer and worked solution
Answer: 9
Key idea. With d drops and 3 eggs you can cover C(d, 1) + C(d, 2) + C(d, 3) floors.
d = 8: 8 + 28 + 56 = 92, too few.
d = 9: 9 + 36 + 84 = 129 ≥ 100.
So 9 drops.
Check. Two eggs need 14 drops; the third egg saves 5.
Hard · BrainStellar · Conditional probability · practice question on a reported topic
A family has two children. You learn that at least one of them is a boy born on a Tuesday. Each child is a boy or girl with probability ½ and born on any weekday with probability 1/7, independently.
What is the probability that both are boys?
Answer and worked solution
Answer: 13/27 ≈ 0.48148
Key idea. Count equally likely (sex, day) pairs.
Pairs with at least one Tuesday boy: 14 + 14 − 1 = 27.
Of those, both boys: 7 + 7 − 1 = 13.
P = 13/27 ≈ 0.48.
Check. The extra detail moves the answer from 1/3 towards 1/2: the more specific the fact, the closer it gets to identifying one child.
Trap. Saying the weekday is irrelevant and answering 1/3.
Hard · BrainStellar · Probability · practice question on a reported topic
100 passengers board a plane in seat order. The first sits in a random seat; everyone else takes their own seat if it's free and a random free seat if not.
What is the probability that passenger 99 gets their own seat?
Answer and worked solution
Answer: 2/3 ≈ 0.66667
Key idea. Among the "critical" seats (1, 99, 100), each random choice is symmetric.
The first of seats 1, 99, 100 to be taken is equally likely to be any of them.
If it's 99, passenger 99 is displaced; otherwise they sit in their own seat.
P = 2/3.
Check. For the last passenger the same argument gives 1/2.
Hard · BrainStellar · Logic · practice question on a reported topic
100 prisoners in a line each wear a hat in one of 10 colours. Each sees all the hats in front, none behind. From the back, each names a colour aloud, and goes free if it matches their own. Everyone hears every answer.
How many can a plan guarantee to free?
Answer and worked solution
Answer: 99
Key idea. The back prisoner announces the total of the other hats mod 10; everyone else deduces their own.
Each later prisoner subtracts the hats they see and the colours already called (all correct) from the announced total, mod 10.
What's left is their own colour: 99 guaranteed.
Check. It works for any number of colours: use the sum modulo the number of colours.
Medium · EigenPrep · Conditional probability · practice question on a reported topic
There are 10 doors and one prize. You pick a door; the host, who knows where the prize is, opens 3 other doors with no prize. You switch to one of the 6 other closed doors at random.
What is your chance of winning?
Answer and worked solution
Answer: 0.15
Key idea. The opened doors' probability flows to the other closed doors, not to yours.
Each of the 6 other closed doors has 9/10 ÷ 6 = 0.15.
Switching wins with probability 0.15, against 0.1 for staying.
Check. With 3 doors and one opened this gives the familiar 2/3.
Medium · EigenPrep · Optimal stopping · practice question on a reported topic
Four candidates arrive in random order. After each interview you must hire or reject on the spot, and you want the best of the four.
With the best rule (reject the first r, then take the first one better than all before), what is the probability of hiring the best?
Answer and worked solution
Answer: 11/24 ≈ 0.45833
Key idea. Compute P(r) = (r/4)(1/r + … + 1/3) for each cutoff.
r = 1: ¼(1 + ½ + ⅓) = 11/24. r = 2: ½(½ + ⅓) = 5/12.
r = 1 is best: 11/24 ≈ 0.458.
Check. For large n the best cutoff is n/e and the success probability tends to 1/e ≈ 0.37.
Easy · EigenPrep · Probability · practice question on a reported topic
Each round, player 1 succeeds with probability ½ and player 2 with probability ⅓, independently. The first to succeed wins; if both succeed in the same round, player 1 wins.
What is the probability player 1 wins?
Answer and worked solution
Answer: 0.75
Key idea. Only the deciding round matters.
P(round decides) = 1 − ½ × ⅔ = ⅔. P(player 1 succeeds in it) = ½.
Medium · EigenPrep · Logic · practice question on a reported topic
Two generals must attack at the same time to win. They can only communicate by messengers who may be captured, and neither will attack without being sure the other will.
Model answer
No protocol guarantees coordination. Suppose some protocol always works, and take a run with the fewest messages that ends in both attacking. Its last message might have been lost; the sender can't tell, so they act the same either way, and the receiver then lacks it. The protocol must still lead both to attack without that message, which gives a shorter successful run. Contradiction. In practice systems accept a small risk (acknowledgements, timeouts), which is why distributed systems settle for probabilistic or eventual agreement.
Hard · EigenPrep · Expected value · practice question on a reported topic
Customers arrive one at a time. The first sits at a new table. Customer i + 1 sits at a new table with probability 1/(i + 1), otherwise at an occupied table (in proportion to how full it is).
What is the expected number of tables after 10 customers?
Answer and worked solution
Hard · EigenPrep · Combinatorics · practice question on a reported topic
Three cars arrive one at a time at three spaces in a row. Each car has a preferred space and takes the first free space at or after it; if none is free it leaves. A list of preferences is a "parking function" if all three cars park.
How many of the 27 preference lists are parking functions?
Answer and worked solution
Medium · EigenPrep · Expected value · practice question on a reported topic
You have $63 and bet on a fair coin: $1, and after each loss double the bet (2, 4, 8, …), stopping at your first win. You can afford 6 losses in a row ($1 + $2 + … + $32 = $63).
(a) What is the probability you finish $1 up?
Answer and worked solution
Answer: 0.98438
Key idea. You win a cycle unless the first six bets all lose.
1 − (½)6 = 63/64.
Check. High chance of a small win…
(b) What is your expected profit?
Answer and worked solution
Answer: 0
Key idea. A fair game stays fair whatever the betting system.
63/64 × 1 − 1/64 × 63 = 0.
Check. Optional stopping: a bounded betting system can't beat a martingale.
Trap. Thinking the 63/64 win rate makes it profitable.
Hard · EigenPrep · Combinatorics · practice question on a reported topic
Each face of a cube is painted one of three colours, using each colour on exactly two faces. Two cubes are the same if one can be rotated to look like the other.
How many different cubes are there?
Answer and worked solution
Answer: 6
Key idea. Case by the number of colours painted on opposite faces.
All three opposite: 1. Exactly one opposite: 3 (which colour). None opposite: 2 (mirror images).
Total 6.
Check. Burnside over the 24 rotations: the identity fixes all 90 colourings, each of the 3 face half-turns fixes 6, each of the 6 edge half-turns fixes 6, the rest fix none: (90 + 18 + 36)/24 = 6.
Trap. Answering 3 by treating colours as interchangeable.
Hard · EigenPrep · Probability · practice question on a reported topic
4 prisoners numbered 1–4; 4 boxes hold their numbers in random order. Each may open 2 boxes, starting with the box of their own number and then opening the box named by the slip inside. All go free if everyone finds their number.
What is the probability they all go free?
Answer and worked solution
Answer: 5/12 ≈ 0.41667
Key idea. Success ⇔ every cycle has length ≤ 2.
Identity 1, one swap 6, two swaps 3: 10 permutations.
10/24 = 5/12 ≈ 0.42, against (½)4 = 1/16 with random choices.
Check. With 100 prisoners and 50 boxes each, the same strategy works about 31% of the time.
Medium · EigenPrep · Logic · practice question on a reported topic
You have a 7-minute and an 11-minute hourglass.
Model answer
Start both. When the 7 runs out (minute 7), turn it over. When the 11 runs out (minute 11), the 7 has run for 4 minutes since it was turned: turn it over again, so those 4 minutes run back. It empties at minute 15.
(Alternatively: start both; when the 7 empties, start timing; the 11 has 4 minutes left; then turn the 11 over for 11 more: 4 + 11 = 15.)
Medium · EigenPrep · Probability · practice question on a reported topic
A six-shot revolver has bullets in two adjacent chambers. The cylinder is spun once; then players A and B alternately pull the trigger (A first), without spinning again, until someone is shot.
What is the probability A survives?
Answer and worked solution
Answer: 1/3 ≈ 0.33333
Key idea. List the six starting positions and who meets the first bullet.
Bullet on shot 1 (two starts), shot 2, shot 3, shot 4, shot 5: one start each.
B is hit on shots 2 and 4: 2 starts out of 6.
P(A survives) = 1/3.
Check. Going first is bad here: A faces the first shot and also shots 3 and 5.
Hard · EigenPrep · Logic · practice question on a reported topic
An ant walks at 1 cm/s along a 1 m rubber band, from one end, while the far end is pulled away so the band grows by 1 m every second (stretching evenly).
The ant reaches the far end after ek − 1 seconds. What is k?
Answer and worked solution
Answer: 100
Key idea. Even stretching keeps fractions fixed; only walking moves the ant's fraction.
Fraction after T seconds: 0.01 ln(1 + T).
It reaches 1 when ln(1 + T) = 100, so T = e100 − 1: k = 100.
Check. That's about 1043 seconds, but finite.
Trap. Saying it never arrives because the band outruns it.
Hard · EigenPrep · Logic · practice question on a reported topic
Three wise men each wear a red or blue hat and can see the other two hats. They're told at least one hat is red, and asked to say their own colour as soon as they know it. All three hats are in fact red. After a long silence, one says "red".
Model answer
He reasons: if my hat were blue, each of the others would see one red and one blue. Each would think, "if mine were blue too, the third man would see two blues and immediately say red." When the third man stays silent, each of the two would conclude their own hat is red and speak quickly.
Since nobody has spoken after a long silence, his assumption must be wrong: his hat is red. The silence is the information.
Easy · EigenPrep · Game theory · practice question on a reported topic
Two people value different parts of a cake differently. They want each to feel they got at least half by their own valuation.
Model answer
I cut, you choose. The cutter divides the cake into two pieces they value equally; the chooser takes whichever piece they prefer. The chooser gets at least half by their valuation (they pick the better one), and the cutter gets exactly half by theirs whichever piece is left. Neither needs to know the other's preferences.
Medium · EigenPrep · Logic · practice question on a reported topic
You have a 5-litre and a 3-litre jug and unlimited water. A move is filling a jug, emptying it, or pouring one into the other until one is empty or the other full.
What is the fewest moves that leaves exactly 4 litres in a jug?
Answer and worked solution
Answer: 6
Key idea. Search the states (big, small); the shortest route is 6 moves.
(5,0) → (2,3) → (2,0) → (0,2) → (5,2) → (4,3).
6 moves.
Check. The other route (filling the 3 first) takes 8.
Easy · EigenPrep · Combinatorics · practice question on a reported topic
At a party some pairs of people shake hands.
Model answer
Add up, over all people, the number of hands each shook. Every handshake is counted twice (once for each person), so the total is even. The people with an even count contribute an even amount, so the odd counts must add to an even number, which needs an even number of people with odd counts. (This is the handshake lemma.)
Medium · EigenPrep · Logic · practice question on a reported topic
Can a knight visit every square of an 8 × 8 chessboard exactly once and finish a knight's move from where it started?
Model answer
Yes. Closed knight's tours exist on the 8 × 8 board (there are about 13 trillion of them, counting directions). A practical way to find one is Warnsdorff's rule: always move to the square with the fewest onward moves, which rarely gets stuck; backtracking fixes the occasional dead end. Note that a closed tour needs an even number of squares, because each knight move changes square colour.
Easy · EigenPrep · Options · practice question on a reported topic
Why does a call option's value rise when volatility rises?
Model answer
The call's payoff max(S − K, 0) is convex: big moves up add a lot, big moves down cost nothing more once the option is worthless. Spreading out the distribution of the stock price (with the same forward) therefore raises the expected payoff. Formally vega = S φ(d₁)√T > 0. The same holds for puts.
Easy · EigenPrep · Options · practice question on a reported topic
How do higher interest rates affect call and put prices?
Model answer
Calls rise, puts fall. Owning a call is like buying the stock later for K, so a higher rate lowers the present value of the strike you'll pay (K e−rT), making the call worth more; a put pays you K later, which is worth less. Equivalently, the forward S erT rises with r. The effect (rho) is largest for long-dated, in-the-money options.
Easy · EigenPrep · Options · practice question on a reported topic
Why is gamma highest for at-the-money options, especially near expiry?
Model answer
Gamma is the rate of change of delta. Deep in or out of the money, delta is stuck near 1 or 0 and barely moves. At the money, a small move in the stock swings the option between finishing in and out of the money, so delta changes fastest. Near expiry the option's payoff kinks sharply at the strike, so ATM gamma grows like 1/(σS√T).
Medium · EigenPrep · Options · practice question on a reported topic
Why do out-of-the-money equity puts usually have higher implied volatility than at-the-money options?
Model answer
Markets fall faster than they rise and crash risk is real, so returns have a fat left tail that a lognormal model understates; investors pay up for downside protection; and volatility tends to rise as prices fall (the leverage effect, and spot–vol correlation). Higher demand for puts plus a fatter left tail shows up as higher implied volatility at low strikes: the skew.
Easy · EigenPrep · Options · practice question on a reported topic
How do expected dividends affect call and put prices?
Model answer
The stock price drops by about the dividend on the ex-date, and option holders don't receive dividends. So expected dividends lower the forward price: calls are worth less and puts more. They can also make early exercise of an American call worthwhile, just before an ex-date.
Medium · EigenPrep · Options · practice question on a reported topic
When should you exercise an American call on a stock that pays no dividends before expiry?
Model answer
Never. Exercising now gives S − K. But the call is worth at least S − K e−rT > S − K (with positive rates), plus the insurance value of not owning the stock if it falls. Selling the call (or hedging by shorting the stock) is always better than exercising. With dividends, exercising just before an ex-date can be optimal.
Easy · EigenPrep · Finance · practice question on a reported topic
What is a currency carry trade, and what is its main risk?
Model answer
Borrow in a low-interest currency, convert, and invest in a high-interest currency, earning the rate difference. Uncovered interest parity says the high-yield currency should depreciate enough to cancel this on average, but empirically it often doesn't. The main risk is a sharp move in the exchange rate, typically in a risk-off crash when carry trades unwind together: steady small gains, occasional large losses.
Medium · EigenPrep · Finance · practice question on a reported topic
What determines the price of a credit default swap?
Model answer
Roughly, spread ≈ (default intensity) × (loss given default), so the main drivers are the probability of default of the reference name and the expected recovery rate. Also: maturity, interest rates for discounting, the seller's own credit (counterparty risk), liquidity, and any correlation between the reference name and the protection seller (wrong-way risk).
Easy · EigenPrep · Finance · practice question on a reported topic
What is a repo, and what is the repo rate?
Model answer
A repurchase agreement is a sale of securities with an agreement to buy them back later at a slightly higher price: in effect a secured loan with the securities as collateral. The repo rate is the implied interest rate. It's the core funding market for banks and leveraged investors and transmits central-bank policy; "special" collateral that is in demand trades at lower repo rates.
Medium · EigenPrep · Finance · practice question on a reported topic
If markets are efficient, how can an active manager add value?
Model answer
Markets are only approximately efficient, and someone must be paid to make them so (the Grossman–Stiglitz argument). Managers can add value by: being compensated for providing liquidity or bearing risks others avoid; exploiting behavioural biases and constraints of other investors (forced sellers, index rebalancing); having faster or better information processing; and managing risk, costs and taxes well. Net of fees, most don't, which is the evidence for efficiency.
Easy · EigenPrep · Finance · practice question on a reported topic
What does an inverted yield curve (short rates above long rates) usually signal?
Model answer
That markets expect rates to fall, usually because they expect the economy to weaken and the central bank to cut. Inversions (e.g. 10-year below 3-month) have preceded most US recessions, with a lag of roughly a year or two, though the term premium and quantitative easing complicate the signal.
Easy · EigenPrep · Options · practice question on a reported topic
How does theta vary with moneyness?
Model answer
Time decay is largest for at-the-money options, which hold the most time value, and it accelerates as expiry nears (roughly like 1/√T). Deep in-the-money options are mostly intrinsic value and deep out-of-the-money ones have little value left, so both decay slowly. Theta and gamma go together: long gamma means paying theta.
Medium · EigenPrep · Options · practice question on a reported topic
How does liquidity risk affect option prices?
Model answer
Illiquid options are harder to hedge and to exit, so market makers widen bid–ask spreads and charge for the inventory and model risk they carry. Prices (and implied vols) are pushed in the direction of the demand: options that are hard to hedge and in demand trade rich. Thin markets also make quotes stale and less informative.
Easy · EigenPrep · Finance · practice question on a reported topic
What are contango and backwardation in futures markets?
Model answer
Contango: futures prices above spot, rising with maturity, typical when carrying the asset costs money (storage, financing) and there's no shortage. Backwardation: futures below spot, common when a commodity is scarce now and holding it has a "convenience yield". The roll yield earned by holding futures is negative in contango and positive in backwardation.
Medium · EigenPrep · Options · practice question on a reported topic
You think realised volatility will be lower than implied. How do you trade it?
Model answer
Be short vega and short gamma: sell straddles or strangles (or sell options and delta-hedge them), so you collect the time decay implied by the high vol and pay out only the smaller realised moves. If you delta-hedge, profit ≈ ½ Γ S² (σimplied² − σrealised²) per unit time. Risks: a large jump, and implied vol rising further before you're proved right. Variance swaps give a cleaner exposure.
Medium · EigenPrep · Market making · practice question on a reported topic
What causes bid–ask spreads, and when are they wider?
Model answer
Spreads pay market makers for inventory risk, adverse selection (losing to better-informed traders) and order-processing costs. They're wider for illiquid or volatile stocks, larger trade sizes, around news and at the open and close, and when the market maker already holds a large position.
Medium · EigenPrep · Options · practice question on a reported topic
How would you price a down-and-out call by Monte Carlo?
Model answer
Simulate many risk-neutral paths of the stock (e.g. GBM with drift r), checking the barrier along each path. If a path touches the barrier the payoff is 0; otherwise it's max(ST − K, 0). Average the payoffs and discount at e−rT. Watch two issues: discrete monitoring misses crossings between time steps (use fine steps or a Brownian-bridge correction), and the standard error falls only as 1/√N, so use variance reduction (antithetic paths, control variates).
Medium · EigenPrep · Finance · practice question on a reported topic
What's the difference between expected and unexpected loss in credit risk?
Model answer
Expected loss = PD × LGD × EAD, the average loss, which should be priced into loan rates and provisioned. Unexpected loss is the variability around it (e.g. a high percentile of the loss distribution minus EL), which capital must absorb. Correlated defaults make unexpected loss much larger than diversification would suggest.
Medium · EigenPrep · Finance · practice question on a reported topic
What are risk-weighted assets in bank regulation?
Model answer
Each asset is multiplied by a risk weight reflecting its credit risk (for example government bonds near 0%, residential mortgages around 35%, unrated corporate loans 100%), and banks must hold capital of at least a set fraction of the total (for example 8% total capital, with higher common-equity buffers). Large banks may use internal models for the weights, within regulatory floors.
Medium · EigenPrep · Statistics · practice question on a reported topic
Describe a pairs-trading strategy and its main risks.
Model answer
Find two securities whose prices move together (ideally cointegrated), model the spread between them, and when the spread is unusually wide buy the cheap one and short the rich one, closing when it reverts. Risks: the relationship breaks (a merger, a fundamental change), the spread widens further before reverting (so you must size for it), crowding in the same trades, and costs and shorting constraints eating the edge. Test for cointegration out of sample rather than just correlation.
Easy · Quant interview notes · Bayes · practice question on a reported topic
State Bayes' rule and say why it comes up so often in quant interviews.
Model answer
P(A | B) = P(B | A) P(A) / P(B), where P(B) = Σ P(B | Aᵢ) P(Aᵢ) over the possible causes. It turns "how likely is the evidence under each hypothesis" into "how likely is each hypothesis given the evidence". Interviews use it for medical-test and signal questions, updating a view after a trade, and spotting base-rate mistakes: a rare cause stays fairly unlikely even after strong evidence.
Easy · Quant interview notes · Probability · practice question on a reported topic
What are the axioms of probability, and how do they help with interview problems?
Model answer
(1) P(A) ≥ 0 for every event; (2) P(Ω) = 1; (3) for disjoint events, P(⋃Aᵢ) = Σ P(Aᵢ) (countably many). Everything else follows, for example P(Aᶜ) = 1 − P(A) and inclusion–exclusion. In practice they justify the two moves you use most: split an event into disjoint cases and add, or compute the complement.
Easy · Quant interview notes · Conditional probability · practice question on a reported topic
Define conditional probability.
Model answer
P(A | B) = P(A ∩ B)/P(B) for P(B) > 0: the chance of A once you know B happened, i.e. restrict attention to the outcomes in B and rescale so they add to 1. Multiplying out gives the chain rule P(A ∩ B) = P(A | B) P(B).
Easy · Quant interview notes · Conditional probability · practice question on a reported topic
State the law of total probability and when you'd use it.
Model answer
If A₁, …, Aₙ partition the outcomes, P(B) = Σ P(B | Aᵢ) P(Aᵢ). Use it when B is easy to work out once you know which hidden case you're in (which coin was picked, which state the market is in), and as the denominator in Bayes' rule.
Easy · Quant interview notes · Probability · practice question on a reported topic
When is the Poisson distribution useful in quant finance?
Model answer
For counts of rare, independent events in a fixed window: order arrivals, trades per second, defaults in a portfolio, jumps in a price process. N ~ Poisson(λt) has mean and variance both λt, and the gaps between events are exponential. Real order flow is usually over-dispersed (variance above the mean, events clustering), which is a common follow-up.
Easy · Quant interview notes · Expected value · practice question on a reported topic
Why is linearity of expectation so useful in interviews?
Model answer
E[X + Y] = E[X] + E[Y] holds whether or not X and Y are independent. So you can write a messy count as a sum of indicator variables, find each indicator's probability (often by symmetry), and add, without ever working out the joint distribution. Fixed points of a permutation, empty bins, runs in a sequence, and expected matches all fall to this.
Easy · Quant interview notes · Statistics · practice question on a reported topic
How are variance, covariance and correlation related?
Model answer
Var(X) = E[X²] − E[X]² = Cov(X, X). Cov(X, Y) = E[XY] − E[X]E[Y] measures linear co-movement in the variables' units. Correlation rescales it to [−1, 1]: ρ = Cov(X, Y)/(σ_X σ_Y). Var(X + Y) = Var X + Var Y + 2Cov(X, Y). Zero correlation doesn't imply independence (e.g. X and X² for symmetric X).
Easy · Quant interview notes · Markov chains · practice question on a reported topic
What is the Markov property?
Model answer
The future depends on the past only through the present: P(Xn+1 = x | Xn, …, X₀) = P(Xn+1 = x | Xn). So a process is described by its current state and transition probabilities. Random walks, credit-rating transitions and many queueing models are Markov; you can often make a process Markov by adding to the state (e.g. "last two tosses").
Medium · Quant interview notes · Random walks · practice question on a reported topic
What is a stopping time, intuitively?
Model answer
A random time τ such that, at any moment, you can tell from the information so far whether it has already happened: {τ ≤ t} is known at time t. "The first time the walk hits 10" is a stopping time; "the time the walk reaches its maximum" isn't, because you'd need the future. Optional stopping (E[Mτ] = M₀ for a martingale, under conditions) works with stopping times.
Medium · Quant interview notes · Conditional probability · practice question on a reported topic
In conditional-probability puzzles, how do you tell useful information from useless information?
Model answer
Ask how the information was produced. If the way it was revealed depends on the hidden outcome (Monty knowingly opens a goat door; you were told "at least one boy" rather than meeting a random child), it changes the probabilities. If it would have been revealed the same way whatever the hidden state, it doesn't. Write down the likelihood of the observation under each hypothesis; if those are equal, the information is useless.
Easy · Quant interview notes · Expected value · practice question on a reported topic
State the law of total expectation and how it's used.
Model answer
E[X] = E[E[X | Y]]: average the conditional expectations over the cases. It's the workhorse behind "condition on the first step" recursions (dice games, waiting times, Markov chains) and behind random sums: E[X₁ + … + XN] = E[N] E[X] when N is independent of the Xs.
Medium · Quant interview notes · Bayes · practice question on a reported topic
Why do Bayesian signal-extraction questions appear in quant interviews?
Model answer
Trading is inference: a hidden state (an informed buyer, a regime, a stock's true value) shows up only through noisy signals (order flow, a forecast, an earnings beat). Interviewers want to see you set up a prior, a likelihood for the signal under each state, and update with Bayes, and that you know a weak signal should move you only a little. With normal priors and signals, the posterior mean is a precision-weighted average.
Hard · Quant interview notes · Statistics · practice question on a reported topic
For n independent draws with CDF F and density f, what is the density of the k-th smallest?
Model answer
f(k)(x) = n!/((k − 1)!(n − k)!) · F(x)k−1 · (1 − F(x))n−k · f(x). Read it as: choose which draw lands at x (density f), which k − 1 fall below x, and which n − k above. For uniforms the k-th smallest is Beta(k, n − k + 1) with mean k/(n + 1).
Medium · Quant interview notes · Statistics · practice question on a reported topic
How do you simulate correlated normal random variables (say, in Python)?
Model answer
Take the desired covariance matrix Σ and its Cholesky factor L (Σ = LLᵀ). Draw a vector Z of independent standard normals and set X = μ + LZ; then Cov(X) = L·I·Lᵀ = Σ. For two variables with correlation ρ: X₁ = Z₁, X₂ = ρZ₁ + √(1 − ρ²)Z₂. In NumPy: L = np.linalg.cholesky(S); X = Z @ L.T (or rng.multivariate_normal). Σ must be positive definite.
Medium · Quant interview notes · Probability · practice question on a reported topic
Why is "pick a random chord of a circle; what's the chance it's longer than the side of the inscribed equilateral triangle?" a trick question?
Model answer
Because "random chord" isn't defined. Pick two random points on the circle: ⅓. Pick a random radius and a random point on it as the chord's midpoint: ½. Pick a random midpoint uniformly in the disc: ¼. Each is a legitimate model and they disagree. The interviewer wants you to ask how the chord is generated before computing.
Easy · Quant interview notes · Statistics · practice question on a reported topic
What's the difference between the method of moments and maximum likelihood?
Model answer
Method of moments: set the model's first few theoretical moments equal to the sample moments and solve for the parameters; simple, but can be inefficient or give impossible values. Maximum likelihood: choose the parameters that make the observed data most probable under the model; asymptotically efficient and invariant to reparametrisation, but needs the full distribution and sometimes numerical optimisation. For many standard models (normal mean, Poisson rate) they coincide.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What does stationarity mean for a time series?
Model answer
Weak (covariance) stationarity: constant mean, finite constant variance, and autocovariance depending only on the lag, not on the date. (Strict stationarity: all joint distributions are shift-invariant.) Prices are usually non-stationary (random-walk-like); returns are closer to stationary. Stationarity matters because sample averages and fitted models only generalise if the process's properties don't drift.
Medium · Quant interview notes · Options · practice question on a reported topic
What is the key idea behind the Black–Scholes–Merton model?
Model answer
Dynamic replication. Hold the option and short Δ = ∂V/∂S shares; over an instant the random part of the stock's move cancels, so the hedged portfolio is riskless and must earn the risk-free rate. That gives the Black–Scholes PDE, in which investors' risk preferences and the stock's expected return don't appear, so the price is the risk-neutral expectation of the discounted payoff.
Easy · Quant interview notes · Options · practice question on a reported topic
What is delta?
Model answer
The sensitivity of the option's value to the underlying price, ∂V/∂S: how many shares the option behaves like. A call's delta lies between 0 and 1 (about ½ at the money in Black–Scholes, N(d₁)); a put's between −1 and 0. It's also the hedge ratio, and roughly (not exactly) the probability of finishing in the money.
Easy · Quant interview notes · Options · practice question on a reported topic
What is no-arbitrage pricing?
Model answer
If a derivative's payoff can be replicated with traded assets, its price must equal the cost of the replicating portfolio; otherwise you could buy the cheaper and sell the dearer for a riskless profit. Equivalently, prices are discounted expectations under a risk-neutral measure. Forwards, put–call parity and Black–Scholes all come from this.
Easy · Quant interview notes · Finance · practice question on a reported topic
Derive the forward price of a non-dividend stock.
Model answer
F = S₀ erT. If F were higher, borrow S₀, buy the stock, and sell the forward: at T deliver the stock for F and repay S₀erT, a riskless profit. If F were lower, short the stock, invest the proceeds, and buy the forward. So only F = S₀erT rules out arbitrage.
Medium · Quant interview notes · Options · practice question on a reported topic
State and derive put–call parity for European options on a non-dividend stock.
Model answer
C − P = S₀ − K e−rT. At expiry, a call plus K in cash (a bond paying K) is worth max(S, K); a put plus the stock is also worth max(S, K). Equal payoffs mean equal prices today: C + K e−rT = P + S₀. It holds whatever model you use, and doesn't hold for American options (where only bounds apply).
Medium · Quant interview notes · Options · practice question on a reported topic
What is risk-neutral pricing, and does it assume investors are risk-neutral?
Model answer
A derivative's price is the expected discounted payoff under a measure Q in which every traded asset's discounted price is a martingale (so all assets grow at the risk-free rate on average). It does not say investors are risk-neutral: Q is a pricing device implied by no-arbitrage, and real-world (P) expected returns and risk premia don't enter the price because the option can be hedged.
Easy · Quant interview notes · Options · practice question on a reported topic
What are the main assumptions of the Black–Scholes model?
Model answer
The stock follows geometric Brownian motion with constant volatility; a constant risk-free rate; no dividends (in the basic version); continuous trading with no transaction costs or taxes; short selling and fractional shares allowed; no arbitrage. Real markets break several (vol isn't constant, there are jumps and costs), which is why we see a volatility smile.
Easy · Quant interview notes · Options · practice question on a reported topic
What is moneyness?
Model answer
How the strike compares with the underlying: in, at or out of the money. Measured as S/K, K/S, or better K/F or ln(K/F) relative to the forward, or by delta (a "25-delta put"). Measuring against the forward allows for rates and dividends, and delta-based moneyness makes options comparable across expiries.
Easy · Quant interview notes · Options · practice question on a reported topic
What is gamma?
Model answer
∂²V/∂S², the rate of change of delta: the option's convexity. Long options have positive gamma (your delta moves with the market, so delta-hedging buys low and sells high) and pay for it with theta. Gamma is largest at the money near expiry; high gamma means hedges need frequent rebalancing.
Easy · Quant interview notes · Options · practice question on a reported topic
What is vega?
Model answer
∂V/∂σ, the change in option value per unit change in implied volatility (usually quoted per vol point). It's positive for long calls and puts, largest at the money and for longer expiries (∝ √T). ATM vega ≈ 0.4 S√T per 1.00 of vol, so about 0.004 S√T per point.
Easy · Quant interview notes · Options · practice question on a reported topic
What is theta?
Model answer
∂V/∂t, the change in an option's value as time passes with everything else fixed (usually quoted per day). Long vanilla options normally have negative theta: their optionality decays. It's the price of gamma: in Black–Scholes, Θ + ½σ²S²Γ + rSΔ − rV = 0, so long gamma means paying theta. Deep in-the-money European puts can have positive theta.
Easy · Quant interview notes · Options · practice question on a reported topic
What is rho?
Model answer
∂V/∂r, sensitivity to the risk-free rate. Calls have positive rho (a higher rate lowers the present value of the strike you'll pay), puts negative. For a Black–Scholes call, ρ = K T e−rT N(d₂). It matters most for long-dated options.
Medium · Quant interview notes · Options · practice question on a reported topic
What relationships between call and put Greeks follow from put–call parity?
Model answer
Differentiate C − P = S − K e−rT: ΔC − ΔP = 1; ΓC = ΓP; vegaC = vegaP; ΘC − ΘP = −rK e−rT; ρC − ρP = K T e−rT. Same strike and expiry, European options; with a dividend yield the delta relation becomes e−qT.
Easy · Quant interview notes · Options · practice question on a reported topic
What is implied volatility?
Model answer
The volatility that, put into Black–Scholes (or another model), reproduces an option's market price. It isn't observed or forecast directly; it's a way of quoting price. It reflects expected future volatility plus risk premia and supply and demand, and it differs by strike and expiry (the smile and term structure), which shows Black–Scholes is only an approximation.
Medium · Quant interview notes · Options · practice question on a reported topic
What are the volatility smile and skew?
Model answer
When implied vols for the same expiry are plotted against strike, they aren't flat. A smile is higher at both wings (common in FX); a skew slopes down from low strikes to high (equity indices: downside puts are dearer). They reflect fat tails, jumps, the correlation between spot and vol, and demand for protection, none of which constant-vol Black–Scholes captures.
Hard · Quant interview notes · Options · practice question on a reported topic
How does delta hedging relate to gamma and theta?
Model answer
Over a short interval, option P&L ≈ Δ dS + ½ Γ dS² + Θ dt. Delta hedging cancels the Δ dS term, leaving ½ Γ dS² + Θ dt. In Black–Scholes, Θ ≈ −½ Γ σ²implied S², so the hedged P&L ≈ ½ Γ S² (realised return² − σ²implied dt): long gamma wins when the stock moves more than the implied vol priced in, and pays theta when it doesn't.
Medium · Quant interview notes · Options · practice question on a reported topic
What is a replicating portfolio?
Model answer
A self-financing mix of traded assets (usually the underlying and cash) whose value matches the derivative's payoff in every state. If one exists, the derivative's price must equal its cost, or there's an arbitrage. In a one-step binomial model you solve two equations for the number of shares and the bond; in Black–Scholes you hold Δ shares and rebalance continuously.
Medium · Quant interview notes · Options · practice question on a reported topic
Why can an American option be worth more than a European one?
Model answer
It has every right the European option has plus the right to exercise early, so it can't be worth less. The extra is worth something when early exercise is sometimes optimal: deep in-the-money puts (getting K now earns interest), or calls just before a dividend. For calls on non-dividend stocks, early exercise is never optimal, so the American and European calls are worth the same.
Hard · Quant interview notes · Options · practice question on a reported topic
What does it mean for a market to be complete?
Model answer
Every payoff can be replicated by trading the available assets. In a complete, arbitrage-free market the risk-neutral measure is unique, so every derivative has one price (Black–Scholes and the binomial model are complete). With jumps or stochastic volatility and too few traded instruments the market is incomplete: many risk-neutral measures fit, and prices depend on extra choices (calibration to other options, risk preferences).
Medium · Quant interview notes · Options · practice question on a reported topic
What's the difference between implied and realised volatility?
Model answer
Implied volatility is backed out of option prices and is forward-looking under the pricing measure. Realised volatility is measured from actual returns over a past window. On average implied has exceeded subsequent realised (the volatility risk premium), which is why selling options earns money most of the time and loses heavily occasionally. A delta-hedged option's P&L depends on realised versus implied.
Medium · Quant interview notes · Options · practice question on a reported topic
How do you incorporate dividends into option pricing?
Model answer
With a continuous yield q, replace S by S e−qT: the forward is F = S e(r−q)T, and in Black–Scholes d₁ = (ln(S/K) + (r − q + σ²/2)T)/(σ√T), C = S e−qTN(d₁) − K e−rTN(d₂). Discrete known dividends: subtract their present value from S. Higher dividends lower calls and raise puts.
Hard · Quant interview notes · Options · practice question on a reported topic
What is an implied volatility surface?
Model answer
Implied vol as a function of strike (or moneyness/delta) and expiry. It summarises the whole option market in one object: the skew across strikes and the term structure across expiries. Traders interpolate it to price any option, risk-manage against it, and must keep it free of arbitrage (no calendar arbitrage between expiries, no butterfly arbitrage across strikes).
Medium · Quant interview notes · Options · practice question on a reported topic
What is a risk reversal?
Model answer
Long an out-of-the-money call and short an out-of-the-money put (often both 25-delta), or the reverse. As a quote it's the difference in implied vol between the call and the put, a measure of skew: in equity indices it's usually negative (downside puts dearer). As a trade it's a cheap bullish (or bearish) position with skew exposure.
Medium · Quant interview notes · Options · practice question on a reported topic
What is model risk in derivatives pricing?
Model answer
The risk that prices or hedges are wrong because the model's assumptions don't hold (constant vol, no jumps, lognormal prices), its parameters are badly estimated or calibrated, or it's implemented wrongly. Examples: pricing exotics off a flat vol, interpolating the smile badly, hedging with model deltas that ignore spot–vol correlation. Managed with model validation, reserves, stress tests and comparing models.
Medium · Quant interview notes · Options · practice question on a reported topic
What is the intuition behind the binomial option-pricing model?
Model answer
Over each small step the stock goes up or down. At expiry the payoffs are known; working backwards, each node's value is the discounted risk-neutral average of the two values after it (and, for American options, the larger of that and exercising now). Each step can be replicated with the stock and a bond, so this is no-arbitrage pricing; as the steps shrink it converges to Black–Scholes.
Easy · Quant interview notes · Finance · practice question on a reported topic
What's the difference between a forward and a futures contract?
Model answer
A forward is an over-the-counter, customised contract settled at maturity, with counterparty credit risk. A future is exchange-traded, standardised, cleared, margined and marked to market daily. Daily settlement means futures and forward prices differ slightly when interest rates are random and correlated with the underlying (the convexity adjustment).
Easy · Quant interview notes · Options · practice question on a reported topic
What are the payoffs of European calls and puts?
Model answer
Call: max(ST − K, 0). Put: max(K − ST, 0). These are payoffs at expiry, before subtracting the premium paid. A long call has unlimited upside and loses at most its premium; a short call has unlimited downside. Call minus put with the same strike pays ST − K, a forward.
Hard · Quant interview notes · Options · practice question on a reported topic
How are option prices related to the risk-neutral density?
Model answer
Breeden–Litzenberger: ∂²C/∂K² = e−rT fQ(K). The second derivative of call prices with respect to strike is the discounted risk-neutral density of ST. A butterfly approximates this derivative, and its price is the (discounted) probability of finishing near the middle strike. It's how you read the market's implied distribution off the smile.
Easy · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is standard Brownian motion?
Model answer
A process Wt with W₀ = 0, continuous paths, and independent, stationary, normally distributed increments: Wt − Ws ~ N(0, t − s). Its paths are continuous but nowhere differentiable and have quadratic variation t. It's the limit of a scaled random walk.
Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic
State Itô's lemma for a one-dimensional Itô process.
Model answer
If dX = μ dt + σ dW and f(t, x) is smooth, then df = (ft + μ fx + ½ σ² fxx) dt + σ fx dW. It's the chain rule with a second-order term, because (dX)² = σ² dt doesn't vanish. Example: for f = ln S with dS = μS dt + σS dW, d ln S = (μ − σ²/2) dt + σ dW.
Easy · Quant interview notes · Stochastic calculus · practice question on a reported topic
Why is geometric Brownian motion used in Black–Scholes?
Model answer
It models percentage (not absolute) moves, so prices stay positive and volatility scales with price; log returns are normal and independent over time; and it's simple enough to give closed-form option prices. Its weaknesses (constant vol, no jumps, thin tails) are what smiles and stochastic-vol models address.
Easy · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is a martingale?
Model answer
A process Mt with E|Mt| < ∞ and E[Mt | Fs] = Ms for s ≤ t: given everything known now, the best forecast of any future value is the current value. A fair game. Examples: a symmetric random walk, Brownian motion, Wt² − t, and discounted asset prices under the risk-neutral measure.
Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic
Why are discounted asset prices martingales under the risk-neutral measure?
Model answer
That's what defines Q: a measure equivalent to P under which every traded asset earns the risk-free rate on average, so e−rtSt has no drift. The fundamental theorem of asset pricing says such a measure exists exactly when there's no arbitrage. Then any replicable claim's discounted value is a martingale too, so its price is e−rTEQ[payoff].
Hard · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is the intuition behind Girsanov's theorem?
Model answer
Changing probability measure (reweighting paths) changes a Brownian motion's drift but not its volatility. Under the new measure, W̃t = Wt + θt is a Brownian motion, with the weights given by an exponential martingale. In Black–Scholes, with θ = (μ − r)/σ, the stock's drift changes from μ to r while σ stays the same, which is why volatility matters for prices and μ doesn't.
Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is the key idea behind the Itô integral?
Model answer
∫ H dW is the limit of sums Σ H(ti)(W(ti+1) − W(ti)) with the integrand evaluated at the left end of each interval, so H can't peek at the move it multiplies. That makes it the gains from a trading strategy that decides holdings before the price moves, and makes the integral a martingale with mean 0.
Hard · Quant interview notes · Stochastic calculus · practice question on a reported topic
What does the Feynman–Kac theorem say in option pricing?
Model answer
The solution of a parabolic PDE such as the Black–Scholes equation Vt + rSVS + ½σ²S²VSS − rV = 0 with terminal value V(T, S) = payoff can be written as an expectation: V(t, S) = EQ[e−r(T−t) payoff | St = S], where under Q the stock grows at r. It links the PDE (hedging) view and the risk-neutral expectation (Monte Carlo) view.
Hard · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is the optional stopping theorem, and when can it fail?
Model answer
For a martingale M and a stopping time τ, E[Mτ] = M₀, provided something keeps things bounded: τ bounded, or M stopped at τ bounded, or E[τ] < ∞ with bounded increments. It fails without such conditions: "bet on a fair coin until you're $1 ahead" stops with probability 1 at +1, so E[Mτ] = 1 ≠ 0, because E[τ] is infinite and losses along the way are unbounded.
Easy · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is a filtration, and what does it mean for a process to be adapted?
Model answer
A filtration (Ft) is an increasing family of σ-algebras: the information available at each time, never forgotten. A process is adapted if its value at time t is known from Ft. Trading strategies must be adapted (you can only act on what you know), which is why the Itô integral uses left-endpoint integrands.
Hard · Quant interview notes · Stochastic calculus · practice question on a reported topic
What's the difference between Itô and Stratonovich integrals?
Model answer
Itô evaluates the integrand at the left end of each interval; Stratonovich at the midpoint. Stratonovich keeps the ordinary chain rule (no ½σ² fxx term) and is natural in physics, but its integrals aren't martingales and the integrand "looks ahead". Finance uses Itô because a trading strategy must be chosen before the price moves. The two differ by a drift correction ½ ∫ dH dW.
Hard · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is a hitting time, and where does it appear in finance?
Model answer
τa = inf{t ≥ 0 : Xt = a}, the first time a process reaches level a. For Brownian motion, the reflection principle gives P(τa ≤ t) = 2P(Wt ≥ a). Hitting times are stopping times and appear in barrier options, stop-losses, default (structural credit models) and optimal exercise.
Medium · Quant interview notes · Options · practice question on a reported topic
Why are barrier options linked to stopping times?
Model answer
A barrier option is knocked in or out the first time the underlying crosses a level, a hitting time. It's a stopping time because whether it has happened by t depends only on the path up to t. That's why barrier prices use reflection-principle formulas, and why discrete monitoring (checking only at fixing times) changes the price.
Hard · Quant interview notes · Stochastic calculus · practice question on a reported topic
What's the difference between a martingale and a local martingale?
Model answer
A local martingale becomes a martingale when stopped at a sequence of stopping times increasing to infinity, but may fail to be one itself: its expectation can drift (for example downwards, for a positive strict local martingale). Every martingale is a local martingale. Stochastic integrals ∫ H dW are local martingales, and true martingales only with enough integrability; the gap matters for bubbles and doubling strategies.
Medium · Quant interview notes · Options · practice question on a reported topic
Why go beyond Black–Scholes to stochastic volatility models?
Model answer
Black–Scholes' constant volatility can't fit the observed smile and term structure, or volatility clustering. Letting volatility follow its own random process (Heston, SABR), correlated with the stock, produces skew (negative spot–vol correlation), smiles (vol of vol), and realistic dynamics for hedging and pricing exotics. The cost: extra parameters, incompleteness, calibration.
Medium · Quant interview notes · Options · practice question on a reported topic
Why add jumps to diffusion models?
Model answer
Diffusions move continuously, so they make large overnight or crash moves extremely unlikely and give too little short-dated skew. Adding Poisson-driven jumps (Merton, Kou) captures earnings gaps and crashes, fatter tails, and steep short-expiry skews. Jumps also make the market incomplete: they can't be hedged perfectly with the stock alone.
Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is a self-financing strategy?
Model answer
A trading strategy with no money added or withdrawn after the start: any purchase is paid for by sales or borrowing within the portfolio, so the change in value comes only from price moves: dV = Δ dS + r(V − ΔS) dt. Replication arguments need this, otherwise you could "match" a payoff by injecting cash.
Medium · Quant interview notes · Options · practice question on a reported topic
How does Itô's lemma lead to the Black–Scholes PDE?
Model answer
Itô gives dV = (Vt + μSVS + ½σ²S²VSS) dt + σSVS dW. Hold the option and short VS shares: the dW terms cancel, so the portfolio is riskless and must earn r: Vt + ½σ²S²VSS = r(V − SVS). Rearranged, Vt + rSVS + ½σ²S²VSS − rV = 0, with μ gone.
Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is Brownian scaling?
Model answer
For c > 0, Wct has the same distribution (as a process) as √c Wt. Speeding time up by c scales the size of moves by √c, because variance grows linearly in time. That's why volatility scales with √T, and why Brownian paths look equally rough at every zoom.
Easy · Quant interview notes · Coding · practice question on a reported topic
Write a Python function that turns a price array into simple and log returns.
Model answer
import numpy as np
def returns(prices):
p = np.asarray(prices, dtype=float)
if p.ndim != 1 or len(p) < 2 or (p <= 0).any():
raise ValueError("need at least two positive prices")
simple = p[1:] / p[:-1] - 1
log = np.diff(np.log(p))
return simple, log
Log returns add over time (sum of log returns = log of the total); simple returns aggregate across assets in a portfolio. They're close for small moves: log(1 + r) ≈ r − r²/2.
Easy · Quant interview notes · Coding · practice question on a reported topic
Write a Python function for annualised rolling volatility from daily returns.
Model answer
import pandas as pd, numpy as np
def rolling_vol(returns, window=21, periods=252):
r = pd.Series(returns, dtype=float)
return r.rolling(window).std(ddof=1) * np.sqrt(periods)
Use the sample standard deviation over each window and scale by √(periods per year). The first window − 1 values are missing. Alternatives: an exponentially weighted std (r.ewm(span=...).std()), which reacts faster.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write a Python function that finds implied volatility by bisection.
Model answer
def implied_vol(price, S, K, T, r, lo=1e-6, hi=5.0, tol=1e-8):
f = lambda s: bs_call(S, K, T, r, s) - price
if f(lo) > 0 or f(hi) < 0:
raise ValueError("price outside no-arbitrage bounds")
while hi - lo > tol:
mid = 0.5 * (lo + hi)
if f(mid) > 0: hi = mid
else: lo = mid
return 0.5 * (lo + hi)
It works because the call price increases with σ (vega > 0). Bisection is slow but always converges; Newton's method (using vega) is much faster near the money but can fail far from it.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write a Monte Carlo estimator for a European call.
Model answer
import numpy as np
def mc_call(S, K, T, r, sigma, q=0.0, n=1_000_000, seed=0):
z = np.random.default_rng(seed).standard_normal(n)
ST = S * np.exp((r - q - 0.5 * sigma**2) * T + sigma * np.sqrt(T) * z)
pay = np.exp(-r * T) * np.maximum(ST - K, 0)
return pay.mean(), pay.std(ddof=1) / np.sqrt(n)
Simulate ST under the risk-neutral measure, average the discounted payoff, and report the standard error, which falls like 1/√n. Compare with the closed form as a check.
Medium · Quant interview notes · Coding · practice question on a reported topic
How do antithetic variates reduce Monte Carlo variance?
Model answer
For each normal draw Z also use −Z, and average the two payoffs. The pair has the same mean, and when the payoff is monotonic in Z (a vanilla call) the two are negatively correlated, so their average has lower variance than two independent draws. It's free to implement and never biases the estimate; the gain is small for payoffs that aren't monotonic (e.g. a straddle).
Medium · Quant interview notes · Coding · practice question on a reported topic
Write a binomial-tree pricer for a European call.
Model answer
import numpy as np
def binomial_call(S, K, T, r, sigma, n=500):
dt = T / n
u = np.exp(sigma * np.sqrt(dt)); d = 1 / u
p = (np.exp(r * dt) - d) / (u - d)
j = np.arange(n + 1)
V = np.maximum(S * u**j * d**(n - j) - K, 0)
disc = np.exp(-r * dt)
for _ in range(n):
V = disc * (p * V[1:] + (1 - p) * V[:-1])
return V[0]
Cox–Ross–Rubinstein: up and down factors e±σ√dt, risk-neutral p, then backward induction. It converges to Black–Scholes as n grows (oscillating; averaging n and n + 1 helps).
Hard · Quant interview notes · Coding · practice question on a reported topic
How do you change a binomial tree to price an American put?
Model answer
At every node during the backward pass take the larger of continuing and exercising: V = np.maximum(disc * (p * V[1:] + (1 - p) * V[:-1]), K - S_nodes), where S_nodes = S * u**j * d**(level - j) for that level. Exercise is optimal deep in the money, where receiving K now earns interest. The early-exercise boundary is where the two values meet.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write a function for historical value at risk.
Model answer
import numpy as np
def historical_var(returns, level=0.95, value=1.0):
r = np.asarray(returns, dtype=float)
return -np.quantile(r, 1 - level) * value
Sort past returns and take the (1 − level) quantile; VaR is minus that times the position value. It makes no distribution assumption but needs a long window, ignores scenarios not in the data, and says nothing about losses beyond the quantile (use expected shortfall for that).
Find the lower-tail quantile, average the returns at or below it, and report it as a positive loss. Unlike VaR it says how bad the tail is, and it's subadditive (diversification never increases it), which is why regulators moved to 97.5% ES.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write a function for the annualised Sharpe ratio from daily returns.
Model answer
import numpy as np
def sharpe(returns, rf_annual=0.0, periods=252):
r = np.asarray(returns, dtype=float) - rf_annual / periods
return r.mean() / r.std(ddof=1) * np.sqrt(periods)
Subtract the per-period risk-free rate, divide the mean excess return by its standard deviation, and annualise by √periods. Caveats: autocorrelated returns make the √T scaling wrong, and a high Sharpe from a short sample has a large standard error (≈ √((1 + SR²/2)/n)).
Hard · Quant interview notes · Coding · practice question on a reported topic
Sketch a simple backtest of a daily trading signal.
Model answer
import pandas as pd
def backtest(prices, signal, cost_bps=1.0):
ret = prices.pct_change()
pos = signal.shift(1).fillna(0) # trade on yesterday's signal
turnover = pos.diff().abs().fillna(0)
pnl = pos * ret - turnover * cost_bps / 1e4
return pnl.cumsum()
The key line is shift(1): today's position may only use information known before today's return. Then charge transaction costs on turnover, and test out of sample. Common bugs: computing the signal with the same bar's close, survivorship bias in the universe, and ignoring costs and slippage.
Easy · Quant interview notes · Coding · practice question on a reported topic
How do you compute a moving average efficiently?
Model answer
Keep a running sum of the current window: add the new value and subtract the one leaving, then divide by the window size. That's O(1) per step instead of O(k). In NumPy, np.convolve(x, np.ones(k)/k, 'valid') or a cumulative-sum difference (c[k:] − c[:−k])/k; for long series, recompute the sum now and then to stop floating-point drift.
Easy · Quant interview notes · Coding · practice question on a reported topic
How do you find missing dates in a daily time series?
Model answer
Build the expected calendar and compare: expected = pd.bdate_range(start, end) (or an exchange calendar, to skip holidays), then expected.difference(df.index). Also check for duplicate dates and unsorted indices. Using plain calendar days would flag every weekend.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write a bisection root-finder.
Model answer
def bisect(f, a, b, tol=1e-10, max_iter=200):
fa, fb = f(a), f(b)
if fa * fb > 0:
raise ValueError("f(a) and f(b) must have opposite signs")
for _ in range(max_iter):
m = 0.5 * (a + b); fm = f(m)
if fm == 0 or b - a < tol:
return m
if fa * fm < 0: b, fb = m, fm
else: a, fa = m, fm
return 0.5 * (a + b)
Each step halves the bracket, so it gains one bit of accuracy per iteration and always converges for a continuous function with a sign change.
Easy · Quant interview notes · Coding · practice question on a reported topic
Why is C++ used in some quant roles?
Model answer
For speed and control: low-latency trading, market-data handlers, pricing and risk libraries, and anything on the hot path. It compiles to fast native code, gives control over memory layout and allocation, has no garbage-collector pauses, and has mature numerical and systems libraries. Research and prototyping are usually in Python, with C++ underneath or in production.
Easy · Quant interview notes · Statistics · practice question on a reported topic
What is a p-value?
Model answer
The probability, assuming the null hypothesis is true, of a test statistic at least as extreme as the one observed. Small means the data would be surprising under the null. It is not the probability the null is true, and not the size of the effect; with many tests some will be small by chance (multiple testing).
Easy · Quant interview notes · Statistics · practice question on a reported topic
How should you interpret a 95% confidence interval?
Model answer
It comes from a procedure that, over repeated samples, produces intervals containing the true parameter 95% of the time. Once you've computed one interval, the parameter is either in it or not; the 95% describes the method. (A Bayesian credible interval is the one with the "95% probability the parameter is here" reading.)
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is the bias–variance trade-off?
Model answer
Expected squared prediction error = bias² + variance + irreducible noise. Simple models miss real structure (high bias); flexible models chase noise in the particular sample (high variance). Regularisation, simpler features and more data move you along the trade-off; cross-validation on held-out data finds a good point. In finance, with low signal-to-noise, variance usually dominates.
Medium · Quant interview notes · Regression · practice question on a reported topic
What is multicollinearity and why is it a problem?
Model answer
Regressors that are highly correlated with each other. X'X is nearly singular, so individual coefficients have huge standard errors and can flip sign with small data changes, even though the fit and predictions may be fine. Diagnose with variance inflation factors or the condition number; fix by dropping or combining variables, using PCA, or ridge regression.
Medium · Quant interview notes · Regression · practice question on a reported topic
What is heteroskedasticity and how does it affect OLS?
Model answer
The error variance changes with the regressors (or over time). OLS coefficients stay unbiased if the errors are exogenous, but they're no longer the most efficient and the usual standard errors are wrong, so t-tests mislead. Use White (robust) standard errors, or weighted least squares if you can model the variance.
Medium · Quant interview notes · Regression · practice question on a reported topic
What is autocorrelation in regression residuals, and what do you do about it?
Model answer
Errors correlated across observations, typical in time series and overlapping-horizon returns. Coefficients can stay unbiased (if regressors are exogenous) but standard errors are usually too small, overstating significance. Detect with Durbin–Watson or Ljung–Box; use Newey–West (HAC) standard errors, or model the dynamics (lags, ARMA errors).
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is logistic regression, and why is it fitted by maximum likelihood rather than OLS?
Model answer
It models a binary outcome: P(Y = 1 | x) = 1/(1 + e−xᵀβ), so the log-odds are linear in x. Uses: default prediction, classification, whether a fill happens. It's fitted by maximising the Bernoulli likelihood: OLS on 0/1 data can predict probabilities outside [0, 1] and assumes constant-variance errors, while the true variance p(1 − p) changes with x.
Easy · Quant interview notes · Statistics · practice question on a reported topic
Why doesn't correlation imply causation?
Model answer
Two variables can move together because a third drives both (confounding: ice cream and drownings both rise in summer), because causation runs the other way, through selection or survivorship effects, or by chance (especially after searching many pairs). Establishing causation needs experiments, instruments, natural experiments or a structural argument.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write NumPy code to estimate OLS coefficients.
Model answer
import numpy as np
def ols(X, y, intercept=True):
X = np.asarray(X, float); y = np.asarray(y, float)
if intercept:
X = np.column_stack([np.ones(len(X)), X])
beta, *_ = np.linalg.lstsq(X, y, rcond=None)
return beta
Use lstsq (QR/SVD) rather than computing (X'X)⁻¹X'y explicitly, which squares the condition number and is unstable for nearly collinear columns.
Easy · Quant interview notes · Statistics · practice question on a reported topic
Why is a random walk Xt = Xt−1 + εt not stationary?
Model answer
Var(Xt) = Var(X₀) + tσ², which grows with time, so the variance isn't constant. Shocks never die away. Its first difference, εt, is stationary, which is why we model returns rather than prices.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is a unit root, and why does it matter?
Model answer
In Xt = φXt−1 + εt, φ = 1 is a unit root: the process is a random walk, shocks are permanent and the variance grows without bound. Regressing one unit-root series on another gives spurious significance, so test first (augmented Dickey–Fuller), and difference or look for cointegration.
Easy · Quant interview notes · Statistics · practice question on a reported topic
What is autocorrelation in a time series?
Model answer
The correlation of a series with its own lagged values: ρ(k) = Corr(Xt, Xt−k). Positive at short lags suggests momentum or persistence, negative suggests mean reversion (e.g. bid–ask bounce). The ACF and PACF help choose AR and MA orders; Ljung–Box tests whether autocorrelations are jointly zero.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What's the difference between AR and MA models?
Model answer
AR(p): the series depends on its own past values, so shocks echo forever with decaying weight; the PACF cuts off after p lags. MA(q): the series is a weighted sum of the current and last q shocks, so a shock matters for only q periods; the ACF cuts off after q. ARMA combines both for a compact fit.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is cointegration?
Model answer
Two (or more) non-stationary series are cointegrated if some linear combination of them is stationary: they wander, but together, with a mean-reverting spread. Test with Engle–Granger (regress one on the other, test the residual for a unit root) or Johansen. It's the basis of pairs trading; mere correlation of returns isn't enough.
Hard · Quant interview notes · Statistics · practice question on a reported topic
What is the Kalman filter used for?
Model answer
Estimating a hidden state that evolves over time from noisy observations, recursively: predict the state and its uncertainty forward, then update with the new observation, weighting it by the Kalman gain (more weight when the observation is precise relative to the prediction). It's optimal for linear-Gaussian state-space models. Uses: time-varying hedge ratios in pairs trading, dynamic betas, term-structure and latent-factor models.
Medium · Quant interview notes · Statistics · practice question on a reported topic
How do you evaluate time-series forecasts?
Model answer
Strictly out of sample, respecting time: walk-forward (rolling or expanding) re-estimation, never shuffling. Pick a loss that matches the use: RMSE or MAE for levels, hit rate and directional accuracy for signs, log score for probabilities, and for trading the P&L after costs. Compare with a naive benchmark (random walk, historical mean), and test whether the difference is significant (Diebold–Mariano).
Easy · Quant interview notes · Coding · practice question on a reported topic
Write pandas code to create lagged features.
Model answer
def add_lags(df, col, lags=(1, 2, 5)):
out = df.copy()
for k in lags:
out[f"{col}_lag{k}"] = out[col].shift(k)
return out.dropna()
shift(k) moves values down k rows, so each row sees only past values. Drop the rows made incomplete by shifting, and build features on the full series before splitting into train and test so the first test rows still have lags (without peeking at future targets).
Easy · Quant interview notes · Statistics · practice question on a reported topic
What's the difference between supervised and unsupervised learning?
Model answer
Supervised: learn a mapping from features to a known label or target (predict tomorrow's return, classify default). Unsupervised: no labels; find structure (clustering stocks, PCA risk factors, anomaly detection). Reinforcement learning, learning from rewards (e.g. execution), is a third type.
Easy · Quant interview notes · Statistics · practice question on a reported topic
Why is a train–test split different for time series?
Model answer
Observations are ordered and dependent, so a random split leaks future information into training and overstates performance. Train on the past and test on the future: a chronological split, or walk-forward with rolling or expanding windows, ideally with a gap (purging/embargo) so overlapping labels don't leak.
Easy · Quant interview notes · Statistics · practice question on a reported topic
What is overfitting?
Model answer
A model that fits the noise in its training data: excellent in-sample, poor out of sample. In finance it's endemic because signal is weak and researchers try many ideas. Guard against it with held-out and walk-forward testing, fewer parameters, regularisation, economic reasoning for features, and adjusting for the number of strategies tried (deflated Sharpe ratio).
Medium · Quant interview notes · Statistics · practice question on a reported topic
What's the difference between L1 and L2 regularisation?
Model answer
L1 (lasso) adds λΣ|β|: its corner-shaped penalty sets some coefficients exactly to zero, so it selects features. L2 (ridge) adds λΣβ²: it shrinks all coefficients smoothly towards zero, handles correlated predictors well, and has a closed form. Elastic net mixes both. Choose λ by cross-validation, and standardise features first.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is a random forest?
Model answer
An ensemble of decision trees, each grown on a bootstrap sample of the data and, at each split, a random subset of features; predictions are averaged (regression) or voted (classification). Decorrelating the trees means averaging cuts variance a lot without adding much bias. Robust and needs little tuning, but on financial data it can still overfit and its feature importances can mislead.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is gradient boosting?
Model answer
Build an ensemble sequentially: each new small tree is fitted to the gradient of the loss (for squared error, the residuals) of the current ensemble, and added with a small learning rate. It reduces bias step by step and is very accurate on tabular data (XGBoost, LightGBM), but overfits without early stopping, shallow trees and regularisation.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is PCA used for in finance?
Model answer
PCA rotates correlated variables into uncorrelated components ordered by the variance they explain (eigenvectors of the covariance matrix). Uses: the yield curve (level, slope, curvature explain most moves), statistical risk factors for equities (the first component is roughly the market), reducing many features to a few, and denoising covariance matrices. Components are linear and may not be economically interpretable.
Medium · Quant interview notes · Statistics · practice question on a reported topic
Why is feature engineering so important in quant machine learning?
Model answer
Financial data has a low signal-to-noise ratio and non-stationary relationships, so models do best with inputs that already encode domain knowledge: returns over several horizons, volatility, momentum and reversal, spreads and order-book imbalance, carry, option-implied measures, and properly lagged fundamentals. Good features are stationary, scaled, available at the time used (no lookahead), and have an economic reason to work.
Sort by time, take the earliest part for training and the latest for testing, optionally leaving a gap. For model selection use sklearn.model_selection.TimeSeriesSplit rather than shuffled K-fold.
Easy · Quant interview notes · Coding · practice question on a reported topic
In C++, what's the difference between passing by value, by pointer and by reference?
Model answer
By value copies the argument (safe, costly for big objects). By pointer passes an address that may be null; the callee can modify the object and must check for null. By reference aliases the caller's object, can't be null, and avoids a copy. Default: const T& for large read-only inputs, value for small types and things you'd copy anyway, non-const reference or pointer for outputs.
Medium · Quant interview notes · Coding · practice question on a reported topic
What is RAII in C++?
Model answer
Resource Acquisition Is Initialisation: tie each resource (memory, file, socket, lock) to an object's lifetime, acquiring it in the constructor and releasing it in the destructor. Destructors run on every exit path, including exceptions, so resources can't leak. Examples: std::unique_ptr, std::lock_guard, std::fstream.
Medium · Quant interview notes · Coding · practice question on a reported topic
What's the difference between std::unique_ptr and std::shared_ptr?
Model answer
unique_ptr has sole ownership: it can be moved but not copied, and costs nothing over a raw pointer. shared_ptr allows several owners via an atomic reference count and control block, so it's heavier (atomic increments, extra allocation) and can leak through cycles (break them with weak_ptr). Prefer unique_ptr unless ownership is genuinely shared; create with make_unique/make_shared.
Medium · Quant interview notes · Coding · practice question on a reported topic
Why is std::vector often preferred in performance-sensitive code?
Model answer
Its elements are contiguous, so iteration is cache-friendly and prefetchable, and indexing is O(1); push_back is amortised O(1). Node-based containers (list, map) scatter elements across the heap and chase pointers, causing cache misses that usually outweigh their better big-O for inserts. Call reserve up front to avoid reallocations on the hot path.
Medium · Quant interview notes · Coding · practice question on a reported topic
What's the difference between std::map and std::unordered_map?
Model answer
std::map is a balanced tree: keys sorted, O(log n) operations, ordered iteration and range queries (useful for an order book's price levels). std::unordered_map is a hash table: average O(1), no order, worst case O(n), and rehashing can cause latency spikes. Choose by whether you need ordering.
Hard · Quant interview notes · Coding · practice question on a reported topic
How do you keep track of the median of a stream of numbers?
Model answer
Two heaps: a max-heap for the lower half and a min-heap for the upper half, with sizes differing by at most one. Insert into the right heap, then rebalance by moving a top element across. The median is the top of the larger heap, or the average of both tops. O(log n) per insert, O(1) to read. (In Python, store negatives in heapq for the max-heap.)
Hard · Quant interview notes · Coding · practice question on a reported topic
How do you find the maximum of every window of size k in O(n)?
Model answer
from collections import deque
def window_max(a, k):
dq, out = deque(), []
for i, x in enumerate(a):
while dq and a[dq[-1]] <= x: dq.pop()
dq.append(i)
if dq[0] <= i - k: dq.popleft()
if i >= k - 1: out.append(a[dq[0]])
return out
Keep a deque of indices whose values decrease from front to back. A new value evicts smaller ones from the back (they can never be a maximum again); the front drops out when it leaves the window. Each index is pushed and popped once: O(n).
Medium · Quant interview notes · Coding · practice question on a reported topic
What is cache locality and why does it matter in low-latency systems?
Model answer
CPUs fetch memory in cache lines (typically 64 bytes); a cache hit costs a few cycles, a main-memory miss hundreds. Code that accesses memory sequentially or reuses recently touched data (arrays, struct-of-arrays layouts, small hot data) runs much faster than pointer-chasing (linked lists, maps). In trading systems, keeping the hot path's data in cache can matter more than algorithmic complexity.
Medium · Quant interview notes · Coding · practice question on a reported topic
Why can dynamic memory allocation be expensive in low-latency code?
Model answer
malloc/new may take locks, search free lists, fragment memory, touch cold cache lines, or ask the OS for pages, so its latency is unpredictable. Low-latency systems avoid it on the hot path: pre-allocate at start-up, use object pools and arenas, reserve container capacity, and keep data on the stack or in fixed buffers.
Easy · Quant interview notes · Coding · practice question on a reported topic
What's the difference between latency and throughput?
Model answer
Latency: how long one event takes from input to output. Throughput: how many events you process per unit time. Batching raises throughput but adds latency. Trading cares about latency, and especially tail latency (the 99th or 99.9th percentile), because the slow cases are often the busy, important ones.
Hard · Quant interview notes · Coding · practice question on a reported topic
What is false sharing?
Model answer
Two threads write to different variables that happen to share a cache line. Each write invalidates the line in the other core's cache, so the line ping-pongs between cores and both threads slow down, although they share no data logically. Fix by padding or aligning hot per-thread data to separate cache lines (e.g. alignas(64)).
Easy · Quant interview notes · Market making · practice question on a reported topic
What is a limit order book?
Model answer
The list of resting buy (bid) and sell (ask) limit orders for an instrument, by price level and time. The best bid is the highest buy price, the best ask the lowest sell price; their difference is the spread. A marketable order crosses the spread and matches against resting orders, usually by price then time priority. Depth and queue position matter for execution.
Hard · Quant interview notes · Coding · practice question on a reported topic
Implement a simple top-of-book tracker from bid and ask updates.
Model answer
class TopOfBook:
def __init__(self): self.bid = self.ask = None
def update(self, bid=None, ask=None):
if bid is not None: self.bid = bid
if ask is not None: self.ask = ask
if self.bid is not None and self.ask is not None and self.bid >= self.ask:
raise ValueError("crossed book")
def spread(self): return None if None in (self.bid, self.ask) else self.ask - self.bid
def mid(self): return None if None in (self.bid, self.ask) else (self.bid + self.ask) / 2
Keep the latest best bid and ask (with sizes in practice), validate (crossed or locked books, stale data), and expose spread and mid.
Hard · Quant interview notes · Coding · practice question on a reported topic
How would you design an order-book data structure?
Model answer
Two sides, each mapping price level → queue of orders (FIFO for time priority), plus a hash map from order id → its location for O(1) cancels and amends. Bids need fast access to the highest price, asks to the lowest: a sorted map (std::map with greater<> for bids), or, for speed with a bounded tick range, an array indexed by price ticks with a pointer to the best level. Matching walks from the best level, filling in time order.
Medium · Quant interview notes · Coding · practice question on a reported topic
What is numerical stability and why does it matter?
Model answer
An algorithm is stable if rounding errors don't grow to swamp the answer. Pitfalls: subtracting nearly equal numbers (catastrophic cancellation, e.g. one-pass variance), summing numbers of very different sizes, exponentials overflowing (use log-sum-exp), inverting ill-conditioned matrices, and finite-difference Greeks with too small a step. In pricing and risk these give wrong prices, noisy Greeks and failed calibrations.
Medium · Quant interview notes · Coding · practice question on a reported topic
Why avoid computing a matrix inverse explicitly in numerical code?
Model answer
To solve Ax = b, factorise A (LU, Cholesky for covariance matrices, QR) and solve: np.linalg.solve(A, b). Forming A⁻¹ then multiplying is about three times the work and loses accuracy when A is ill-conditioned. You rarely need the inverse itself.
Hard · Quant interview notes · Options · practice question on a reported topic
Explain finite-difference pricing for the Black–Scholes PDE.
Model answer
Discretise S and t on a grid, replace VS, VSS, Vt by differences, set the payoff at expiry and boundary values at the grid's edges, and step backwards to today. Explicit schemes are simple but only stable for small time steps (Δt ≲ ΔS²/(σ²S²)); implicit is unconditionally stable but first-order in time; Crank–Nicolson averages them for second-order accuracy (with a few implicit steps first to damp oscillations from the payoff kink). American options: take the max with exercise value at each step.
Easy · Quant interview notes · Coding · practice question on a reported topic
What is a stable sort and when does it matter?
Model answer
A stable sort keeps equal elements in their original order. It matters when sorting by several keys in turn (sort by time, then stably by price, and orders at the same price stay in time order, which is exactly price-time priority). Merge sort and Timsort (Python's sort) are stable; quicksort and heapsort typically aren't.
Easy · Quant interview notes · Coding · practice question on a reported topic
How do you merge two sorted arrays?
Model answer
def merge(a, b):
i = j = 0; out = []
while i < len(a) and j < len(b):
if a[i] <= b[j]: out.append(a[i]); i += 1
else: out.append(b[j]); j += 1
return out + a[i:] + b[j:]
Two pointers, always taking the smaller head; O(m + n). Using <= keeps it stable. For k arrays, use a heap (heapq.merge).
Easy · Quant interview notes · Coding · practice question on a reported topic
How do you intersect two sorted arrays efficiently?
Model answer
Two pointers: if a[i] == b[j], record it and advance both; otherwise advance the pointer at the smaller value. O(m + n) time, O(1) extra space. If one array is much shorter, binary-search each of its elements in the longer one: O(m log n).
Medium · Quant interview notes · Coding · practice question on a reported topic
What is lookahead bias in a trading system?
Model answer
Using information that wouldn't have been available at decision time: same-bar closing prices for signals traded at that close, revised economic data, fundamentals before their release date, a universe chosen with hindsight (survivorship), or features normalised with full-sample statistics. Backtests look great and live trading doesn't. Prevent it with point-in-time data, explicit lags, and code that only ever reads the past.
Medium · Quant interview notes · Coding · practice question on a reported topic
How would you validate market data before using it in a model?
Model answer
Check timestamps (time zones, ordering, gaps, duplicates), sequence numbers in feeds, missing values, outliers and bad ticks, crossed or locked quotes, zero or negative prices, stale quotes, symbol changes and corporate actions (splits, dividends), and consistency across sources. Log and quarantine bad records rather than silently dropping them.
A crossed quote (bid above ask) is usually a data error, a stale quote on one side, or quotes from different venues mixed together; locked (equal) can be real briefly. Flag them, don't trade off them, and investigate the source.
Medium · Quant interview notes · Coding · practice question on a reported topic
What is idempotency and why does it matter in trading systems?
Model answer
An operation is idempotent if doing it twice has the same effect as once. Networks retry and messages get redelivered, so handlers must not double-count: dedupe orders and fills by a unique id, make "set state to X" rather than "add X", and keep client order ids so a resent order isn't placed twice.
Hard · Quant interview notes · Coding · practice question on a reported topic
What are sequence numbers for in market-data feeds?
Model answer
Each message carries an increasing number. Consumers use it to detect gaps (a missed UDP packet), request retransmission or recover from a snapshot, drop duplicates, and process messages in order (merging A/B redundant feeds). Acting on a book with a gap means trading on wrong prices.
Hard · Quant interview notes · Coding · practice question on a reported topic
What are move semantics in C++, and why are they useful?
Model answer
Moving transfers a resource (heap buffer, file handle) from an object that's about to die, or that you've marked with std::move, instead of copying it. Rvalue references (T&&) select move constructors and move assignment, which just steal pointers and leave the source empty. Returning big containers, growing vectors and passing temporaries become cheap; mark move constructors noexcept so std::vector will use them.
Easy · Quant interview notes · Probability · practice question on a reported topic
State inclusion–exclusion for two and three events.
Model answer
P(A ∪ B) = P(A) + P(B) − P(A ∩ B). For three: P(A ∪ B ∪ C) = ΣP(single) − ΣP(pairs) + P(A ∩ B ∩ C). Each step corrects the over- or under-counting of the last. It gives derangements (no one gets their hat: 1 − 1/1! + 1/2! − …) and "at least one" counts.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is the law of total variance?
Model answer
Var(X) = E[Var(X | Y)] + Var(E[X | Y]): average variance within groups plus variance between the group means. Example: returns in calm and stressed regimes; total variance is the average within-regime variance plus the spread between regime means. It also gives the variance of a random sum: Var = E[N]Var(X) + Var(N)E[X]².
Medium · Quant interview notes · Probability · practice question on a reported topic
What is Jensen's inequality and why does it matter in finance?
Model answer
For convex φ, φ(E[X]) ≤ E[φ(X)] (reversed for concave). So convex payoffs (options) are worth more than their payoff at the expected price, and uncertainty has value for the holder; volatility drag (E[log return] < log E[return]) and E[1/X] ≥ 1/E[X] are other cases.
Medium · Quant interview notes · Probability · practice question on a reported topic
What is a moment generating function and why is it useful?
Model answer
MX(t) = E[etX]. Its derivatives at 0 give the moments (M′(0) = E[X], M″(0) = E[X²]); the MGF of a sum of independent variables is the product of their MGFs; and when it exists near 0 it determines the distribution. So sums of independent normals are normal, sums of Poissons are Poisson, and so on.
Medium · Quant interview notes · Probability · practice question on a reported topic
How do you find the density of Y = g(X)?
Model answer
If g is monotonic and differentiable, fY(y) = fX(g⁻¹(y)) · |d g⁻¹(y)/dy|: the density is stretched or squeezed by how fast g changes. Safer in general: find the CDF P(Y ≤ y) = P(g(X) ≤ y), then differentiate (this also handles non-monotonic g, like Y = X², by adding the branches). Example: if X is uniform on (0, 1), −ln X is exponential(1).
Easy · Quant interview notes · Random walks · practice question on a reported topic
Give a simple example of a martingale.
Model answer
A symmetric random walk Sn (steps ±1 with equal probability): E[Sn+1 | history] = Sn. Others: Sn² − n; for a biased walk with p ≠ q, (q/p)Sn; your wealth when repeatedly making fair bets; the running conditional expectation E[X | information so far] of any fixed X.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is the score function in maximum likelihood?
Model answer
The derivative of the log-likelihood with respect to the parameter, ∂ℓ/∂θ. At an interior maximum the score is zero, which is the MLE's defining equation. At the true parameter its expectation is zero and its variance is the Fisher information.
Hard · Quant interview notes · Statistics · practice question on a reported topic
What is Fisher information?
Model answer
How much information the data carry about θ: I(θ) = Var(score) = −E[∂²ℓ/∂θ²]. More curvature of the log-likelihood means the peak is sharper and θ is pinned down better. The MLE's variance is about 1/(n I(θ)) for large n, and no unbiased estimator can do better (the Cramér–Rao bound). For a normal mean with known σ², I = 1/σ².
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is the bootstrap?
Model answer
Estimate a statistic's sampling distribution by resampling your data with replacement many times, recomputing the statistic each time, and using the spread of those values for standard errors or confidence intervals. It needs few assumptions, but the data must be (close to) independent and representative: for time series use block bootstraps to keep the dependence, and it struggles with extremes (e.g. the maximum).
Easy · Quant interview notes · Bayes · practice question on a reported topic
What are the prior, likelihood and posterior?
Model answer
The prior is your belief about a parameter before the data. The likelihood is how probable the observed data are for each parameter value. The posterior ∝ prior × likelihood is the updated belief. With lots of data the likelihood dominates; with little, the prior matters. Conjugate pairs (Beta–Binomial, Normal–Normal) keep the posterior in the same family.
Medium · Quant interview notes · Regression · practice question on a reported topic
How is ridge regression related to least squares?
Model answer
Ridge minimises Σ(y − Xβ)² + λΣβ², giving β̂ = (X'X + λI)⁻¹X'y. The λI term makes the matrix well conditioned when predictors are correlated, and shrinks coefficients towards zero: a little bias for a large cut in variance. It's the posterior mode with a normal prior on β. Choose λ by cross-validation; don't penalise the intercept; standardise features.
Medium · Quant interview notes · Statistics · practice question on a reported topic
How do the ACF and PACF help choose AR and MA orders?
Model answer
For an AR(p) the PACF cuts off after lag p while the ACF decays gradually; for an MA(q) the ACF cuts off after lag q while the PACF decays. If both decay, try ARMA, then compare candidates with AIC/BIC and check the residuals are white noise (Ljung–Box).
Easy · Quant interview notes · Statistics · practice question on a reported topic
What is seasonality in a time series?
Model answer
Regular, calendar-linked patterns: intraday U-shaped volume and volatility, day-of-week and turn-of-month effects, quarterly earnings seasons, holiday effects. Model it (seasonal dummies, seasonal differencing, normalising by time-of-day averages) before looking for other signals, or it will masquerade as one.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is a structural break?
Model answer
A change in a process's parameters or behaviour at some point: a regulation change, a crisis, a new market structure, a central-bank regime. Models fitted across the break average two different worlds and forecast badly. Detect with Chow tests or rolling/recursive estimates; respond with shorter or weighted windows, regime-switching models, or by re-estimating.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is walk-forward validation?
Model answer
Repeatedly train on data up to a point and test on the period just after, then roll forward (fixed-size or expanding window) and repeat; stitch the test periods together for an out-of-sample record. It mimics live use and respects time order; add a gap if labels span several periods.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What does it mean for a classifier's probabilities to be calibrated?
Model answer
Among cases given probability p, about a fraction p happen. Check with a reliability diagram or the Brier score; fix with Platt scaling or isotonic regression on held-out data. It matters whenever you size bets or set thresholds using the probabilities themselves, not just the ranking.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What are the limitations of feature importance in tree models?
Model answer
Impurity-based importance is computed in-sample and favours high-cardinality or continuous features; correlated features split the credit between them (so each looks less important), and permutation importance can understate them too. Importance shows what the model used, not causal effect. Use out-of-sample permutation importance, group correlated features, or SHAP, and sanity-check with economics.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is data leakage in machine learning?
Model answer
Information from outside the training data's legitimate past gets into training or features, so test results look better than reality. Finance examples: future returns in features, overlapping labels across the train/test boundary, normalising with full-sample statistics, revised (non-point-in-time) data, survivorship, and random shuffling of time series.
Medium · Quant interview notes · Options · practice question on a reported topic
What is static replication?
Model answer
Building a portfolio, once, whose payoff at expiry matches the target, with no trading afterwards. Put–call parity is the simplest case; any smooth payoff of ST can be built from a bond, a forward and a strip of calls and puts (Carr–Madan), which is how variance swaps are replicated. It's robust because it doesn't depend on a model for the path.
Medium · Quant interview notes · Options · practice question on a reported topic
What is vega hedging?
Model answer
Offsetting exposure to implied volatility using other options, since the underlying itself has no vega. Choose option positions so total vega is near zero, then re-hedge delta with the stock. Vegas at different strikes and expiries don't move together (skew and term-structure changes), so a single option is only a partial hedge.
Medium · Quant interview notes · Options · practice question on a reported topic
Why can't the Black–Scholes model explain the volatility smile?
Model answer
It assumes one constant volatility for the underlying, so every option on it should imply the same vol. Real returns have fat tails, jumps, and volatility that moves (and correlates negatively with price), and there's demand for crash protection, so different strikes and expiries need different vols to match prices. Local-vol, stochastic-vol and jump models are attempts to fix this.
Hard · Quant interview notes · Options · practice question on a reported topic
What is the idea behind local volatility?
Model answer
Let volatility be a deterministic function of price and time, dS/S = μ dt + σ(S, t) dW. Dupire's formula then picks the unique σ(S, t) that reproduces today's whole implied-vol surface (from call prices' derivatives in strike and expiry). It fits today's prices exactly but predicts unrealistic smile dynamics (the smile flattens and moves the wrong way as spot moves), which matters for hedging and forward-starting exotics.
Easy · Quant interview notes · Options · practice question on a reported topic
What makes barrier options path-dependent?
Model answer
Their payoff depends on whether the price touched a level at any time before expiry, not just on the final price. Two paths ending at the same price can pay differently if one crossed the barrier. That's why they're priced with the reflection principle or simulation and have awkward Greeks near the barrier (discontinuous payoffs, large gamma).
Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is the Itô product rule?
Model answer
d(XY) = X dY + Y dX + dX dY. The last term is new compared with ordinary calculus and is non-zero when both X and Y have Brownian parts: with dX = σX dW¹, dY = σY dW², dX dY = ρ σX σY dt. Example: d(e−rtSt) uses it (the cross term is zero there, since e−rt has no dW).
Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic
Why does an Itô integral ∫ H dW have expectation zero?
Model answer
It's a limit of sums Σ H(ti) ΔWi where H(ti) is known before the increment ΔWi, which has mean zero and is independent of the past. So each term has expectation E[H(ti)] · 0 = 0. More strongly, the integral is a martingale when E∫H² dt is finite. If H could look ahead, this would fail.
Hard · Quant interview notes · Stochastic calculus · practice question on a reported topic
What is the infinitesimal generator of a diffusion?
Model answer
For dX = μ(X) dt + σ(X) dW, the generator acts on smooth f as Af = μ f′ + ½ σ² f″: the expected rate of change of f(X) right now, i.e. lim (E[f(Xt) | X₀ = x] − f(x))/t. It's the drift term in Itô's lemma, and the operator in the Kolmogorov backward and Feynman–Kac PDEs (Black–Scholes is ∂V/∂t + AV − rV = 0).
Cap extreme values at chosen quantiles rather than deleting them, so a few outliers (or bad ticks) don't dominate means and regressions. In a backtest compute the cut-offs from past data only, or you've added lookahead.
Easy · Quant interview notes · Expected value · practice question on a reported topic
Why are indicator variables useful in expectation problems?
Model answer
Write a count as a sum of 0/1 indicators, X = Σ Iᵢ, so E[X] = Σ P(Iᵢ = 1) by linearity, with no need for the distribution of X or independence. Fixed points of a permutation, empty boxes, runs, matching pairs and records all fall to it; for variances add the pairwise covariances.
Medium · Quant interview notes · Statistics · practice question on a reported topic
When does zero covariance imply independence?
Model answer
In general it doesn't: if X is symmetric about 0 and Y = X², Cov(X, Y) = E[X³] = 0, yet Y is a function of X. It does when X and Y are jointly normal (being normal separately isn't enough). Covariance only measures linear dependence.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What's the difference between AIC and BIC?
Model answer
Both trade fit against complexity: AIC = 2k − 2 ln L, BIC = k ln n − 2 ln L (lower is better). BIC's penalty grows with sample size, so it picks smaller models and is consistent (finds the true model if it's among the candidates); AIC aims at predictive accuracy and tends to choose larger models. Neither replaces out-of-sample testing.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is a likelihood-ratio test?
Model answer
Fit the model with and without the restriction and compare maximised log-likelihoods: LR = 2(ℓunrestricted − ℓrestricted). Under the null and regularity conditions, LR is approximately χ² with degrees of freedom equal to the number of restrictions. Example: testing whether extra lags in an AR model are needed.
Medium · Quant interview notes · Regression · practice question on a reported topic
What is omitted-variable bias?
Model answer
If a variable that affects y is left out and is correlated with an included regressor, that regressor's coefficient soaks up part of the omitted effect: bias = (effect of omitted variable) × (slope of omitted on included). Example: regressing returns on momentum without controlling for market beta.
Medium · Quant interview notes · Regression · practice question on a reported topic
What is endogeneity?
Model answer
A regressor correlated with the error term, E[ε | X] ≠ 0, from omitted variables, reverse causality, simultaneity (price and quantity set together) or measurement error. OLS is then biased and inconsistent. Fixes: instrumental variables, natural experiments, panel fixed effects, or better controls.
Medium · Quant interview notes · Regression · practice question on a reported topic
Why are Newey–West standard errors used in finance?
Model answer
They stay valid when residuals are heteroskedastic and autocorrelated (HAC), which is usual in financial time series, and especially with overlapping returns (monthly returns sampled daily). Ordinary standard errors then overstate significance. Newey–West weights autocovariances up to a chosen lag with declining (Bartlett) weights.
Easy · Quant interview notes · Statistics · practice question on a reported topic
What is volatility clustering?
Model answer
Large moves tend to follow large moves (of either sign) and calm follows calm, so squared or absolute returns are autocorrelated even when returns themselves barely are. It's why GARCH and stochastic-vol models exist, and why volatility forecasts are much better than return forecasts.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What's the difference between ARCH and GARCH?
Model answer
ARCH(q) makes today's variance depend on the last q squared shocks; GARCH(p, q) also adds lagged variances. One lagged variance term acts like an infinite ARCH with geometrically decaying weights, so GARCH(1,1) captures persistent volatility with three parameters, where ARCH would need many lags.
Easy · Quant interview notes · Statistics · practice question on a reported topic
What does the I in ARIMA stand for?
Model answer
Integrated: ARIMA(p, d, q) differences the series d times to make it stationary, then fits an ARMA(p, q). d = 1 for a random-walk-like series such as a price. Over-differencing introduces artificial negative autocorrelation (an MA unit root), so test for unit roots first.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What's the difference between one-step-ahead and multi-step-ahead forecasting?
Model answer
One-step forecasts predict the next period from the latest data. Multi-step forecasts predict h periods ahead: either iterate a one-step model (feeding forecasts back in, so errors compound) or fit a direct model for horizon h. Forecast uncertainty grows with h, and for stationary series forecasts revert to the mean.
Easy · Quant interview notes · Statistics · practice question on a reported topic
How can lookahead bias creep into time-series features?
Model answer
Rolling statistics that include the current bar used to trade that bar (shift them); labels whose horizon overlaps the next features; z-scores or scalers fitted on the full sample; point-in-time data replaced by later revisions; and joins on timestamps that ignore publication lags. Each makes a backtest look better than reality.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is ROC-AUC?
Model answer
The area under the curve of true-positive rate against false-positive rate as the classification threshold varies. It equals the probability that a random positive is scored above a random negative: 0.5 is random, 1 perfect. It measures ranking only (not calibration) and can look good on very imbalanced data where precision is poor; then use precision–recall AUC.
Easy · Quant interview notes · Statistics · practice question on a reported topic
Why is accuracy misleading for imbalanced classification?
Model answer
If 1% of loans default, predicting "no default" for everyone is 99% accurate and useless. Use metrics that focus on the rare class: precision, recall, F1, PR-AUC, and calibration, and choose thresholds by the costs of each error type. Resampling or class weights can help training.
Medium · Quant interview notes · Statistics · practice question on a reported topic
What is early stopping?
Model answer
Monitor a validation loss while training an iterative model (boosting, neural nets) and stop when it stops improving for a set number of rounds, keeping the best iteration. It limits how far the model fits noise, acting like regularisation. The validation set must be separate from the test set (and chronologically after the training data for time series).
Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic
Why does Itô's lemma have a second-derivative term?
Model answer
In ordinary calculus (dx)² is negligible next to dx. For Brownian motion, dW is of size √dt, so (dW)² is of order dt, the same order as the drift, and doesn't vanish: summed over a path it gives the quadratic variation t. So the ½ f″ (dX)² term contributes ½ σ² f″ dt to the drift. It's why E[ln S] grows at μ − σ²/2.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write Python for rolling z-scores, usable as a trading signal.
Model answer
def rolling_z(x, window=20):
m = x.rolling(window).mean().shift(1)
s = x.rolling(window).std(ddof=1).shift(1)
return (x - m) / s
Use the mean and standard deviation of the previous window (the shift), so today's value isn't standardised by statistics that include it, and the signal uses only past data. Guard against zero standard deviation.
Medium · Quant interview notes · Coding · practice question on a reported topic
What is const correctness in C++?
Model answer
Marking everything that shouldn't change as const: const references and pointers for read-only parameters, const member functions that don't modify the object (so they can be called on const objects), and const locals. The compiler then enforces the intent, documents interfaces, prevents accidental modification and enables some optimisations.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write Python to align two time series on common timestamps.
Model answer
import pandas as pd
def align(a, b):
a = pd.Series(a).sort_index(); b = pd.Series(b).sort_index()
return pd.concat([a, b], axis=1, join="inner").dropna()
An inner join keeps only timestamps present in both. Make sure both use the same time zone and frequency first; for prices at different times use an as-of merge instead, never a forward fill that uses data from the future.
Medium · Quant interview notes · Coding · practice question on a reported topic
Write pandas to turn trade data into daily OHLCV bars.
Model answer
def daily_bars(trades): # DatetimeIndex, columns price and size
t = trades.sort_index()
bars = t["price"].resample("1D").ohlc()
bars["volume"] = t["size"].resample("1D").sum()
return bars.dropna(subset=["open"])
First, max, min and last price per day, and summed volume. Use the exchange's session boundaries and time zone, not midnight UTC, and drop days with no trades.
Hard · Quant interview notes · Coding · practice question on a reported topic
Write Python to match each trade to the latest quote before it.
Model answer
import pandas as pd
def match_quotes(trades, quotes):
t = trades.sort_values("time"); q = quotes.sort_values("time")
return pd.merge_asof(t, q, on="time", direction="backward",
allow_exact_matches=False, by="symbol")
merge_asof joins each trade to the most recent quote at or before its time (here strictly before, so the quote isn't already updated by the trade). Both frames must be sorted; add a tolerance so stale quotes aren't used.
Group consecutive identical values and flag runs longer than a threshold. Unchanged prices can be genuine for illiquid instruments, so choose the threshold per asset and check timestamps and volumes too.
Medium · Quant interview notes · Coding · practice question on a reported topic
Why is NumPy vectorisation often faster than Python loops?
Model answer
A Python loop does interpreter work (type checks, boxing, dispatch) for every element. Vectorised operations run one compiled loop over contiguous typed memory, often with SIMD instructions and good cache use. The costs: temporary arrays use memory, and some recursive or path-dependent calculations don't vectorise (use Numba or Cython there).
rowvar=False because each column is a variable. With many assets and few dates the sample covariance is noisy or singular; shrink it (Ledoit–Wolf) or use a factor model.
Easy · Quant interview notes · Coding · practice question on a reported topic
Check whether a string's brackets are balanced.
Model answer
def balanced(s):
pairs, stack = {")": "(", "]": "[", "}": "{"}, []
for c in s:
if c in "([{": stack.append(c)
elif c in pairs:
if not stack or stack.pop() != pairs[c]: return False
return not stack
Push openers; each closer must match the top of the stack; the stack must end empty. O(n).
Medium · Quant interview notes · Coding · practice question on a reported topic
What's the difference between stack and heap memory in C++?
Model answer
Stack: automatic storage for local variables, allocated and freed by moving a pointer, very fast and cache-friendly, but limited in size and tied to scope. Heap: dynamic storage with lifetime you control (new/delete, ideally via RAII types like vector and unique_ptr), larger but slower to allocate and prone to fragmentation and leaks.
Medium · Quant interview notes · Coding · practice question on a reported topic
Why shouldn't destructors throw in C++?
Model answer
Destructors run during stack unwinding while another exception is in flight; a second exception then calls std::terminate. Destructors are also implicitly noexcept since C++11, so throwing terminates anyway. Handle or log errors inside the destructor, and offer an explicit close() for callers who need to see failures.
Medium · Quant interview notes · Coding · practice question on a reported topic
What is the rule of zero in modern C++?
Model answer
Design classes so they need none of the special member functions (destructor, copy/move constructors and assignments): hold resources in members that already manage themselves (std::vector, std::string, smart pointers). The compiler-generated versions then do the right thing. Only resource-owning wrapper classes should write them (the rule of five).
Medium · Quant interview notes · Coding · practice question on a reported topic
What's the difference between std::vector::reserve and resize?
Model answer
reserve(n) allocates capacity for at least n elements but doesn't create any: size is unchanged, so you still push_back. resize(n) changes the size, constructing (value-initialising) or destroying elements. Use reserve to avoid reallocations when appending; resize when you need n elements to index into. Indexing past size after only reserve is a bug the compiler won't catch.
Medium · Quant interview notes · Coding · practice question on a reported topic
Design a rolling-mean calculator for streaming data.
Model answer
from collections import deque
class RollingMean:
def __init__(self, n): self.n, self.q, self.s = n, deque(), 0.0
def update(self, x):
self.q.append(x); self.s += x
if len(self.q) > self.n: self.s -= self.q.popleft()
return self.s / len(self.q)
O(1) per update with a deque and running sum. For long-running systems, occasionally recompute the sum to stop floating-point drift, or use a fixed ring buffer to avoid allocation.
Hard · Quant interview notes · Coding · practice question on a reported topic
How would you deduplicate market-data messages using sequence numbers?
Model answer
If messages arrive in order, keep the last processed sequence number: skip anything ≤ it, and treat a jump as a gap needing recovery. If they can arrive out of order (A/B feeds, retransmits), keep a bounded window of seen numbers (a bitset or set above a low-water mark), process each number once, and advance the low-water mark as gaps fill.
Medium · Quant interview question bank · Statistics · practice question on a reported topic
What are the law of large numbers and the central limit theorem, and how do they differ?
Model answer
The law of large numbers: the sample mean of i.i.d. variables with finite mean μ converges to μ (in probability for the weak law, almost surely for the strong). The central limit theorem: if the variance σ² is finite too, √n(X̄ − μ)/σ converges in distribution to N(0, 1). The LLN says where the average goes; the CLT says how its fluctuations around μ behave, shrinking like σ/√n and becoming normal whatever the original distribution.
Hard · Quant interview question bank · Statistics · practice question on a reported topic
Give two random variables that are each normal and uncorrelated, yet dependent.
Model answer
Let X ~ N(0, 1) and S = ±1 with equal probability, independent of X, and set Y = SX. Y is N(0, 1) (flipping the sign of a symmetric variable keeps its distribution). Cov(X, Y) = E[S]E[X²] = 0. But |Y| = |X|, so they're clearly dependent. The pair (X, Y) isn't jointly normal: X + Y is 0 half the time. Zero correlation implies independence only for jointly normal variables.
Hard · Quant interview question bank · Optimal stopping · practice question on a reported topic
Each turn you toss two coins and win $1. But once you've seen two heads at least once and two tails at least once, you lose everything you've won and the game ends. You can stop whenever you like.
Once you've seen one kind of double (say two heads), what is the smallest amount of winnings at which you should stop?
Answer and worked solution
Answer: 3
Key idea. Compare continuing, ¾(W + 1), with stopping, W.
¾(W + 1) ≥ W ⇔ W ≤ 3, with equality at 3.
So keep tossing until you've won $3 after the first double, then stop.
Check. At W = 3 you're indifferent; one more toss also works on average.
Hard · Quant interview question bank · Finance · practice question on a reported topic
A best-of-seven series ends when a team wins 4 games. You want a $100 bet that pays $200 if team A wins the series and $0 otherwise, but bookmakers only take even-money bets on single games.
How much should you stake on A in game 1 to replicate the series bet?
Answer and worked solution
Answer: 31.25
Key idea. Dynamic replication: the stake is the change in the series value.
After game 1, P(A wins) is 42/64 with a win and 22/64 with a loss.
Hard · Quant interview question bank · Stochastic calculus · practice question on a reported topic
For standard Brownian motion, what is the distribution of τx, the first time it reaches level x > 0, and its mean?
Model answer
By the reflection principle, P(τx ≤ t) = 2P(Bt ≥ x) = 2(1 − Φ(x/√t)). Differentiating gives the density f(t) = x/√(2πt³) · e−x²/(2t) (a Lévy distribution). τx is finite with probability 1, but its tail decays like t−1/2, so E[τx] = ∞.
Hard · Quant interview question bank · Stochastic calculus · practice question on a reported topic
Is Bt³ a martingale for standard Brownian motion?
Model answer
No. By Itô, d(B³) = 3B² dB + 3B dt. The dt term has non-zero (random) drift, so E[Bt³ | Fs] = Bs³ + 3Bs(t − s). Removing the drift gives the martingale Bt³ − 3tBt (a Hermite polynomial). Similarly B² − t and eθB − θ²t/2 are martingales.
Medium · Quant interview question bank · Calculus · practice question on a reported topic
Use ε–δ (or ε–N) language to say what lim an = 0, lim an ≠ 0, limx→x₀ f(x) = 0 and its negation mean.
Model answer
lim an = 0: for every ε > 0 there is N with |an| < ε for all n > N. Its negation: there is some ε₀ > 0 such that for every N some n > N has |an| ≥ ε₀. limx→x₀ f(x) = 0: for every ε > 0 there is δ > 0 with |f(x)| < ε whenever 0 < |x − x₀| < δ. Negation: some ε₀ > 0 such that every δ > 0 has an x with 0 < |x − x₀| < δ and |f(x)| ≥ ε₀. Negating swaps "for all" and "there exists".
Easy · Quant interview question bank · Calculus · practice question on a reported topic
What is L'Hôpital's rule?
Model answer
If f(x) → 0 and g(x) → 0 (or both → ±∞) as x → a, and f′/g′ has a limit L, then f/g → L too. Example: (1 − cos x)/x² → sin x/(2x) → ½. Check the 0/0 or ∞/∞ form first; it fails otherwise, and sometimes a Taylor expansion is quicker.
Easy · Quant interview question bank · Calculus · practice question on a reported topic
Does Σ π√n converge?
Model answer
No. Its terms π√n grow without bound, but any convergent series needs terms tending to 0. (The related Σ π−√n does converge: π−√n = e−√n ln π falls faster than any power 1/n², by comparison.)
Easy · Quant interview question bank · Calculus · practice question on a reported topic
How do you think about derivatives and integrals, and how are they related?
Model answer
The derivative is the instantaneous rate of change, geometrically the slope of the tangent. The definite integral accumulates a quantity, geometrically the signed area under the curve. The fundamental theorem of calculus links them: d/dx ∫ₐˣ f = f(x), and ∫ₐᵇ f′ = f(b) − f(a). In finance: P&L is the integral of position × price changes; duration and delta are derivatives.
Easy · Quant interview question bank · Calculus · practice question on a reported topic
What are integration by substitution and integration by parts?
Model answer
Substitution reverses the chain rule: ∫ f(g(x)) g′(x) dx = ∫ f(u) du with u = g(x). By parts reverses the product rule: ∫ u dv = uv − ∫ v du. Example by parts: ∫ x eˣ dx = x eˣ − eˣ. Example substitution: ∫ 2x ex² dx = ex².
Medium · Quant interview question bank · Calculus · practice question on a reported topic
Solve y′ + 6x ex² cos²y = 0.
Model answer
Separate: dy/cos²y = −6x ex² dx. Integrate: tan y = −3ex² + C, so y = arctan(C − 3ex²) (plus the constant solutions where cos y = 0, i.e. y = π/2 + kπ).
Medium · Quant interview question bank · Linear algebra · practice question on a reported topic
What is the determinant of a square matrix, how does it relate to eigenvalues and invertibility, and what are its main properties?
Model answer
It's the signed volume scale factor of the linear map (defined by the Leibniz sum over permutations, or by cofactor expansion). det A = product of the eigenvalues; A is invertible iff det A ≠ 0. Properties: det(AB) = det A det B; det Aᵀ = det A; det A⁻¹ = 1/det A; swapping two rows flips the sign; adding a multiple of one row to another leaves it unchanged; for triangular matrices it's the product of the diagonal.
Medium · Quant interview question bank · Linear algebra · practice question on a reported topic
What are eigenvalues and eigenvectors, and how are they computed in practice?
Model answer
A non-zero v with Av = λv is an eigenvector with eigenvalue λ: a direction the map only stretches. By hand: solve det(A − λI) = 0, then (A − λI)v = 0. In practice, use the QR algorithm (numpy.linalg.eig, or eigh for symmetric matrices, which is faster and more stable), or power iteration for the largest one. In finance: PCA of a covariance matrix, stability of dynamics, Markov chain stationary distributions.
Medium · Quant interview question bank · Linear algebra · practice question on a reported topic
What does it mean for a symmetric matrix to be positive (semi-)definite, and how do you test it?
Model answer
A is positive definite if xᵀAx > 0 for all x ≠ 0 (semi-definite: ≥ 0). Equivalent tests: all eigenvalues positive (non-negative); all leading principal minors positive (Sylvester's criterion; for semi-definite you need all principal minors ≥ 0); a Cholesky factorisation exists. Covariance matrices must be positive semi-definite, which is why a hand-made correlation matrix can be invalid.
Medium · Quant interview question bank · Linear algebra · practice question on a reported topic
If an n × n matrix has n distinct eigenvalues, how do you write A = QDQ⁻¹, and why is it useful?
Model answer
Put the eigenvectors as the columns of Q and the eigenvalues on the diagonal of D; distinct eigenvalues guarantee independent eigenvectors, so Q is invertible. (For a symmetric A, Q can be chosen orthogonal, Q⁻¹ = Qᵀ.) It makes the map a pure scaling in the eigenbasis, so powers and functions are easy: Aᵏ = QDᵏQ⁻¹, eA = QeDQ⁻¹, which helps with Markov chains, linear ODEs and PCA.
Medium · Quant interview question bank · Linear algebra · practice question on a reported topic
What is the QR decomposition and what is it used for?
Model answer
A = QR with Q orthogonal and R upper triangular (positive diagonal for uniqueness). Gram–Schmidt on A's columns builds it (Householder reflections do it stably in practice). Uses: solving least squares (Rx = Qᵀb, avoiding XᵀX and its squared condition number) and the QR algorithm for eigenvalues.
Medium · Quant interview question bank · Linear algebra · practice question on a reported topic
What is the LU decomposition and what is it used for?
Model answer
A = LU (lower × upper triangular), usually with row pivoting, PA = LU; it's Gaussian elimination recorded as matrices. Once factorised (O(n³)), each new right-hand side is solved by two triangular solves in O(n²). It also gives det A as the product of U's diagonal (up to sign from pivoting). For symmetric positive-definite matrices, Cholesky (A = LLᵀ) is the cheaper special case.
Hard · Quant interview question bank · Linear algebra · practice question on a reported topic
What is the SVD and what is it used for?
Model answer
Any m × n matrix A = UΣVᵀ with U and V orthogonal and Σ diagonal with non-negative singular values. Geometrically: rotate, stretch along axes, rotate. Uses: the best low-rank approximation (keep the largest singular values, Eckart–Young), PCA (SVD of the centred data matrix), pseudo-inverses and stable least squares, the matrix rank and condition number, and denoising.
Medium · Quant interview question bank · Logic · practice question on a reported topic
Cut a clock face with two straight lines into three pieces whose numbers have equal sums.
Model answer
The numbers sum to 78, so each piece must total 26. Cut between 2 and 3 and between 10 and 11, and between 4 and 5 and between 8 and 9 (two parallel lines). The pieces are {11, 12, 1, 2} = 26, {3, 4, 9, 10} = 26 and {5, 6, 7, 8} = 26.
Hard · Quant interview question bank · Logic · practice question on a reported topic
Twelve marbles look alike; one is heavier or lighter (you don't know which). Find it, and whether it's heavy or light, in three weighings.
Model answer
Weigh 1–4 against 5–8. If they balance, the odd one is in 9–12 (and 1–8 are good): weigh 9, 10, 11 against three good ones. Balance → 12 is odd; weigh it against a good one to learn heavy/light. Otherwise you know whether the odd one is heavy or light and that it's among 9–11: weigh 9 against 10. If 1–4 is heavier, either one of 1–4 is heavy or one of 5–8 is light: weigh 1, 2, 5 against 3, 6 and a good marble (9). Left heavy → 1 or 2 heavy, or 6 light: weigh 1 v 2. Right heavy → 3 heavy or 5 light: weigh 3 against a good one. Balance → 4 heavy, or 7 or 8 light: weigh 7 v 8. Three weighings have 27 outcomes, enough for the 24 possibilities.
Hard · Quant interview question bank · Logic · practice question on a reported topic
Ten tanks each hold 1,000 litres and burn 1 litre per mile. Tanks can transfer fuel to each other along the way, and none can hold more than 1,000 litres.
How far can one tank get, in miles?
Answer and worked solution
Answer: 2929
Key idea. Drop one tank at a time as soon as its fuel can top up the others.
Medium · QFin UWA · Bayes · practice question on a reported topic
One of two decks is handed to you at random: a well-shuffled deck, or a brand-new deck in order (A to K in each suit, suits in sequence). You cut it at a random point and turn over two cards: the 6 of clubs, then the 7 of clubs.
What is the probability the next card is the 8 of clubs?
Answer and worked solution
Answer: 0.98115
Key idea. Bayes to identify the deck, then predict.
Easy · QFin UWA · Conditional probability · practice question on a reported topic
Supplier A provides 40% of computers and is late 5% of the time; B provides 30% and is late 3%; C provides 30% and is late 2.5%. A computer arrives late.
What is the probability it came from A?
Answer and worked solution
Answer: 0.54795
Key idea. Bayes with three causes.
P(late) = 0.02 + 0.009 + 0.0075 = 0.0365.
P(A | late) = 0.02/0.0365 ≈ 0.548.
Check. A supplies 40% of computers but over half of the late ones.
Hard · QFin UWA · Game theory · practice question on a reported topic
The pot is $1 and each player has $1 left. You hold aces half the time and queens half the time; your opponent always holds kings. They check to you; you may check (showdown) or bet $1, and they then call or fold.
In equilibrium, what fraction of your queens should you bet (bluff)?
Answer and worked solution
Answer: 0.5
Key idea. Bluff to make the caller indifferent.
p/(1 + p) = ⅓ ⇒ p = ½.
Check. Your bets are then ⅔ aces and ⅓ bluffs, matching the 2 : 1 pot odds.
Trap. Never bluffing, which lets them fold every time you bet.
Medium · QFin UWA · Game theory · practice question on a reported topic
A zero-sum game: Player 1 chooses Up or Down, Player 2 Left or Right. Player 1's payoffs: Up/Left 3, Up/Right −2, Down/Left −1, Down/Right 0 (Player 2 gets the negatives).
(a) In equilibrium, how often does Player 2 play Left?
Answer and worked solution
Answer: 1/3 ≈ 0.33333
Key idea. Player 2 mixes so Up and Down pay Player 1 the same.
3q − 2 + 2q = −q ⇒ 6q = 2.
q = 1/3.
(b) How often does Player 1 play Up?
Answer and worked solution
Answer: 1/6 ≈ 0.16667
Key idea. Player 1 mixes so Left and Right pay Player 2 the same.
Hard · QFin UWA · Optimal stopping · practice question on a reported topic
You have 100 turns. Each turn you roll a d20 until you first roll at least X; from then on you're paid that roll on every remaining turn (the rolling turns pay nothing).
Which threshold X maximises your expected payoff?
Answer and worked solution
Answer: 18
Key idea. Balance a higher kept value against more turns spent rolling.
X = 17: about 1,758. X = 18: about 1,773. X = 19: about 1,755.
Best threshold 18.
Check. The cost of waiting jumps from 6.7 to 10 expected rolls between 18 and 19, which is what tips it.
Hard · QFin UWA · Optimal stopping · practice question on a reported topic
Over 100 turns you either place $1 (from a third party) into one of two boxes at random, or take everything from one box chosen at random. You place for the first 100 − n turns and take for the last n.
What is the best expected payoff?
Answer and worked solution
Answer: 92.531
Key idea. Trade one more take (one fewer dollar placed) against halving what's left behind.
n = 6: 94 × 63/64 = 92.53. n = 7: 93 × 127/128 = 92.27.
Best: n = 6, worth ≈ $92.53.
Check. Stop adding takes when the halved leftover is under 1% of the pot.