Question library interview questions

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.

Practise these in the app Mock interview

How Question library interviews

Sources: BrainStellar · EigenPrep · Quant interview notes · Quant interview question bank · QFin UWA

Questions (525)

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.)

Source: BrainStellar: The returning explorer · Try it in the app →

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.

  1. 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.

    1. Turn switch 1 on for ten minutes, then off. Turn switch 2 on and go in.
    2. Bulb on: switch 2. Bulb off but warm: switch 1. Bulb off and cold: switch 3.
    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.

Source: BrainStellar: Which switch? · Try it in the app →

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.

  1. 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.

    1. Box 1: one good sweet. Box 2: 49 good and 50 rotten.
    2. P = ½ × 1 + ½ × 49/99.
    3. = 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.

Source: BrainStellar: Lucky candy · Try it in the app →

Easy · BrainStellar · Expected value · practice question on a reported topic

Every family keeps having children until they have a girl, then stops. Each birth is a boy or a girl with probability ½, independently.

  1. (a) In the long run, what fraction of all children born are boys?
    Answer and worked solution

    Answer: 0.5

    Key idea. Stopping rules can't bias fair, independent births.

    1. Each birth is a boy with probability ½, whatever the family's history.
    2. So the expected numbers of boys and girls born are equal: the fraction of boys is ½.

    Check. Each family has exactly one girl and, on average, one boy (part b), so 1 : 1.

    Trap. Thinking families "stop at a girl" so there will be more girls.

  2. (b) On average, how many children does a family have?
    Answer and worked solution

    Answer: 2

    Key idea. Births until the first girl are geometric with p = ½.

    1. E[children] = 1/p = 2: one girl and, on average, one boy.

    Check. Matches part (a): one boy for every girl.

Source: BrainStellar: A world that wants girls · Try it in the app →

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.

Source: BrainStellar: Tigers and the sheep · Try it in the app →

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.

  1. (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.

    1. v/r > 4v/R ⇔ r < R/4.
    2. 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.

  2. (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.

    1. With fox speed kv, the duck can circle opposite at radius R/k, then swim (1 − 1/k)R.
    2. Duck's time (1 − 1/k)R/v; fox's time πR/(kv).
    3. 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.

Source: BrainStellar: Duck and fox · Try it in the app →

Easy · BrainStellar · Logic · practice question on a reported topic

A plane flies 1,000 km from A to B and straight back at an airspeed of 500 km/h. A steady 100 km/h wind blows from A towards B for the whole trip.

  1. How many hours does the round trip take? (With no wind it would take 4.)
    Answer and worked solution

    Answer: 25/6 ≈ 4.1667

    Key idea. Time on each leg is distance ÷ ground speed; the slow leg dominates.

    1. A to B: 1000/600 = 5/3 h. B to A: 1000/400 = 5/2 h.
    2. Total = 5/3 + 5/2 = 25/6 ≈ 4.17 h.

    Check. In general the time grows by the factor 1/(1 − (w/s)²) = 1/0.96 ≈ 1.042.

    Trap. Assuming the speed-up and slow-down cancel, giving 4 hours.

Source: BrainStellar: The plane in the wind · Try it in the app →

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.

  1. (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.

    1. Cord 2 burns out after 30 minutes.
    2. 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.

  2. (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.

    1. 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.

Source: BrainStellar: Burning cords · Try it in the app →

Easy · BrainStellar · Combinatorics · practice question on a reported topic

A drawer holds 10 black and 10 red socks. You take socks out in the dark.

  1. (a) How many must you take to be sure of a matching pair?
    Answer and worked solution

    Answer: 3

    Key idea. Pigeonhole: more socks than colours forces two of a colour.

    1. Two socks can be one of each colour.
    2. The third must match one of them: 3.

    Check. With n colours you'd need n + 1.

  2. (b) How many must you take to be sure of a red pair?
    Answer and worked solution

    Answer: 12

    Key idea. The worst case uses up every sock of the wrong colour first.

    1. You could draw all 10 black socks.
    2. Then two more are both red: 10 + 2 = 12.

    Check. Check the case of 11: ten black and one red, no red pair.

    Trap. Answering 3 again: that guarantees some pair, not a red one.

Source: BrainStellar: Pairs of socks · Try it in the app →

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.

Source: BrainStellar: Opposite points · Try it in the app →

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.

  1. 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.

    1. P(no accident in an hour) = 1/4 = q².
    2. 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.

Source: BrainStellar: Accidents in half an hour · Try it in the app →

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.

  1. 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.

    1. The back prisoner says "red" if they see an even number of red hats, "blue" if odd.
    2. 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.
    3. 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.

Source: BrainStellar: Prisoners in hats · Try it in the app →

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.)

Source: BrainStellar: Knight and knave · Try it in the app →

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.

  1. 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.

    1. The wine glass has 100 ml wine in 110 ml.
    2. 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.

Source: BrainStellar: Water and wine · Try it in the app →

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.

  1. 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.

    1. Southbound comes first only if you arrive in the 1 minute between a northbound and the next southbound.
    2. 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.

Source: BrainStellar: Waiting for the train · Try it in the app →

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.

(Numerically 23.14 against 22.46.)

Source: BrainStellar: e to the π or π to the e · Try it in the app →

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.

  1. (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. 1,024 = 210: after each lap the count is still a power of two and person 1 shoots first.
    2. So position 1 survives.

    Check. Check with 4 people: 1 shoots 2, 3 shoots 4, 1 shoots 3.

  2. (b) With 100 people?
    Answer and worked solution

    Answer: 73

    Key idea. Write n = 2k + m; the survivor is 2m + 1.

    1. 100 = 64 + 36.
    2. After 36 eliminations (persons 2, 4, …, 72), person 73 is about to shoot with 64 left.
    3. So position 73 survives.

    Check. The formula gives 1 for powers of two, matching part (a).

Source: BrainStellar: Shooting round the circle · Try it in the app →

Medium · BrainStellar · Probability · practice question on a reported topic

A normal die is rolled together with a second, unseen six-sided die. Every total from 1 to 12 comes up with probability 1/12.

  1. How many faces of the unseen die show 0?
    Answer and worked solution

    Answer: 3

    Key idea. The totals split into 1–6 and 7–12, so the unseen die adds 0 or 6, each half the time.

    1. Faces 0, 0, 0, 6, 6, 6: totals 1–6 each with probability ½ × 1/6 = 1/12, and 7–12 likewise.
    2. So 3 faces show 0.

    Check. Twelve totals, each 1/12, add up to 1.

Source: BrainStellar: The invisible die · Try it in the app →

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.

Source: BrainStellar: Cards in a dark room · Try it in the app →

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.

  1. 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.

    1. k = 1: his wife sees no one else, so it must be hers; she acts on night 1.
    2. 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.
    3. 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.

Source: BrainStellar: The unfaithful husbands · Try it in the app →

Easy · BrainStellar · Conditional probability · practice question on a reported topic

A father says it snowed last night. It snows on 1 night in 8, and he lies 5 times out of 6.

  1. What is the probability it actually snowed?
    Answer and worked solution

    Answer: 1/36 ≈ 0.027778

    Key idea. Bayes: compare the two ways he could come to say it snowed.

    1. True claim: 1/8 × 1/6 = 1/48. False claim: 7/8 × 5/6 = 35/48.
    2. P(snow | he says so) = 1/(1 + 35) = 1/36.

    Check. A habitual liar's "yes" is evidence against snow: 1/36 is below the 1/8 base rate.

    Trap. Answering 1/6, his chance of telling the truth, and ignoring how rare snow is.

Source: BrainStellar: The father who lies · Try it in the app →

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.

Source: BrainStellar: The devil's penny · Try it in the app →

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.

  1. 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.

    1. n testers give 2n outcomes; you need 2n ≥ 1000.
    2. 29 = 512 is too few; 210 = 1024 is enough.
    3. With binary labels, the set of dead testers spells out the bottle number: 10 testers.

    Check. Nine testers can't work: 512 outcomes can't distinguish 1,000 bottles.

    Trap. Testing bottles one by one, which needs far more people or rounds.

Source: BrainStellar: The poisoned bottle · Try it in the app →

Medium · BrainStellar · Combinatorics · practice question on a reported topic

A rabbit climbs a staircase hopping up 1, 2 or 3 steps at a time.

  1. In how many different ways can it climb 10 steps?
    Answer and worked solution

    Answer: 274

    Key idea. Condition on the last hop: f(n) = f(n − 1) + f(n − 2) + f(n − 3).

    1. f(0) = 1, f(1) = 1, f(2) = 2.
    2. Then 4, 7, 13, 24, 44, 81, 149.
    3. f(10) = 149 + 81 + 44 = 274.

    Check. With only 1- and 2-step hops it's Fibonacci (89 ways for 10 steps); allowing 3s must give more.

Source: BrainStellar: Hopping up the stairs · Try it in the app →

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.

  1. 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.

    1. Each used 8/3 logs. C's $8 buys 8/3 logs, so $3 a log.
    2. A gave C 5 − 8/3 = 7/3 logs; B gave 3 − 8/3 = 1/3.
    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.

Source: BrainStellar: Sharing the firewood · Try it in the app →

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.

Source: BrainStellar: The infinite hotel · Try it in the app →

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.

  1. 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.

    1. 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.

Source: BrainStellar: Chuck-a-luck · Try it in the app →

Hard · BrainStellar · Combinatorics · practice question on a reported topic

In a group of 70 people, for any two people X and Y there is a language X speaks that Y doesn't, and a language Y speaks that X doesn't.

  1. What is the fewest languages the group can speak in total?
    Answer and worked solution

    Answer: 8

    Key idea. The language sets must form an antichain; Sperner's theorem gives the most people n languages can serve.

    1. With n languages, at most C(n, ⌊n/2⌋) people.
    2. C(7, 3) = 35 is too few, but C(8, 4) = 70.
    3. So 8 languages: give each person a different set of 4.

    Check. Each 4-language set has a language the other lacks, in both directions, since neither set contains the other.

Source: BrainStellar: Seventy people, many languages · Try it in the app →

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.

  1. (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.

    1. If the coins match, both guesses are right; if not, both are wrong.
    2. 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.

  2. (b) What is the team's expected profit per game with that strategy, in dollars?
    Answer and worked solution

    Answer: 0.5

    Key idea. Expected profit = P(win) × prize − cost.

    1. ½ × $3 − $1 = $0.50, so they should play.

    Check. With independent random guesses it would be ¼ × 3 − 1 = −$0.25.

Source: BrainStellar: Guess the other coin · Try it in the app →

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.

  1. 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).

    1. x = 0.6x + 0.2(1 − x) ⇒ 0.6x = 0.2.
    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.

Source: BrainStellar: Snowflake patterns · Try it in the app →

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.

  1. 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.

    1. Give 33 voters $2 and everyone else (the king too) $0: 33 yes, 32 no.
    2. Then concentrate the $66 in 17 of those 33 (17 yes, 16 no), then 9, 5, 3 and 2 people.
    3. 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.

Source: BrainStellar: The king's salary · Try it in the app →

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.

Source: BrainStellar: Counting friends · Try it in the app →

Easy · BrainStellar · Probability · practice question on a reported topic

p and q are independent uniform random numbers between 0 and 1.

  1. What is the probability that p/q lies between 1 and 2?
    Answer and worked solution

    Answer: 0.25

    Key idea. Probability equals area in the unit square.

    1. The region q ≤ p ≤ 2q is the triangle between the lines p = q and p = 2q, cut off at p = 1.
    2. Its vertices are (0, 0), (½, 1) and (1, 1): area ½ × ½ × 1 = ¼.

    Check. By symmetry P(p/q > 1) = ½, and half of that lies between 1 and 2.

Source: BrainStellar: A random ratio · Try it in the app →

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).

  1. 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.

    1. E = 15/6 + (5 + E)/6.
    2. (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.

Source: BrainStellar: The banana-eating monkey · Try it in the app →

Medium · BrainStellar · Expected value · practice question on a reported topic

You toss a fair coin until you get four heads in a row.

  1. What is the expected number of tosses?
    Answer and worked solution

    Answer: 30

    Key idea. Recursion: En = 2En−1 + 2, so En = 2n+1 − 2.

    1. E1 = 2, E2 = 6, E3 = 14.
    2. E4 = 2 × 14 + 2 = 30.

    Check. 25 − 2 = 30.

    Trap. Answering 16, the waiting time you'd get if a failed run cost nothing.

Source: BrainStellar: Four heads in a row · Try it in the app →

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.

  1. 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.

    1. Avoid each other: 14/15 (16 left) × 6/7 (8 left) × 2/3 (4 left).
    2. = 168/315 = 8/15 ≈ 0.533.

    Check. In general N/(2(N − 1)), just over ½.

Source: BrainStellar: Meeting in the final · Try it in the app →

Easy · BrainStellar · Expected value · practice question on a reported topic

A fair coin is tossed 10 times. Count the places where a head is immediately followed by a head (so HHH counts as 2).

  1. What is the expected count?
    Answer and worked solution

    Answer: 2.25

    Key idea. Linearity: the expected count is the number of adjacent pairs times P(HH).

    1. 10 tosses have 9 adjacent pairs.
    2. 9 × ¼ = 2.25.

    Check. For 2 tosses it gives ¼, and for 3 it gives ½, as expected.

    Trap. Worrying that overlapping pairs aren't independent: linearity doesn't need independence.

Source: BrainStellar: Counting double heads · Try it in the app →

Easy · BrainStellar · Probability · practice question on a reported topic

A stick of length 1 breaks at a uniformly random point.

  1. What is the expected length of the shorter piece?
    Answer and worked solution

    Answer: 0.25

    Key idea. By symmetry, the shorter piece is uniform on [0, ½].

    1. E[min(U, 1 − U)] = ¼, the midpoint of 0 and ½.
    2. So 0.25, and the longer piece averages 0.75.

    Check. Shorter + longer = 1, and 0.25 + 0.75 = 1.

Source: BrainStellar: The smaller piece · Try it in the app →

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.

Source: BrainStellar: Numbered hats · Try it in the app →

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.

Source: BrainStellar: Two questions, three unknowns · Try it in the app →

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.

Source: BrainStellar: Dominoes on a clipped board · Try it in the app →

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.

Source: BrainStellar: The magic hat · Try it in the app →

Easy · BrainStellar · Combinatorics · practice question on a reported topic

51 ants sit on a 1 × 1 square table. You have a square card of side 1/5.

  1. How many ants can you guarantee to cover with the card, wherever the ants are?
    Answer and worked solution

    Answer: 3

    Key idea. Divide the table into 25 squares of side 1/5 and use the pigeonhole principle.

    1. 51 ants in 25 squares: some square holds at least ⌈51/25⌉ = 3.
    2. Place the card on that square: 3 ants.

    Check. With 50 ants you could have exactly 2 in every square, so 3 really needs the 51st ant.

Source: BrainStellar: Catching ants · Try it in the app →

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.

Source: BrainStellar: A one-colour rectangle · Try it in the app →

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.

Source: BrainStellar: Light bulbs in a circle · Try it in the app →

Easy · BrainStellar · Logic · practice question on a reported topic

A 6 × 8 chocolate bar is to be broken into its 48 squares. Each break splits one piece along a straight line; you can't stack pieces.

  1. What is the fewest breaks needed?
    Answer and worked solution

    Answer: 47

    Key idea. Every break increases the number of pieces by exactly one, whatever you break.

    1. From 1 piece to 48 pieces takes 48 − 1 = 47 breaks, and every order of breaking uses exactly that many.

    Check. An m × n bar always needs mn − 1 breaks.

    Trap. Looking for a clever order that needs fewer: there isn't one.

Source: BrainStellar: Breaking a chocolate bar · Try it in the app →

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.

  1. 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.

    1. Each of the 50 right-walkers meets all 50 left-walkers.
    2. 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.

Source: BrainStellar: Zombies on a line · Try it in the app →

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.

Source: BrainStellar: Infection on a board · Try it in the app →

Easy · BrainStellar · Probability · practice question on a reported topic

A bag has 4 black balls and 1 red ball. Two players take turns drawing a ball without replacement, and whoever draws the red ball wins.

  1. What is the probability that the player who goes first wins?
    Answer and worked solution

    Answer: 0.6

    Key idea. The red ball is equally likely to be in any of the five draw positions.

    1. The first player gets positions 1, 3 and 5: 3/5.

    Check. With an even number of balls in total, the two players would be level.

    Trap. Answering ½ because "each player has the same chance on each draw".

Source: BrainStellar: Who draws the red ball? · Try it in the app →

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.

  1. 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.

    1. k = 1, …, 9 equally likely; min(k, 10 − k) = 1, 2, 3, 4, 5, 4, 3, 2, 1.
    2. Sum 25, so the expectation is 25/9 ≈ 2.78.

    Check. The fuller box then averages 10 − 25/9 ≈ 7.22: rich boxes get richer.

    Trap. Expecting the boxes to stay roughly balanced.

Source: BrainStellar: The crazy postman · Try it in the app →

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.

  1. (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.

    1. P(win) = 1/2 and E[V | win] = 25, worth 45 to you.
    2. 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.

  2. (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.

    1. Expected profit = (x/100)(0.9x − x) = −0.001x², which is negative for every x > 0.
    2. So the best offer is $0: don't bid.

    Check. The 80% advantage would need to exceed 100% for any bid to pay.

    Trap. Bidding just under the break-even of $55.

Source: BrainStellar: A single bid · Try it in the app →

Medium · BrainStellar · Probability · practice question on a reported topic

Trucks pass a point as a Poisson process, on average one every 10 minutes. Your car breaks down there at a random moment.

  1. (a) What is your expected wait, in minutes, for the next truck?
    Answer and worked solution

    Answer: 10

    Key idea. Memorylessness: the wait from any fixed moment is exponential with the same mean.

    1. Expected wait = mean gap = 10 minutes.

    Check. Running time backwards gives the same process, so the last truck also passed 10 minutes ago on average.

    Trap. Answering 5, half the average gap.

  2. (b) What is the expected length, in minutes, of the gap between trucks that you land in?
    Answer and worked solution

    Answer: 20

    Key idea. Inspection paradox: you land in gaps in proportion to their length.

    1. Backward wait 10 + forward wait 10 = 20 minutes, twice the average gap.

    Check. For exponential gaps, E[X²]/E[X] = 2 × 10 = 20, the length-biased mean.

    Trap. Answering 10, the average gap.

Source: BrainStellar: Waiting for a truck · Try it in the app →

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.

  1. 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.

    1. Orderings with 1 before 2: (1, 2, 3), (1, 3, 2), (3, 1, 2).
    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.

Source: BrainStellar: The blind archer · Try it in the app →

Medium · BrainStellar · Combinatorics · practice question on a reported topic

You need both the smallest and largest of 100 numbers, using comparisons only.

  1. What is the fewest comparisons that always suffices?
    Answer and worked solution

    Answer: 148

    Key idea. Pair up first, so each element is a candidate for only one of the two searches.

    1. 50 comparisons split the numbers into 50 winners and 50 losers.
    2. Maximum of the winners: 49. Minimum of the losers: 49.
    3. Total 50 + 49 + 49 = 148, against 198 done separately.

    Check. In general ⌈3n/2⌉ − 2, which is known to be optimal.

Source: BrainStellar: Minimum and maximum together · Try it in the app →

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.

  1. 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.

    1. 9 meetings including the one at the very end.
    2. 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.

Source: BrainStellar: The crazy clock · Try it in the app →

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.

Source: BrainStellar: Passing candies round a circle · Try it in the app →

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.

Source: BrainStellar: Covering with overlapping coins · Try it in the app →

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.

Source: BrainStellar: Growing a square of coins · Try it in the app →

Medium · BrainStellar · Sequences · practice question on a reported topic

Find the next term of each sequence.

  1. (a) 1, 11, 21, 1211, 111221, ?
    Answer and worked solution

    Answer: 312210

    Key idea. Look-and-say: each term describes the previous one digit by digit.

    1. 111221 is three 1s, two 2s, one 1.
    2. That reads 312211.

    Check. Only digits 1, 2 and 3 ever appear in this sequence.

  2. (b) 10, 11, 12, 13, 14, 20, 22, 101, ?
    Answer and worked solution

    Answer: 1010

    Key idea. It's ten written in bases 10, 9, 8, … down.

    1. 101 is ten in base 3.
    2. Ten in base 2 is 1010; the term after that would be ten 1s, in base 1.

    Check. Check: 22 in base 4 is 2 × 4 + 2 = 10.

Source: BrainStellar: Strange sequences · Try it in the app →

Hard · BrainStellar · Expected value · practice question on a reported topic

A shuffled deck has 26 red and 26 black cards. A run is a maximal block of consecutive cards of the same colour.

  1. What is the expected number of runs?
    Answer and worked solution

    Answer: 27

    Key idea. Runs = 1 + number of adjacent pairs that differ; use linearity.

    1. Each of the 51 adjacent pairs differs with probability 26/51.
    2. E = 1 + 51 × 26/51 = 27.

    Check. For n red and n black cards it's n + 1.

Source: BrainStellar: Runs of colour · Try it in the app →

Medium · BrainStellar · Markov chains · practice question on a reported topic

An ant walks along the edges of a cube, choosing each edge at random at every corner.

  1. Starting from a corner, what is the expected number of edges walked before it first returns to that corner?
    Answer and worked solution

    Answer: 8

    Key idea. Expected return time = 1/π(start), and the walk spends equal time at every corner.

    1. π = 1/8 for each corner.
    2. Expected return time = 8 steps.

    Check. Getting to the opposite corner takes 10 steps on average, more than coming back, because the far corner is only reached from three neighbours.

Source: BrainStellar: Back to the start on a cube · Try it in the app →

Hard · BrainStellar · Probability · practice question on a reported topic

A point is chosen uniformly on the surface of a sphere of radius 1.

  1. What is its expected straight-line distance (through the sphere) from the North Pole?
    Answer and worked solution

    Answer: 4/3 ≈ 1.3333

    Key idea. Height is uniform on [−1, 1], and the distance to the pole is √(2 − 2z).

    1. E = ½ ∫ from −1 to 1 of √(2 − 2z) dz. Put u = 2 − 2z, from 4 to 0: ¼ ∫ from 0 to 4 of √u du.
    2. = ¼ × (2/3) × 43/2 = ¼ × 16/3 = 4/3.

    Check. The distance runs from 0 to 2; 4/3 is above 1 because more of the sphere's area lies far from the pole.

Source: BrainStellar: Distance from the North Pole · Try it in the app →

Medium · BrainStellar · Probability · practice question on a reported topic

A stick of length 1 is cut at two independent uniform points.

  1. What is the expected length of the middle piece?
    Answer and worked solution

    Answer: 1/3 ≈ 0.33333

    Key idea. The three pieces are exchangeable, so each has mean one third.

    1. E[left] = E[middle] = E[right], and they add to 1.
    2. E[middle] = 1/3.

    Check. Direct check: E|X − Y| for two uniforms is 1/3.

    Trap. Thinking the middle piece is shorter because "it's squeezed between two cuts".

Source: BrainStellar: The middle piece · Try it in the app →

Easy · BrainStellar · Expected value · practice question on a reported topic

n letters are put into n addressed envelopes at random, one per envelope.

  1. What is the expected number of letters in their correct envelope?
    Answer and worked solution

    Answer: 1

    Key idea. Linearity of expectation over n indicators, each with mean 1/n.

    1. E = n × 1/n = 1, for every n.

    Check. For n = 2: both right or both wrong, each with probability ½, so E = 1.

Source: BrainStellar: Letters in the right envelopes · Try it in the app →

Medium · BrainStellar · Expected value · practice question on a reported topic

Each bottle of soda comes with one of 10 coupons, all equally likely. You win a prize when you have all 10.

  1. How many bottles do you expect to buy?
    Answer and worked solution

    Answer: 29.29

    Key idea. Sum of geometric waiting times: 10 × (1 + 1/2 + … + 1/10).

    1. E = 10/10 + 10/9 + … + 10/1 = 10 × H10.
    2. H10 ≈ 2.929, so E ≈ 29.29.

    Check. In general n·Hn ≈ n ln n + 0.58n; for n = 10 that's about 28.8.

    Trap. Answering 10, or thinking the last few coupons are as quick as the first.

Source: BrainStellar: Collecting coupons · Try it in the app →

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.

  1. (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.

    1. E[loops] = 1/1 + 1/3 + 1/5 + … + 1/199.
    2. That sum is about 3.28.

    Check. It grows like ½ ln N, so even a million noodles give only about 8 loops.

  2. (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.

    1. k = 3: 4/5. k = 2: 2/3.
    2. P = 4/5 × 2/3 = 8/15.

    Check. The last tie always closes the loop, so it isn't in the product.

Source: BrainStellar: Noodle loops · Try it in the app →

Medium · BrainStellar · Expected value · practice question on a reported topic

You draw 10 numbers, with replacement, uniformly from {1, …, 10}.

  1. What is the expected number of distinct values drawn?
    Answer and worked solution

    Answer: 6.5132

    Key idea. Linearity over the ten values, each seen with probability 1 − (1 − 1/n)n.

    1. (0.9)10 ≈ 0.349, so each value appears with probability ≈ 0.651.
    2. E ≈ 10 × 0.651 = 6.51.

    Check. For large n the fraction seen tends to 1 − 1/e ≈ 63%.

Source: BrainStellar: Distinct values drawn · Try it in the app →

Medium · BrainStellar · Expected value · practice question on a reported topic

You turn over a shuffled 52-card deck one card at a time.

  1. What is the expected position of the first king or queen?
    Answer and worked solution

    Answer: 53/9 ≈ 5.8889

    Key idea. k special cards split the others into k + 1 equal-on-average gaps.

    1. 44/9 non-special cards come before the first king or queen on average.
    2. Position = 44/9 + 1 = 53/9 ≈ 5.89.

    Check. For aces (4 special cards) the same argument gives 53/5.

Source: BrainStellar: The first picture card · Try it in the app →

Medium · BrainStellar · Probability · practice question on a reported topic

You turn two uniform random numbers X and Y on [0, 1] into a point in the unit disc: angle θ = 2πX and radius r = g(Y).

  1. For the point to be uniform over the disc, what must P(r ≤ ½) be?
    Answer and worked solution

    Answer: 0.25

    Key idea. P(r ≤ t) must equal the area fraction t², so take r = √Y.

    1. P(r ≤ ½) = (½)² = ¼.

    Check. With r = Y, half the points would land inside radius ½, bunching them at the centre.

    Trap. Using r = Y.

Source: BrainStellar: A uniform point in a disc · Try it in the app →

Hard · BrainStellar · Probability · practice question on a reported topic

5 points are chosen independently and uniformly on a circle, and joined to make a pentagon.

  1. What is the probability that the centre of the circle lies inside the pentagon?
    Answer and worked solution

    Answer: 0.6875

    Key idea. The centre is outside exactly when all points fit in a semicircle.

    1. P(all 5 in a semicircle) = 5/24 = 5/16.
    2. P(centre inside) = 1 − 5/16 = 11/16.

    Check. For a triangle it's 1 − 3/4 = 1/4, the classic answer.

Source: BrainStellar: Enclosing the centre · Try it in the app →

Medium · BrainStellar · Probability · practice question on a reported topic

You add up independent uniform random numbers on [0, 1] until the total exceeds 1.

  1. What is the probability that you need more than 3 numbers?
    Answer and worked solution

    Answer: 1/6 ≈ 0.16667

    Key idea. More than n draws ⇔ the first n sum to at most 1, with probability 1/n!.

    1. P = 1/3! = 1/6.

    Check. Summing P(N > n) over n gives E[N] = Σ 1/n! = e.

Source: BrainStellar: Adding uniforms past 1 · Try it in the app →

Medium · BrainStellar · Random walks · practice question on a reported topic

A symmetric random walk starts at 0 and moves +1 or −1 with equal probability each step.

  1. (a) What is the probability it reaches +3 before −7?
    Answer and worked solution

    Answer: 0.7

    Key idea. Optional stopping: E[final position] = 0.

    1. 3p − 7(1 − p) = 0 ⇒ 10p = 7.
    2. p = 0.7.

    Check. In general b/(a + b): the nearer barrier is the likelier.

  2. (b) What is the expected number of steps until it hits either barrier?
    Answer and worked solution

    Answer: 21

    Key idea. Xn² − n is a martingale, so E[steps] = E[X²] at the stop.

    1. E[X²] = 9 × 0.7 + 49 × 0.3 = 6.3 + 14.7 = 21.
    2. E[steps] = 21 (= 3 × 7).

    Check. The formula ab gives 3 × 7 = 21.

Source: BrainStellar: Up 3 before down 7 · Try it in the app →

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.

  1. 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.

    1. Green last (30/60): need the last of the 30 red-and-blue candies to be blue: 20/30.
    2. Blue last (20/60): need the last of the 40 red-and-green to be green: 30/40.
    3. 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.

Source: BrainStellar: Candies left in the jar · Try it in the app →

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.

Source: BrainStellar: Catching the submarine · Try it in the app →

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.

Source: BrainStellar: Catching the spy · Try it in the app →

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.

Source: BrainStellar: Counting the gold coins · Try it in the app →

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.

Source: BrainStellar: Find one honest agent · Try it in the app →

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.

  1. (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.

    1. Two pairs can't share a lock: together they involve at least 3 people, one of whom would need the key.
    2. 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.

  2. (b) How many keys does each person carry?
    Answer and worked solution

    Answer: 6

    Key idea. Count keys: 10 locks × 3 keys, shared equally by 5 people.

    1. 30 keys / 5 = 6 each.

    Check. Each person lacks the keys to the C(4, 1) = 4 locks of the pairs including them: 10 − 4 = 6.

Source: BrainStellar: Locks on the safe · Try it in the app →

Medium · BrainStellar · Combinatorics · practice question on a reported topic

You want to weigh every whole number of grams from 1 to 40 on a two-pan balance, putting weights on either pan.

  1. What is the fewest weights needed?
    Answer and worked solution

    Answer: 4

    Key idea. Balanced ternary: weights 1, 3, 9, 27 cover 1 to 40 exactly.

    1. With n weights there are at most (3n − 1)/2 positive totals.
    2. n = 3 gives at most 13; n = 4 gives 40, achieved by 1, 3, 9, 27.
    3. So 4 weights.

    Check. Check 2 = 3 − 1: weigh with the 3 on one pan and the 1 next to the object.

    Trap. Answering 6 (powers of two: 1, 2, 4, 8, 16, 32), which only uses one pan.

Source: BrainStellar: Weighing with a balance · Try it in the app →

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.

Source: BrainStellar: Petrol stations round a circuit · Try it in the app →

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.

Source: BrainStellar: Bricks in a box · Try it in the app →

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.

  1. 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.

    1. 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.
    2. Total by rows is negative, by columns positive: contradiction.
    3. 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.

Source: BrainStellar: Positive eights, negative fives · Try it in the app →

Hard · BrainStellar · Probability · practice question on a reported topic

Two cylinders of radius 1 cross at right angles, their axes meeting.

  1. What is the volume of their intersection?
    Answer and worked solution

    Answer: 16/3 ≈ 5.3333

    Key idea. Horizontal slices are squares of side 2√(1 − z²).

    1. V = ∫ from −1 to 1 of 4(1 − z²) dz = 4 × (2 − 2/3).
    2. = 16/3.

    Check. The inscribed unit sphere has slices that are circles inscribed in those squares, so V = (4/π) × (4π/3) = 16/3.

Source: BrainStellar: Two crossing cylinders · Try it in the app →

Medium · BrainStellar · Expected value · practice question on a reported topic

An urn has 50 black and 50 white balls, drawn one at a time without replacement.

  1. What is the expected number of times consecutive draws differ in colour?
    Answer and worked solution

    Answer: 50

    Key idea. Linearity over the 99 adjacent pairs.

    1. E = 99 × 50/99 = 50.

    Check. It's the expected number of runs minus 1 (51 − 1).

Source: BrainStellar: Colour changes · Try it in the app →

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.)

Source: BrainStellar: The divisor game · Try it in the app →

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.

Source: BrainStellar: Estimating clan size · Try it in the app →

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.)

Source: BrainStellar: Infinitely many hats · Try it in the app →

Medium · BrainStellar · Optimal stopping · practice question on a reported topic

You may roll a fair die up to four times, stopping whenever you like; you score the last roll.

  1. What is the expected score with the best strategy?
    Answer and worked solution

    Answer: 89/18 ≈ 4.9444

    Key idea. Backward induction: keep a roll if it beats the value of continuing.

    1. V1 = 3.5, V2 = 4.25, V3 = 14/3 ≈ 4.67.
    2. With four rolls, keep 5 or 6 (above 4.67): V4 = (5 + 6)/6 + (4/6) × 14/3.
    3. = 11/6 + 28/9 = 89/18 ≈ 4.94.

    Check. Each extra roll adds less and less: 0.75, 0.42, 0.28.

Source: BrainStellar: Up to four rolls · Try it in the app →

Medium · BrainStellar · Expected value · practice question on a reported topic

You roll a fair die repeatedly.

  1. What is the expected number of rolls until a 6 is immediately followed by a 5?
    Answer and worked solution

    Answer: 36

    Key idea. Two-state recursion; a repeated 6 doesn't lose progress.

    1. From E: E = 6 + F. From F: (5/6)F = 1 + (2/3)E.
    2. Substituting: (5/6)(E − 6) = 1 + (2/3)E ⇒ E/6 = 6.
    3. E = 36.

    Check. Patterns with no self-overlap, like 65, take 1/P(pattern) = 36. A pattern like 66 takes 42.

Source: BrainStellar: Waiting for 6 then 5 · Try it in the app →

Hard · BrainStellar · Combinatorics · practice question on a reported topic

A fair die is rolled 10 times.

  1. How many of the 610 possible sequences never decrease?
    Answer and worked solution

    Answer: 3003

    Key idea. Non-decreasing sequences ↔ face counts (n₁, …, n₆) adding to 10: stars and bars.

    1. C(15, 5) = 3,003.

    Check. So the probability is 3003/610 ≈ 0.00005.

Source: BrainStellar: Non-decreasing rolls · Try it in the app →

Medium · BrainStellar · Probability · practice question on a reported topic

Two dice are thrown, then thrown again.

  1. What is the probability the second throw shows the same pair of faces as the first (in either order)?
    Answer and worked solution

    Answer: 0.050926

    Key idea. Condition on the first throw being a double or not.

    1. Double: 1/6 × 1/36 = 1/216.
    2. Different faces: 5/6 × 2/36 = 10/216.
    3. Total 11/216 ≈ 0.051.

    Check. It's a little under 2/36: doubles are harder to repeat.

    Trap. Answering 1/36 and forgetting the faces can come in either order.

Source: BrainStellar: The same pair again · Try it in the app →

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.

  1. (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.

    1. Empty chambers E1, E2, E3 come before the block of bullets B1, B2, B3.
    2. 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.

  2. (b) If the cylinder is spun again first?
    Answer and worked solution

    Answer: 0.5

    Key idea. A spin resets everything.

    1. 3/6 = ½, worse than not spinning.

    Check. Not spinning: 1/3. Spinning: 1/2. Don't spin.

Source: BrainStellar: Three bullets in a row · Try it in the app →

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.

  1. 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.

    1. 2 pirates: (100, 0). 3: (99, 0, 1). 4: (99, 0, 1, 0). 5: (98, 0, 1, 0, 1).
    2. 6: (98, 0, 1, 0, 1, 0). 7: pay 1 coin to each of the 3 pirates who get 0 in the 6-pirate plan.
    3. The senior pirate keeps 100 − 3 = 97.

    Check. The pattern is 100 − ⌊(n − 1)/2⌋ while there are enough coins.

Source: BrainStellar: Seven pirates · Try it in the app →

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.

  1. 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.

    1. Each other closed door has probability 3/8.
    2. 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).

Source: BrainStellar: Monty Hall with four doors · Try it in the app →

Easy · BrainStellar · Logic · practice question on a reported topic

1,000 bulbs are off. Person k toggles every bulb whose number is a multiple of k, for k = 1, 2, …, 1,000.

  1. How many bulbs are on at the end?
    Answer and worked solution

    Answer: 31

    Key idea. Only perfect squares have an odd number of divisors, so only they end on.

    1. 31² = 961 ≤ 1000 < 1024 = 32².
    2. So 31 bulbs are on.

    Check. With 100 bulbs the answer is 10, matching √100.

Source: BrainStellar: A thousand bulbs · Try it in the app →

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.

  1. 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).

    1. 2 × 0.8 × 0.2 = 0.32, so 1/0.32 = 3.125 pairs on average.
    2. Tosses = 2 × 3.125 = 6.25.

    Check. The formula 1/(p(1 − p)) gives 1/0.16 = 6.25.

Source: BrainStellar: A fair toss from a biased coin · Try it in the app →

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.

  1. 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.

    1. d = 8: 8 + 28 + 56 = 92, too few.
    2. d = 9: 9 + 36 + 84 = 129 ≥ 100.
    3. So 9 drops.

    Check. Two eggs need 14 drops; the third egg saves 5.

Source: BrainStellar: Three eggs, 100 floors · Try it in the app →

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.

  1. 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.

    1. Pairs with at least one Tuesday boy: 14 + 14 − 1 = 27.
    2. Of those, both boys: 7 + 7 − 1 = 13.
    3. 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.

Source: BrainStellar: A boy born on a Tuesday · Try it in the app →

Easy · BrainStellar · Probability · practice question on a reported topic

Two witches each arrive at a café at an independent uniform time within the same hour, and each stays exactly 30 minutes.

  1. What is the probability they are in the café at the same time?
    Answer and worked solution

    Answer: 0.75

    Key idea. Area in the unit square where |x − y| ≤ ½.

    1. Missing regions: two triangles with legs ½, total area 2 × ½ × ¼ = ¼.
    2. P(meet) = 1 − ¼ = ¾.

    Check. With stays of w hours it's 1 − (1 − w)².

Source: BrainStellar: Two witches at the café · Try it in the app →

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.

  1. 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.

    1. The first of seats 1, 99, 100 to be taken is equally likely to be any of them.
    2. If it's 99, passenger 99 is displaced; otherwise they sit in their own seat.
    3. P = 2/3.

    Check. For the last passenger the same argument gives 1/2.

Source: BrainStellar: The second-to-last passenger · Try it in the app →

Hard · BrainStellar · Probability · practice question on a reported topic

A stick of length 1 is broken at a uniform random point. Then the longer piece is broken at a uniform random point along its length.

  1. What is the probability the three pieces form a triangle?
    Answer and worked solution

    Answer: 0.38629

    Key idea. Condition on the longer piece's length L, uniform on [½, 1].

    1. Given L, the cut must land within ½ of both ends: a window of length 1 − L out of L.
    2. P = 2 ∫ from ½ to 1 of (1 − L)/L dL = 2(ln 2 − ½).
    3. = 2 ln 2 − 1 ≈ 0.386.

    Check. Breaking the longer piece helps: two random cuts on the whole stick give only 0.25.

Source: BrainStellar: Break the longer piece · Try it in the app →

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.

  1. 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.

    1. Each later prisoner subtracts the hats they see and the colours already called (all correct) from the announced total, mod 10.
    2. 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.

Source: BrainStellar: Hats in ten colours · Try it in the app →

Medium · EigenPrep · Expected value · practice question on a reported topic

Two envelopes hold X and 2X dollars, where X is 50 or 100 with equal probability. You open one at random and see $100.

  1. What is the expected amount in the other envelope?
    Answer and worked solution

    Answer: 125

    Key idea. With a genuine prior over X, Bayes says what "the other envelope" is worth.

    1. P(X = 50 and you hold 2X) = ¼; P(X = 100 and you hold X) = ¼. Equal, so each is ½ given what you saw.
    2. E[other] = ½ × 50 + ½ × 200 = $125, so here switching is right.

    Check. Had you seen $200, the other would certainly be $100; seeing $50, certainly $100. Over all outcomes switching gains nothing on average.

    Trap. Assuming "double or half, equally likely" for every amount, which no real prior allows.

Source: EigenPrep: Two envelopes with a real prior · Try it in the app →

Easy · EigenPrep · Statistics · practice question on a reported topic

A coin of unknown bias lands heads 7 times in 10 tosses.

  1. (a) What is the maximum-likelihood estimate of P(heads)?
    Answer and worked solution

    Answer: 0.7

    Key idea. The binomial MLE is the observed proportion h/n.

    1. 7/p = 3/(1 − p) ⇒ 7 − 7p = 3p ⇒ p = 7/10.
    2. p̂ = 0.7.

    Check. The estimate always matches the sample frequency.

  2. (b) What is its standard error?
    Answer and worked solution

    Answer: 0.14491

    Key idea. SE = √(p̂(1 − p̂)/n).

    1. √(0.7 × 0.3/10) = √0.021 ≈ 0.145.

    Check. So a rough 95% interval is 0.7 ± 0.28: ten tosses tell you little.

Source: EigenPrep: Estimating a coin’s bias · Try it in the app →

Easy · EigenPrep · Conditional probability · practice question on a reported topic

Three boxes hold two gold coins, two silver coins, and one of each. You pick a box at random and draw a coin at random from it: it's gold.

  1. What is the probability the other coin in that box is gold?
    Answer and worked solution

    Answer: 2/3 ≈ 0.66667

    Key idea. Condition on which gold coin you drew; each is equally likely.

    1. Three gold coins, two of them in the gold-gold box.
    2. P = 2/3.

    Check. Bayes: (1 × ⅓)/(1 × ⅓ + ½ × ⅓) = 2/3.

    Trap. Answering ½ because "it's one of two boxes".

Source: EigenPrep: Bertrand's boxes · Try it in the app →

Medium · EigenPrep · Random walks · practice question on a reported topic

A gambler with $5 bets $1 a round, winning with probability 0.6, until reaching $10 or $0.

  1. What is the probability of reaching $10?
    Answer and worked solution

    Answer: 0.88364

    Key idea. Gambler's ruin with ratio r = q/p: P(k) = (1 − rk)/(1 − rN).

    1. r = 0.4/0.6 = 2/3, k = 5, N = 10.
    2. (1 − 0.1317)/(1 − 0.0173) ≈ 0.884.

    Check. A fair game would give 5/10 = 0.5; a modest edge helps a lot.

Source: EigenPrep: Ruin with a biased game · Try it in the app →

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.

  1. 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.

    1. Each of the 6 other closed doors has 9/10 ÷ 6 = 0.15.
    2. Switching wins with probability 0.15, against 0.1 for staying.

    Check. With 3 doors and one opened this gives the familiar 2/3.

Source: EigenPrep: Monty Hall with ten doors · Try it in the app →

Medium · EigenPrep · Expected value · practice question on a reported topic

Each box contains one of two coupons: A with probability 0.2, B with probability 0.8.

  1. What is the expected number of boxes to collect both?
    Answer and worked solution

    Answer: 5.25

    Key idea. max(TA, TB) = TA + TB − min.

    1. E[TA] = 5, E[TB] = 1.25, E[min] = 1.
    2. E = 5 + 1.25 − 1 = 5.25.

    Check. Equal odds would give 3: rare coupons are what make collecting slow.

Source: EigenPrep: Two coupons, unequal odds · Try it in the app →

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.

  1. 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.

    1. r = 1: ¼(1 + ½ + ⅓) = 11/24. r = 2: ½(½ + ⅓) = 5/12.
    2. 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.

Source: EigenPrep: The secretary problem with four · Try it in the app →

Medium · EigenPrep · Combinatorics · practice question on a reported topic

Candidate A gets 6 votes and B gets 4, counted in random order.

  1. What is the probability A is strictly ahead throughout the count?
    Answer and worked solution

    Answer: 0.2

    Key idea. Ballot theorem.

    1. (6 − 4)/(6 + 4) = 0.2.

    Check. The first vote must go to A (probability 0.6), so the answer must be below 0.6.

Source: EigenPrep: Always ahead in the count · Try it in the app →

Easy · EigenPrep · Random walks · practice question on a reported topic

A symmetric random walk starts at 0 and steps ±1.

  1. (a) What is the probability it ever returns to 0?
    Answer and worked solution

    Answer: 1

    Key idea. One-dimensional symmetric walks are recurrent.

    1. From ±1, hitting 0 before ±N has probability 1 − 1/N → 1.
    2. So it returns with probability 1 (though the expected return time is infinite).

    Check. In three or more dimensions the return probability is below 1.

  2. (b) What is the probability it is at 0 after exactly 4 steps?
    Answer and worked solution

    Answer: 0.375

    Key idea. Count paths with two ups and two downs.

    1. C(4, 2)/24 = 6/16 = 3/8.

    Check. After 2 steps it would be 2/4 = ½.

Source: EigenPrep: Back at zero · Try it in the app →

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.

  1. What is the probability player 1 wins?
    Answer and worked solution

    Answer: 0.75

    Key idea. Only the deciding round matters.

    1. P(round decides) = 1 − ½ × ⅔ = ⅔. P(player 1 succeeds in it) = ½.
    2. P = (½)/(⅔) = ¾.

    Check. Formula p₁/(p₁ + p₂ − p₁p₂) = 0.5/0.667.

Source: EigenPrep: First success wins · Try it in the app →

Hard · EigenPrep · Probability · practice question on a reported topic

People's birthdays are independent and uniform over 365 days.

  1. What is the smallest group in which the chance that some three share a birthday exceeds ½?
    Answer and worked solution

    Answer: 88

    Key idea. P(no triple) = Σ over j of [ways with j pairs and n − 2j singles] / 365n.

    1. At n = 87 the chance of a triple is just under ½; at n = 88 it is just over.
    2. So 88 people.

    Check. For pairs the threshold is 23; triples need almost four times as many.

Source: EigenPrep: Three people, one birthday · Try it in the app →

Medium · EigenPrep · Expected value · practice question on a reported topic

A fair coin is tossed until it lands heads; if that takes n tosses you win $2n, but the casino can pay at most $220 (about $1 million).

  1. What is the fair price of the game?
    Answer and worked solution

    Answer: 21

    Key idea. A cap turns the infinite expectation into a small finite one.

    1. Uncapped part: 20 × 1 = 20.
    2. Capped part: (½)20 × 220 = 1.
    3. Fair price = $21.

    Check. Each doubling of the cap adds only $1, which is why people won't pay much.

Source: EigenPrep: St Petersburg with a cap · Try it in the app →

Medium · EigenPrep · Probability · practice question on a reported topic

An urn starts with 2 red and 3 black balls. Each time you draw a ball, you put it back with another of the same colour.

  1. What is the probability the fifth ball drawn is red?
    Answer and worked solution

    Answer: 0.4

    Key idea. Exchangeability: P(n-th draw red) = r/(r + b) for every n.

    1. 2/(2 + 3) = 0.4.

    Check. Check the second draw: ⅖ × ½ + ⅗ × ⅓ = ⅕ + ⅕ = ⅖.

Source: EigenPrep: Pólya urn · Try it in the app →

Medium · EigenPrep · Combinatorics · practice question on a reported topic

Five people take back their hats at random.

  1. What is the probability no one gets their own hat?
    Answer and worked solution

    Answer: 11/30 ≈ 0.36667

    Key idea. Derangements: D₅ = 44 out of 120 permutations.

    1. D₅ = 4 × (9 + 2) = 44.
    2. P = 44/120 = 11/30 ≈ 0.367.

    Check. Already very close to 1/e ≈ 0.368.

Source: EigenPrep: Nobody gets their own hat · Try it in the app →

Hard · EigenPrep · Probability · practice question on a reported topic

A man carries two matchboxes, each with 5 matches, and takes a match from a box chosen at random each time.

  1. What is the probability that when he first opens an empty box, the other is also empty?
    Answer and worked solution

    Answer: 0.24609

    Key idea. Both empty at that moment means the first 10 picks split 5 and 5.

    1. C(10, 5)/210 = 252/1024 ≈ 0.246.

    Check. In general P(k left) = C(2n − k, n)/22n − k; k = 0 gives this.

Source: EigenPrep: Banach's matchboxes · Try it in the app →

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.

Source: EigenPrep: The two generals · Try it in the app →

Hard · EigenPrep · Expected value · practice question on a reported topic

A deck has 5 red and 5 blue cards, shuffled. You deal cards until every card of one colour has been dealt.

  1. What is the expected number of cards dealt?
    Answer and worked solution

    Answer: 25/3 ≈ 8.3333

    Key idea. Cards dealt = 10 − cards left; the leftovers are a tail of one colour.

    1. A red card is left over if it follows all 5 blues: probability 1/6. Same for each blue.
    2. E[left] = 5/6 + 5/6 = 5/3.
    3. E[dealt] = 10 − 5/3 = 25/3 ≈ 8.33.

    Check. In general r + b − r/(b + 1) − b/(r + 1).

Source: EigenPrep: Until one colour runs out · Try it in the app →

Medium · EigenPrep · Probability · practice question on a reported topic

A needle of length 1 is dropped on a floor ruled with parallel lines 2 apart.

  1. What is the probability the needle crosses a line?
    Answer and worked solution

    Answer: 0.31831

    Key idea. Buffon: P = 2L/(πD).

    1. 2 × 1/(π × 2) = 1/π ≈ 0.318.

    Check. A needle as long as the gap (L = D) would cross with probability 2/π ≈ 0.64.

Source: EigenPrep: Buffon's needle · Try it in the app →

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).

  1. What is the expected number of tables after 10 customers?
    Answer and worked solution

    Answer: 2.929

    Key idea. Linearity: E[tables] = Σ P(customer i opens one) = H10.

    1. H10 = 1 + 1/2 + … + 1/10 ≈ 2.93.

    Check. It grows like ln n: 100 customers give only about 5.2 tables.

Source: EigenPrep: The Chinese restaurant · Try it in the app →

Easy · EigenPrep · Probability · practice question on a reported topic

In the Elo system, a player rated D points above an opponent has expected score 1/(1 + 10−D/400).

  1. What is the expected score of a player rated 200 points higher?
    Answer and worked solution

    Answer: 0.75975

    Key idea. Direct substitution.

    1. 1/(1 + 0.316) ≈ 0.76.

    Check. 400 points gives 1/(1 + 0.1) ≈ 0.91.

Source: EigenPrep: Elo expected score · Try it in the app →

Easy · EigenPrep · Probability · practice question on a reported topic

A ball falls through 10 rows of pegs, bouncing left or right with equal chance at each.

  1. What is the probability it lands in the middle bin (5 lefts and 5 rights)?
    Answer and worked solution

    Answer: 0.24609

    Key idea. Binomial(10, ½) at its mode.

    1. 252/1024 ≈ 0.246.

    Check. Normal approximation: 1/√(2π × 2.5) ≈ 0.25.

Source: EigenPrep: The Galton board · Try it in the app →

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.

  1. How many of the 27 preference lists are parking functions?
    Answer and worked solution

    Answer: 16

    Key idea. Pollak's circle argument gives (n + 1)n − 1.

    1. (3 + 1)2 = 16.

    Check. For two cars: 3 lists (11, 12, 21) out of 4, matching 3¹ = 3.

Source: EigenPrep: Parking functions · Try it in the app →

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).

  1. (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. 1 − (½)6 = 63/64.

    Check. High chance of a small win…

  2. (b) What is your expected profit?
    Answer and worked solution

    Answer: 0

    Key idea. A fair game stays fair whatever the betting system.

    1. 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.

Source: EigenPrep: The doubling strategy · Try it in the app →

Easy · EigenPrep · Logic · practice question on a reported topic

Between 3:00 and 4:00, the hour and minute hands of a clock point the same way once.

  1. How many minutes after 3:00 does that happen?
    Answer and worked solution

    Answer: 180/11 ≈ 16.364

    Key idea. The minute hand gains 5.5° a minute and must make up 90°.

    1. t = 90/5.5 = 180/11.
    2. ≈ 16.36 minutes, about 3:16:22.

    Check. Overlaps are 12/11 hours apart: 3 × 12/11 h = 3h 16.36 min.

Source: EigenPrep: When the hands meet · Try it in the app →

Medium · EigenPrep · Logic · practice question on a reported topic

27 balls look the same; one is slightly heavier. You have a two-pan balance.

  1. What is the fewest weighings that always finds the heavy ball?
    Answer and worked solution

    Answer: 3

    Key idea. Each weighing splits the candidates into three groups.

    1. 9 v 9: the heavy ball is in the heavier group or the 9 left out.
    2. 3 v 3, then 1 v 1.
    3. 33 = 27, so 3 weighings.

    Check. 12 balls also need 3 (since 9 < 12 ≤ 27); 28 would need 4.

Source: EigenPrep: Find the heavy ball · Try it in the app →

Medium · EigenPrep · Expected value · practice question on a reported topic

Alice tosses a fair coin until she sees HT; Bob tosses until he sees HH.

  1. (a) Expected tosses for Alice (HT)?
    Answer and worked solution

    Answer: 4

    Key idea. HT: wait for H, then wait for T; a second H doesn't set her back.

    1. 2 + 2 = 4.

    Check. For a non-overlapping pattern of length k, the wait is 2k = 4.

  2. (b) Expected tosses for Bob (HH)?
    Answer and worked solution

    Answer: 6

    Key idea. HH overlaps itself, and a failed second toss loses all progress.

    1. From the two equations, E = 6.

    Check. Patterns that overlap themselves take longer: HH 6, HT 4.

    Trap. Thinking both patterns take the same time because each has probability ¼.

Source: EigenPrep: Waiting for HT or HH · Try it in the app →

Easy · EigenPrep · Probability · practice question on a reported topic

Ants sit at the corners of a polygon. Each picks a direction along an edge at random and walks.

  1. (a) With 3 ants on a triangle, what is the probability none collide?
    Answer and worked solution

    Answer: 0.25

    Key idea. Only "all clockwise" and "all anticlockwise" avoid collisions.

    1. 2/8 = ¼.
  2. (b) With 4 ants on a square?
    Answer and worked solution

    Answer: 0.125

    Key idea. Still only two safe choices.

    1. 2/16 = 1/8.

    Check. For n ants: 2/2n.

Source: EigenPrep: Ants on a polygon · Try it in the app →

Medium · EigenPrep · Conditional probability · practice question on a reported topic

One of 1,000 coins has heads on both sides. You pick a coin at random and toss it 10 times: all heads.

  1. What is the probability you picked the double-headed coin?
    Answer and worked solution

    Answer: 0.50618

    Key idea. Posterior odds = prior odds × likelihood ratio = (1/999) × 1024.

    1. P = 1024/(1024 + 999) = 1024/2023 ≈ 0.506.

    Check. Ten heads is about 1 in 1,000, the same as the prior: hence roughly 50/50.

    Trap. Ignoring the 1-in-1,000 prior and saying "almost certainly".

Source: EigenPrep: A double-headed coin · Try it in the app →

Medium · EigenPrep · Logic · practice question on a reported topic

Four people cross a bridge at night with one torch; at most two cross at a time, at the slower one's pace. They take 1, 2, 5 and 10 minutes.

  1. What is the shortest total time?
    Answer and worked solution

    Answer: 17

    Key idea. Pair the two slowest; let the two fastest carry the torch.

    1. 2 + 1 + 10 + 2 + 2 = 17 minutes.

    Check. Escorting each person with the 1-minute walker gives 19.

    Trap. Answering 19.

Source: EigenPrep: Crossing the bridge · Try it in the app →

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.

  1. How many different cubes are there?
    Answer and worked solution

    Answer: 6

    Key idea. Case by the number of colours painted on opposite faces.

    1. All three opposite: 1. Exactly one opposite: 3 (which colour). None opposite: 2 (mirror images).
    2. 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.

Source: EigenPrep: Colouring a cube · Try it in the app →

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.

  1. 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.

    1. Identity 1, one swap 6, two swaps 3: 10 permutations.
    2. 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.

Source: EigenPrep: Following the chain of boxes · Try it in the app →

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.)

Source: EigenPrep: Two hourglasses · Try it in the app →

Medium · EigenPrep · Combinatorics · practice question on a reported topic

A drawer holds red and blue socks. Drawing two at random, the chance they match is exactly ½.

  1. What is the smallest possible number of socks in the drawer?
    Answer and worked solution

    Answer: 4

    Key idea. P(match) = ½ ⇔ (r − b)² = n.

    1. n = 1 doesn't allow a pair; n = 4 with r = 3, b = 1: (3·2 + 0)/(4·3) = ½.
    2. Smallest drawer: 4 socks.

    Check. The next solutions are 9 (6 and 3) and 16 (10 and 6).

Source: EigenPrep: Socks with even odds · Try it in the app →

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.

  1. 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.

    1. Bullet on shot 1 (two starts), shot 2, shot 3, shot 4, shot 5: one start each.
    2. B is hit on shots 2 and 4: 2 starts out of 6.
    3. P(A survives) = 1/3.

    Check. Going first is bad here: A faces the first shot and also shots 3 and 5.

Source: EigenPrep: Two-player roulette · Try it in the app →

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).

  1. 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.

    1. Fraction after T seconds: 0.01 ln(1 + T).
    2. 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.

Source: EigenPrep: The ant on the rubber band · Try it in the app →

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.

Source: EigenPrep: Three wise men · Try it in the app →

Medium · EigenPrep · Expected value · practice question on a reported topic

You start with $100 and bet everything on each of 5 tosses of a fair coin (heads doubles your stake, tails loses it).

  1. (a) What is your expected wealth after 5 tosses?
    Answer and worked solution

    Answer: 100

    Key idea. Fair bets are martingales: expected wealth stays at the start.

    1. 3200 × 1/32 = $100.

    Check. The expected value is the same for any strategy in a fair game.

    Trap. Answering 100 × (3/2)5.

  2. (b) What is the probability you still have any money?
    Answer and worked solution

    Answer: 0.03125

    Key idea. All five tosses must be heads.

    1. (½)5 = 1/32.

    Check. Same mean, huge spread: that's why expected value alone is a poor guide.

Source: EigenPrep: Betting everything · Try it in the app →

Easy · EigenPrep · Conditional probability · practice question on a reported topic

One of 1,000 boxes holds a prize. You pick box 1. The host, who knows where the prize is, opens 998 of the others, all empty.

  1. What is the probability the one remaining unopened box holds the prize?
    Answer and worked solution

    Answer: 0.999

    Key idea. The host concentrates all of the other boxes' probability onto one box.

    1. 1 − 1/1000 = 0.999.

    Check. With three doors the same reasoning gives 2/3.

Source: EigenPrep: Monty Hall with 1,000 boxes · Try it in the app →

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.

Source: EigenPrep: Sharing a cake fairly · Try it in the app →

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.

  1. 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.

    1. (5,0) → (2,3) → (2,0) → (0,2) → (5,2) → (4,3).
    2. 6 moves.

    Check. The other route (filling the 3 first) takes 8.

Source: EigenPrep: Measuring 4 litres · Try it in the app →

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.)

Source: EigenPrep: Odd handshakes · Try it in the app →

Medium · EigenPrep · Combinatorics · practice question on a reported topic

In how many ways can 1,000 be written as a sum of two or more consecutive positive integers?

  1. Number of ways:
    Answer and worked solution

    Answer: 3

    Key idea. Ways (including the one-term sum) = number of odd divisors.

    1. 1000 = 2³ × 5³ has odd divisors 1, 5, 25, 125: four.
    2. Dropping the one-term sum: 3 ways (198–202, 28–52, and 55–70).

    Check. Powers of two have only the trivial representation.

Source: EigenPrep: Consecutive sums to 1,000 · Try it in the app →

Hard · EigenPrep · Combinatorics · practice question on a reported topic

A 12-hour digital clock shows times from 1:00 to 12:59 (no leading zero on the hour).

  1. Of the 720 displays, how many contain some digit at least twice?
    Answer and worked solution

    Answer: 272

    Key idea. Count displays with no repeated digit, hour by hour.

    1. Hours 1–5: first minute digit 5 choices (0–5 minus h), second 8: 40 each, 200 in all.
    2. Hours 6–9: 6 × 8 = 48 each, 192 in all. Hours 10 and 12: 4 × 7 = 28 each. Hour 11: none.
    3. 448 with no repeat, so 720 − 448 = 272 repeat a digit.

    Check. 272/720 ≈ 38%.

Source: EigenPrep: Repeated digits on a clock · Try it in the app →

Hard · EigenPrep · Combinatorics · practice question on a reported topic

10 coins lie in a row. A move flips any 7 consecutive coins.

  1. Starting from all heads, how many different arrangements can you reach?
    Answer and worked solution

    Answer: 16

    Key idea. Moves commute and are self-inverse, so a reachable pattern is a subset of the 4 moves.

    1. The 4 windows are independent (each covers a coin no later window does at its left end), so all 2⁴ subsets differ.
    2. 16 arrangements, out of 1,024: most patterns can't be fixed.

    Check. So the answer to "can you always get back to all heads?" is no.

Source: EigenPrep: Flipping seven coins · Try it in the app →

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.

Source: EigenPrep: A knight's tour · Try it in the app →

Easy · EigenPrep · Options · practice question on a reported topic

A stock is at $100. A 1-year call struck at $105 costs $8. The risk-free rate is 5% (continuous); no dividends.

  1. What should the 1-year $105 put cost?
    Answer and worked solution

    Answer: 7.8791

    Key idea. Parity ties the put to the call, stock and bond.

    1. K e−rT ≈ 99.88.
    2. P = C − S + K e−rT = 8 − 100 + 99.88 ≈ $7.88.

    Check. Here K e−rT ≈ S, so the call and put are worth almost the same (C − P = 0.12).

    Trap. Forgetting to discount the strike (which gives $13).

Source: EigenPrep: Put–call parity · Try it in the app →

Easy · EigenPrep · Options · practice question on a reported topic

You've sold 100 calls, each on one share, with delta 0.6.

  1. How many shares should you hold to be delta-neutral?
    Answer and worked solution

    Answer: 60

    Key idea. Offset the options' delta with shares.

    1. Position delta = −60.
    2. Buy 60 shares.

    Check. As the stock rises the call's delta grows, so you buy more: short gamma.

    Trap. Selling shares instead of buying.

Source: EigenPrep: Delta hedging a short call · Try it in the app →

Easy · EigenPrep · Options · practice question on a reported topic

A stock trades at $50 and an American call struck at $45 trades at $3.

  1. What riskless profit per share can you lock in?
    Answer and worked solution

    Answer: 2

    Key idea. Buy below intrinsic value and exercise.

    1. Buy the call for $3, exercise at $45, sell the share at $50.
    2. Profit 50 − 45 − 3 = $2.

    Check. For a European call, the bound is C ≥ S − K e−rT, also violated here.

Source: EigenPrep: A call below intrinsic value · Try it in the app →

Easy · EigenPrep · Finance · practice question on a reported topic

A non-dividend stock is at $100 and the risk-free rate is 4% (continuous).

  1. What is the 6-month forward price?
    Answer and worked solution

    Answer: 102.02

    Key idea. Cost of carry: buy the stock with borrowed money and hold it.

    1. F = 100 e0.02 ≈ $102.02.

    Check. Simple interest gives 102.00; continuous compounding adds 2 cents.

Source: EigenPrep: A forward price · Try it in the app →

Easy · EigenPrep · Finance · practice question on a reported topic

A $10 million portfolio has daily volatility 2%, and returns are taken to be normal with mean zero.

  1. What is the 1-day 95% value at risk, in dollars?
    Answer and worked solution

    Answer: 329000

    Key idea. VaR = z × σ × value.

    1. σ in dollars = $200,000.
    2. 1.645 × 200,000 = $329,000.

    Check. 99% would use 2.33: about $466,000.

    Trap. Using 1.96 (the two-sided 95% value).

Source: EigenPrep: One-day VaR · Try it in the app →

Easy · EigenPrep · Finance · practice question on a reported topic

A portfolio is expected to return 12% a year with 15% volatility; the risk-free rate is 3%.

  1. What is its Sharpe ratio?
    Answer and worked solution

    Answer: 0.6

    Key idea. Excess return per unit of risk.

    1. (12 − 3)/15 = 0.6.

    Check. Annual Sharpe 0.6 is roughly what broad equity indices have managed historically.

    Trap. Leaving out the risk-free rate (giving 0.8).

Source: EigenPrep: Sharpe ratio · Try it in the app →

Easy · EigenPrep · Finance · practice question on a reported topic

A bond has (modified) duration 5 years. Yields rise by 1 percentage point.

  1. By roughly what percentage does its price change?
    Answer and worked solution

    Answer: -5

    Key idea. First-order (duration) approximation.

    1. −5 × 0.01 = −0.05: about −5%.

    Check. Convexity makes the true fall slightly smaller than 5%.

Source: EigenPrep: Duration · Try it in the app →

Easy · EigenPrep · Finance · practice question on a reported topic

A portfolio is 60% stocks with beta 1.2 and 40% bonds with beta 0.1.

  1. What is the portfolio's beta?
    Answer and worked solution

    Answer: 0.76

    Key idea. Weighted average of betas.

    1. 0.72 + 0.04 = 0.76.

Source: EigenPrep: Portfolio beta · Try it in the app →

Medium · EigenPrep · Options · practice question on a reported topic

A European call on a non-dividend stock has delta 0.7.

  1. What is the delta of the put with the same strike and expiry?
    Answer and worked solution

    Answer: -0.3

    Key idea. Parity: the call minus the put is a forward, whose delta is 1.

    1. Δput = 0.7 − 1 = −0.3.

    Check. A quoted pair of 0.7 and −0.2 would point to dividends, early exercise or mispricing.

Source: EigenPrep: Call and put deltas · Try it in the app →

Easy · EigenPrep · Finance · practice question on a reported topic

EUR/USD is 1.20 (dollars per euro). One-year rates are 2% in USD and 1% in EUR.

  1. What should the 1-year forward rate be?
    Answer and worked solution

    Answer: 1.2119

    Key idea. No arbitrage between holding dollars and holding euros with the currency risk hedged.

    1. F = 1.20 × 1.02/1.01 ≈ 1.2119.

    Check. The euro is worth more forward because euro rates are lower.

Source: EigenPrep: Interest-rate parity · Try it in the app →

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.

Source: EigenPrep: Volatility and a call · Try it in the app →

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.

Source: EigenPrep: Interest rates and options · Try it in the app →

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).

Source: EigenPrep: Where gamma is largest · Try it in the app →

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.

Source: EigenPrep: The volatility skew · Try it in the app →

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.

Source: EigenPrep: Dividends and options · Try it in the app →

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.

Source: EigenPrep: Exercising an American call early · Try it in the app →

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.

Source: EigenPrep: The carry trade · Try it in the app →

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).

Source: EigenPrep: What drives a CDS spread · Try it in the app →

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.

Source: EigenPrep: Repo · Try it in the app →

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.

Source: EigenPrep: Active management in efficient markets · Try it in the app →

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.

Source: EigenPrep: An inverted yield curve · Try it in the app →

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.

Source: EigenPrep: Time decay and moneyness · Try it in the app →

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.

Source: EigenPrep: Liquidity and option prices · Try it in the app →

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.

Source: EigenPrep: Contango and backwardation · Try it in the app →

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.

Source: EigenPrep: Trading a view that vol is too high · Try it in the app →

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.

Source: EigenPrep: Why bid–ask spreads exist · Try it in the app →

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).

Source: EigenPrep: Pricing a barrier option by simulation · Try it in the app →

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.

Source: EigenPrep: Expected and unexpected credit loss · Try it in the app →

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.

Source: EigenPrep: Risk-weighted assets · Try it in the app →

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.

Source: EigenPrep: Pairs trading · Try it in the app →

Easy · EigenPrep · Mental maths · practice question on a reported topic

Ten sums to do in your head, as fast as you can.

  1. 17 × 13
    Answer and worked solution

    Answer: 221

    Key idea. Distribute over tens and units.

    1. 17 × 10 = 170; 17 × 3 = 51.
    2. Total 221.

    Check. Last digits: 7 × 3 ends in 1.

  2. √441
    Answer and worked solution

    Answer: 21

    Key idea. Bracket between round squares, then use the last digit.

    1. 20² ≤ 441 < 30², and the last digit fits 1.
    2. √441 = 21.

    Check. Check: 21 × 21 = 441.

  3. 23²
    Answer and worked solution

    Answer: 529

    Key idea. Square around the nearest multiple of ten.

    1. 20² = 400; 2 × 20 × 3 = 120; 3² = 9.
    2. Total 529.

    Check. It ends in 9, like 3².

  4. 144 ÷ 12
    Answer and worked solution

    Answer: 12

    Key idea. Division as a missing factor.

    1. 12 × 12 = 144.
    2. So 12.

    Check. Rough size: 144/12 ≈ 12.

  5. 15% of 240
    Answer and worked solution

    Answer: 36

    Key idea. Turn the percentage into a fraction or easy pieces.

    1. 15% = 15/100, so 240 × 15/100.
    2. = 36.

    Check. 15% is under half, so the answer should be under 120.

  6. 28
    Answer and worked solution

    Answer: 256

    Key idea. Build the power from squares.

    1. 28 = 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2.
    2. = 256.
  7. 73 + 89
    Answer and worked solution

    Answer: 162

    Key idea. Round and compensate.

    1. 73 + 90 = 163, then − 1.
    2. = 162.
  8. 19 × 25
    Answer and worked solution

    Answer: 475

    Key idea. Distribute over tens and units.

    1. 19 × 20 = 380; 19 × 5 = 95.
    2. Total 475.

    Check. Last digits: 9 × 5 ends in 5.

  9. √169
    Answer and worked solution

    Answer: 13

    Key idea. Bracket between round squares, then use the last digit.

    1. 10² ≤ 169 < 20², and the last digit fits 3.
    2. √169 = 13.

    Check. Check: 13 × 13 = 169.

  10. 16²
    Answer and worked solution

    Answer: 256

    Key idea. Square around the nearest multiple of ten.

    1. 20² = 400; 2 × 20 × -4 = -160; -4² = 16.
    2. Total 256.

    Check. It ends in 6, like 6².

Source: EigenPrep: Quick-fire arithmetic 1 · Try it in the app →

Easy · EigenPrep · Mental maths · practice question on a reported topic

Ten sums to do in your head, as fast as you can.

  1. 357 − 189
    Answer and worked solution

    Answer: 168

    Key idea. Round and compensate.

    1. 357 − 190 = 167, then + 1.
    2. = 168.

    Check. Check by adding back: 168 + 189 = 357.

  2. 8! ÷ 6!
    Answer and worked solution

    Answer: 56

    Key idea. Factorials cancel.

    1. 8!/6! = 8 × 7.
    2. = 56.
  3. 24 × 37
    Answer and worked solution

    Answer: 888

    Key idea. Distribute over tens and units.

    1. 24 × 30 = 720; 24 × 7 = 168.
    2. Total 888.

    Check. Last digits: 4 × 7 ends in 8.

  4. 12.5% of 320
    Answer and worked solution

    Answer: 40

    Key idea. Turn the percentage into a fraction or easy pieces.

    1. 12.5% = 12.5/100, so 320 × 12.5/100.
    2. = 40.

    Check. 12.5% is under half, so the answer should be under 160.

  5. 35
    Answer and worked solution

    Answer: 243

    Key idea. Build the power from squares.

    1. 35 = 3 × 3 × 3 × 3 × 3.
    2. = 243.
  6. 95 + 127
    Answer and worked solution

    Answer: 222

    Key idea. Round and compensate.

    1. 95 + 130 = 225, then − 3.
    2. = 222.
  7. √225
    Answer and worked solution

    Answer: 15

    Key idea. Bracket between round squares, then use the last digit.

    1. 10² ≤ 225 < 20², and the last digit fits 5.
    2. √225 = 15.

    Check. Check: 15 × 15 = 225.

  8. 18 × 45
    Answer and worked solution

    Answer: 810

    Key idea. Distribute over tens and units.

    1. 18 × 40 = 720; 18 × 5 = 90.
    2. Total 810.

    Check. Last digits: 8 × 5 ends in 0.

  9. 25²
    Answer and worked solution

    Answer: 625

    Key idea. Square around the nearest multiple of ten.

    1. 30² = 900; 2 × 30 × -5 = -300; -5² = 25.
    2. Total 625.

    Check. It ends in 5, like 5².

  10. 480 ÷ 15
    Answer and worked solution

    Answer: 32

    Key idea. Division as a missing factor.

    1. 15 × 32 = 480.
    2. So 32.

    Check. Rough size: 480/15 ≈ 32.

Source: EigenPrep: Quick-fire arithmetic 2 · Try it in the app →

Easy · EigenPrep · Mental maths · practice question on a reported topic

Ten sums to do in your head, as fast as you can.

  1. 35% of 180
    Answer and worked solution

    Answer: 63

    Key idea. Turn the percentage into a fraction or easy pieces.

    1. 35% = 35/100, so 180 × 35/100.
    2. = 63.

    Check. 35% is under half, so the answer should be under 90.

  2. 11 × 99
    Answer and worked solution

    Answer: 1089

    Key idea. Distribute over tens and units.

    1. 11 × 90 = 990; 11 × 9 = 99.
    2. Total 1089.

    Check. Last digits: 1 × 9 ends in 9.

  3. 234 − 157
    Answer and worked solution

    Answer: 77

    Key idea. Round and compensate.

    1. 234 − 160 = 74, then + 3.
    2. = 77.

    Check. Check by adding back: 77 + 157 = 234.

  4. 210
    Answer and worked solution

    Answer: 1024

    Key idea. Build the power from squares.

    1. 210 = 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2.
    2. = 1024.
  5. √324
    Answer and worked solution

    Answer: 18

    Key idea. Bracket between round squares, then use the last digit.

    1. 10² ≤ 324 < 20², and the last digit fits 8.
    2. √324 = 18.

    Check. Check: 18 × 18 = 324.

  6. 14 × 17
    Answer and worked solution

    Answer: 238

    Key idea. Distribute over tens and units.

    1. 14 × 10 = 140; 14 × 7 = 98.
    2. Total 238.

    Check. Last digits: 4 × 7 ends in 8.

  7. 72 + 139
    Answer and worked solution

    Answer: 211

    Key idea. Round and compensate.

    1. 72 + 140 = 212, then − 1.
    2. = 211.
  8. 20% of 450
    Answer and worked solution

    Answer: 90

    Key idea. Turn the percentage into a fraction or easy pieces.

    1. 20% = 20/100, so 450 × 20/100.
    2. = 90.

    Check. 20% is under half, so the answer should be under 225.

  9. 21²
    Answer and worked solution

    Answer: 441

    Key idea. Square around the nearest multiple of ten.

    1. 20² = 400; 2 × 20 × 1 = 40; 1² = 1.
    2. Total 441.

    Check. It ends in 1, like 1².

  10. 64
    Answer and worked solution

    Answer: 1296

    Key idea. Build the power from squares.

    1. 64 = 6 × 6 × 6 × 6.
    2. = 1296.

Source: EigenPrep: Quick-fire arithmetic 3 · Try it in the app →

Easy · EigenPrep · Mental maths · practice question on a reported topic

Ten sums to do in your head, as fast as you can.

  1. 156 × 4
    Answer and worked solution

    Answer: 624

    Key idea. Distribute over tens and units.

    1. 156 × 0 = 0; 156 × 4 = 624.
    2. Total 624.

    Check. Last digits: 6 × 4 ends in 4.

  2. 729 ÷ 27
    Answer and worked solution

    Answer: 27

    Key idea. Division as a missing factor.

    1. 27 × 27 = 729.
    2. So 27.

    Check. Rough size: 729/27 ≈ 27.

  3. √289
    Answer and worked solution

    Answer: 17

    Key idea. Bracket between round squares, then use the last digit.

    1. 10² ≤ 289 < 20², and the last digit fits 7.
    2. √289 = 17.

    Check. Check: 17 × 17 = 289.

  4. 15 × 67
    Answer and worked solution

    Answer: 1005

    Key idea. Distribute over tens and units.

    1. 15 × 60 = 900; 15 × 7 = 105.
    2. Total 1005.

    Check. Last digits: 5 × 7 ends in 5.

  5. 418 − 239
    Answer and worked solution

    Answer: 179

    Key idea. Round and compensate.

    1. 418 − 240 = 178, then + 1.
    2. = 179.

    Check. Check by adding back: 179 + 239 = 418.

  6. 37.5% of 160
    Answer and worked solution

    Answer: 60

    Key idea. Turn the percentage into a fraction or easy pieces.

    1. 37.5% = 37.5/100, so 160 × 37.5/100.
    2. = 60.

    Check. 37.5% is under half, so the answer should be under 80.

  7. 13 × 84
    Answer and worked solution

    Answer: 1092

    Key idea. Distribute over tens and units.

    1. 13 × 80 = 1040; 13 × 4 = 52.
    2. Total 1092.

    Check. Last digits: 3 × 4 ends in 2.

  8. 19²
    Answer and worked solution

    Answer: 361

    Key idea. Square around the nearest multiple of ten.

    1. 20² = 400; 2 × 20 × -1 = -40; -1² = 1.
    2. Total 361.

    Check. It ends in 1, like 9².

  9. 85 + 276
    Answer and worked solution

    Answer: 361

    Key idea. Round and compensate.

    1. 85 + 280 = 365, then − 4.
    2. = 361.
  10. 27
    Answer and worked solution

    Answer: 128

    Key idea. Build the power from squares.

    1. 27 = 2 × 2 × 2 × 2 × 2 × 2 × 2.
    2. = 128.

Source: EigenPrep: Quick-fire arithmetic 4 · Try it in the app →

Easy · EigenPrep · Mental maths · practice question on a reported topic

Ten sums to do in your head, as fast as you can.

  1. √196
    Answer and worked solution

    Answer: 14

    Key idea. Bracket between round squares, then use the last digit.

    1. 10² ≤ 196 < 20², and the last digit fits 4.
    2. √196 = 14.

    Check. Check: 14 × 14 = 196.

  2. 28 × 25
    Answer and worked solution

    Answer: 700

    Key idea. Distribute over tens and units.

    1. 28 × 20 = 560; 28 × 5 = 140.
    2. Total 700.

    Check. Last digits: 8 × 5 ends in 0.

  3. 675 ÷ 25
    Answer and worked solution

    Answer: 27

    Key idea. Division as a missing factor.

    1. 25 × 27 = 675.
    2. So 27.

    Check. Rough size: 675/25 ≈ 27.

  4. 60% of 85
    Answer and worked solution

    Answer: 51

    Key idea. Turn the percentage into a fraction or easy pieces.

    1. 60% = 60/100, so 85 × 60/100.
    2. = 51.

    Check. 60% is over half, so the answer should be over 42.5.

  5. 17²
    Answer and worked solution

    Answer: 289

    Key idea. Square around the nearest multiple of ten.

    1. 20² = 400; 2 × 20 × -3 = -120; -3² = 9.
    2. Total 289.

    Check. It ends in 9, like 7².

  6. 346 − 178
    Answer and worked solution

    Answer: 168

    Key idea. Round and compensate.

    1. 346 − 180 = 166, then + 2.
    2. = 168.

    Check. Check by adding back: 168 + 178 = 346.

  7. 16 × 31
    Answer and worked solution

    Answer: 496

    Key idea. Distribute over tens and units.

    1. 16 × 30 = 480; 16 × 1 = 16.
    2. Total 496.

    Check. Last digits: 6 × 1 ends in 6.

  8. 56
    Answer and worked solution

    Answer: 15625

    Key idea. Build the power from squares.

    1. 56 = 5 × 5 × 5 × 5 × 5 × 5.
    2. = 15625.
  9. 92 + 219
    Answer and worked solution

    Answer: 311

    Key idea. Round and compensate.

    1. 92 + 220 = 312, then − 1.
    2. = 311.
  10. √361
    Answer and worked solution

    Answer: 19

    Key idea. Bracket between round squares, then use the last digit.

    1. 10² ≤ 361 < 20², and the last digit fits 9.
    2. √361 = 19.

    Check. Check: 19 × 19 = 361.

Source: EigenPrep: Quick-fire arithmetic 5 · Try it in the app →

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.

Source: Quant interview notes: Bayes' rule · Try it in the app →

Easy · Quant interview notes · Expected value · practice question on a reported topic

You toss a fair coin until the first head.

  1. What is the expected number of tosses?
    Answer and worked solution

    Answer: 2

    Key idea. Geometric waiting time: E = 1/p.

    1. 1/(½) = 2.

    Check. Half the time it takes one toss; the other half you've wasted one and start again.

Source: Quant interview notes: Waiting for the first head · Try it in the app →

Medium · Quant interview notes · Probability · practice question on a reported topic

U₁, …, U₄ are independent uniform on [0, 1].

  1. What is E[max(U₁, …, U₄)]?
    Answer and worked solution

    Answer: 0.8

    Key idea. The max of n uniforms has CDF xⁿ and mean n/(n + 1).

    1. E = ∫₀¹ (1 − x⁴) dx = 1 − 1/5.
    2. = 4/5 = 0.8.

    Check. By symmetry the four points split [0, 1] into five gaps of average 1/5, and the max sits one gap from the top.

Source: Quant interview notes: The largest of four uniforms · Try it in the app →

Medium · Quant interview notes · Probability · practice question on a reported topic

N has a Poisson distribution with mean 1.

  1. What is P(N is even)?
    Answer and worked solution

    Answer: 0.56767

    Key idea. Use the generating-function trick with z = −1.

    1. P(even) − P(odd) = e−2.
    2. P(even) = (1 + e−2)/2 ≈ 0.568.

    Check. It's always above ½, approaching ½ as λ grows.

Source: Quant interview notes: A Poisson count being even · Try it in the app →

Easy · Quant interview notes · Random walks · practice question on a reported topic

A fair ±1 random walk starts at 3 and stops at 0 or 10.

  1. What is the probability it reaches 10 first?
    Answer and worked solution

    Answer: 0.3

    Key idea. Optional stopping: 10p = 3.

    1. p = 3/10 = 0.3.

    Check. In general i/b.

Source: Quant interview notes: Symmetric ruin · Try it in the app →

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.

Source: Quant interview notes: The probability axioms · Try it in the app →

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).

Source: Quant interview notes: Conditional probability · Try it in the app →

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.

Source: Quant interview notes: The law of total probability · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

X is 1 with probability 0.3 and 0 otherwise.

  1. What is Var(X)?
    Answer and worked solution

    Answer: 0.21

    Key idea. Var = p(1 − p).

    1. 0.3 × 0.7 = 0.21.

    Check. The variance is largest, ¼, at p = ½.

Source: Quant interview notes: A Bernoulli variance · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

X counts successes in 20 independent trials, each succeeding with probability 0.3.

  1. (a) What is E[X]?
    Answer and worked solution

    Answer: 6

    Key idea. Linearity: np.

    1. 20 × 0.3 = 6.
  2. (b) What is Var(X)?
    Answer and worked solution

    Answer: 4.2

    Key idea. Independent variances add: np(1 − p).

    1. 20 × 0.3 × 0.7 = 4.2.

    Check. So the standard deviation is about 2.05.

Source: Quant interview notes: Binomial mean and variance · Try it in the app →

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.

Source: Quant interview notes: Where Poisson shows up · Try it in the app →

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.

Source: Quant interview notes: Linearity of expectation · Try it in the app →

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).

Source: Quant interview notes: Variance, covariance, correlation · Try it in the app →

Medium · Quant interview notes · Random walks · practice question on a reported topic

A walk moves up with probability 0.45 and down with 0.55, starting at 10 and stopping at 0 or 20.

  1. What is the probability it reaches 20 first?
    Answer and worked solution

    Answer: 0.1185

    Key idea. Gambler's ruin with a bias.

    1. r¹⁰ ≈ 7.43, r²⁰ ≈ 55.2.
    2. P ≈ (1 − 7.43)/(1 − 55.2) ≈ 0.119.

    Check. A fair game would give 0.5: a 5% edge against you over a long game is crushing.

Source: Quant interview notes: Ruin with a slight edge against you · Try it in the app →

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").

Source: Quant interview notes: The Markov property · Try it in the app →

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.

Source: Quant interview notes: Stopping times · Try it in the app →

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.

Source: Quant interview notes: When information matters · Try it in the app →

Easy · Quant interview notes · Probability · practice question on a reported topic

Two friends arrive independently and uniformly within an hour; each waits 15 minutes for the other.

  1. What is the probability they meet?
    Answer and worked solution

    Answer: 0.4375

    Key idea. Area of |x − y| ≤ ¼ in the unit square.

    1. Misses: 2 × ½ × (¾)² = 9/16.
    2. P = 1 − 9/16 = 7/16 ≈ 0.4375.

Source: Quant interview notes: Meeting with 15-minute waits · Try it in the app →

Hard · Quant interview notes · Probability · practice question on a reported topic

A arrives uniformly within an hour and waits 15 minutes; B arrives uniformly within the same hour and waits 30 minutes.

  1. What is the probability they meet?
    Answer and worked solution

    Answer: 0.59375

    Key idea. Two corner triangles of different sizes.

    1. Misses: ½(¾)² + ½(½)² = 0.28125 + 0.125.
    2. P = 1 − 0.40625 = 0.59375.

    Check. With both waiting 15 minutes it's 0.4375; B's longer wait helps.

Source: Quant interview notes: Meeting with unequal waits · Try it in the app →

Medium · Quant interview notes · Probability · practice question on a reported topic

23 people, birthdays independent and uniform over 365 days.

  1. What is the probability at least two share a birthday?
    Answer and worked solution

    Answer: 0.5073

    Key idea. Complement of "all different".

    1. P(all different) ≈ e−253/365 ≈ 0.493.
    2. P(shared) ≈ 0.507.

    Check. 23 people make 253 pairs, each matching with probability 1/365.

Source: Quant interview notes: The birthday problem · Try it in the app →

Medium · Quant interview notes · Expected value · practice question on a reported topic

10 balls are thrown independently into 10 bins.

  1. What is the expected number of empty bins?
    Answer and worked solution

    Answer: 3.4868

    Key idea. Linearity over the bins.

    1. 10 × 0.9¹⁰ ≈ 10 × 0.349 = 3.49.

    Check. For large n, about n/e of the bins stay empty.

Source: Quant interview notes: Empty bins · Try it in the app →

Medium · Quant interview notes · Statistics · practice question on a reported topic

X has a Gamma distribution with shape k = 3 and scale θ = 2 (a sum of 3 independent exponentials with mean 2).

  1. (a) What is E[X]?
    Answer and worked solution

    Answer: 6

    Key idea. E = kθ.

    1. 3 × 2 = 6.
  2. (b) What is Var(X)?
    Answer and worked solution

    Answer: 12

    Key idea. Var = kθ².

    1. 3 × 4 = 12.

Source: Quant interview notes: Gamma mean and variance · Try it in the app →

Hard · Quant interview notes · Expected value · practice question on a reported topic

You roll a fair die repeatedly.

  1. What is the expected number of rolls until two 1s in a row?
    Answer and worked solution

    Answer: 42

    Key idea. Two-state recursion; missing the second 1 sends you back to the start.

    1. E₀ = 6 + E₁ and E₁ = 1 + (5/6)E₀.
    2. E₀ = 7 + (5/6)E₀ ⇒ E₀ = 42.

    Check. Overlapping patterns take longer: 1-then-2 takes only 36.

Source: Quant interview notes: Waiting for two 1s in a row · Try it in the app →

Easy · Quant interview notes · Probability · practice question on a reported topic

U₁ and U₂ are independent uniform on [0, 1].

  1. What is P(max(U₁, U₂) > 0.8)?
    Answer and worked solution

    Answer: 0.36

    Key idea. Complement of both being small.

    1. 1 − 0.8² = 0.36.

Source: Quant interview notes: The larger of two uniforms · Try it in the app →

Easy · Quant interview notes · Probability · practice question on a reported topic

A box holds 3 white and 2 black balls. Two are drawn without replacement.

  1. What is the probability both are white?
    Answer and worked solution

    Answer: 0.3

    Key idea. Chain rule.

    1. 3/5 × 2/4 = 0.3.

    Check. Counting: C(3, 2)/C(5, 2) = 3/10.

Source: Quant interview notes: Two white balls · Try it in the app →

Medium · Quant interview notes · Expected value · practice question on a reported topic

X is exponential with mean 1.

  1. What is E[X | X > 1]?
    Answer and worked solution

    Answer: 2

    Key idea. Memorylessness: E[X | X > 1] = 1 + E[X].

    1. 1 + 1 = 2.

    Trap. Answering 1, forgetting that you've already waited one unit.

Source: Quant interview notes: Memoryless waiting · Try it in the app →

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.

Source: Quant interview notes: The law of total expectation · Try it in the app →

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.

Source: Quant interview notes: Bayesian signal extraction · Try it in the app →

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).

Source: Quant interview notes: Density of an order statistic · Try it in the app →

Medium · Quant interview notes · Probability · practice question on a reported topic

U₁, …, U₄ are independent uniform on [0, 1].

  1. What is the expected range, max − min?
    Answer and worked solution

    Answer: 0.6

    Key idea. E[range] = (n − 1)/(n + 1).

    1. 4/5 − 1/5 = 3/5.

    Check. The points split [0, 1] into 5 gaps averaging 1/5; the range skips the two end gaps.

Source: Quant interview notes: Range of four uniforms · Try it in the app →

Hard · Quant interview notes · Probability · practice question on a reported topic

X and Y are independent exponentials with mean 1.

  1. What is P(X − Y > 1)?
    Answer and worked solution

    Answer: 0.18394

    Key idea. Memorylessness: once X passes Y, the overshoot is a fresh exponential.

    1. ½ × e−1 = 1/(2e) ≈ 0.184.

    Check. Direct integration ∫₁^∞ e−x(1 − e−(x−1)) dx gives the same.

Source: Quant interview notes: One exponential beating another by 1 · Try it in the app →

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.

Source: Quant interview notes: Simulating correlated normals · Try it in the app →

Easy · Quant interview notes · Expected value · practice question on a reported topic

Customers arrive as a Poisson process at 2 per minute.

  1. What is the expected time, in minutes, until the third arrival?
    Answer and worked solution

    Answer: 1.5

    Key idea. Sum of three exponential gaps (a Gamma(3) time).

    1. 3 × ½ = 1.5 minutes.

Source: Quant interview notes: Waiting for the third arrival · Try it in the app →

Easy · Quant interview notes · Expected value · practice question on a reported topic

A coin lands heads with probability 0.3. You toss until you've seen two heads (not necessarily in a row).

  1. What is the expected number of tosses?
    Answer and worked solution

    Answer: 20/3 ≈ 6.6667

    Key idea. Negative binomial: r/p.

    1. 2/0.3 ≈ 6.67.

    Check. For a fair coin, 4.

Source: Quant interview notes: Waiting for two heads · Try it in the app →

Medium · Quant interview notes · Statistics · practice question on a reported topic

N counts the trials up to and including the first success, with success probability ¼.

  1. What is Var(N)?
    Answer and worked solution

    Answer: 12

    Key idea. Var = (1 − p)/p².

    1. (¾)/(1/16) = 12.

    Check. The mean is 4, so the spread is large: SD ≈ 3.5.

Source: Quant interview notes: Variance of a geometric wait · Try it in the app →

Medium · Quant interview notes · Expected value · practice question on a reported topic

X is exponential with mean 1 and c = 2.

  1. What is E[min(X, 2)]?
    Answer and worked solution

    Answer: 0.86466

    Key idea. Integrate the survival function up to the cap.

    1. ∫₀² e−t dt = 1 − e−2 ≈ 0.865.

    Check. It has a point mass e−2 ≈ 0.135 at 2.

Source: Quant interview notes: A capped exponential · Try it in the app →

Easy · Quant interview notes · Expected value · practice question on a reported topic

X and Y are independent exponentials with mean 1.

  1. What is E[min(X, Y)]?
    Answer and worked solution

    Answer: 0.5

    Key idea. Rates add for the first of independent exponentials.

    1. Rate 2, mean ½.

    Check. Hence E[max] = 1 + 1 − ½ = 1.5.

Source: Quant interview notes: The first of two exponentials · Try it in the app →

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.

Source: Quant interview notes: Bertrand’s random chord · Try it in the app →

Easy · Quant interview notes · Probability · practice question on a reported topic

A point is uniform in the unit square.

  1. What is P(x + y < 1)?
    Answer and worked solution

    Answer: 0.5

    Key idea. Area of a right triangle with legs 1.

    1. ½ × 1 × 1 = ½.

Source: Quant interview notes: Below the diagonal · Try it in the app →

Easy · Quant interview notes · Probability · practice question on a reported topic

A fair coin is tossed 10 times.

  1. What is the probability of exactly 5 heads?
    Answer and worked solution

    Answer: 0.24609

    Key idea. Binomial probability.

    1. C(10, 5) = 252, so 252/1024 ≈ 0.246.

    Trap. Expecting about ½ because 5 is the average.

Source: Quant interview notes: Exactly five heads · Try it in the app →

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.

Source: Quant interview notes: Method of moments v maximum likelihood · Try it in the app →

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.

Source: Quant interview notes: Stationarity · Try it in the app →

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.

Source: Quant interview notes: The idea behind Black–Scholes · Try it in the app →

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.

Source: Quant interview notes: Delta · Try it in the app →

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.

Source: Quant interview notes: No-arbitrage pricing · Try it in the app →

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.

Source: Quant interview notes: Deriving the forward price · Try it in the app →

Easy · Quant interview notes · Finance · practice question on a reported topic

A stock index is at 100 with a continuous dividend yield of 2%; the risk-free rate is 5% (continuous).

  1. What is the 1-year forward price?
    Answer and worked solution

    Answer: 103.05

    Key idea. Cost of carry net of the dividend yield.

    1. 100 e0.03 ≈ 103.05.

    Check. Without dividends it would be 105.13.

Source: Quant interview notes: A forward with a dividend yield · Try it in the app →

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).

Source: Quant interview notes: Deriving put–call parity · Try it in the app →

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.

Source: Quant interview notes: Risk-neutral pricing · Try it in the app →

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.

Source: Quant interview notes: Black–Scholes assumptions · Try it in the app →

Medium · Quant interview notes · Options · practice question on a reported topic

Stock and strike are both 100, rates are zero, volatility is 20% and expiry is 1 year.

  1. What is the Black–Scholes call price?
    Answer and worked solution

    Answer: 7.9656

    Key idea. At the money with zero rates, C = S(2N(σ√T/2) − 1).

    1. N(0.1) ≈ 0.5398, so C ≈ 100 × 0.0797 = 7.97.

    Check. Rule of thumb 0.4 × 0.2 × 100 = 8.

Source: Quant interview notes: An at-the-money call · Try it in the app →

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.

Source: Quant interview notes: Moneyness · Try it in the app →

Easy · Quant interview notes · Options · practice question on a reported topic

A stock is at 105 and a call struck at 100 costs 8.

  1. How much of the price is time value?
    Answer and worked solution

    Answer: 3

    Key idea. Price = intrinsic + time value.

    1. Intrinsic = 5, so time value = 8 − 5 = 3.

    Check. Time value is largest at the money and shrinks to zero at expiry.

Source: Quant interview notes: Intrinsic and time value · Try it in the app →

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.

Source: Quant interview notes: Gamma · Try it in the app →

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.

Source: Quant interview notes: Vega · Try it in the app →

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.

Source: Quant interview notes: Theta · Try it in the app →

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.

Source: Quant interview notes: Rho · Try it in the app →

Medium · Quant interview notes · Options · practice question on a reported topic

S = K = 100, r = 0, σ = 20%, T = 1 year, no dividends.

  1. (a) What is the call's delta?
    Answer and worked solution

    Answer: 0.53983

    Key idea. Δcall = N(d₁).

    1. d₁ = 0.02/0.2 = 0.1.
    2. N(0.1) ≈ 0.540.

    Check. Slightly above ½ at the money because of the σ²/2 term.

  2. (b) What is the put's delta?
    Answer and worked solution

    Answer: -0.46017

    Key idea. Δput = N(d₁) − 1.

    1. 0.540 − 1 = −0.460.

Source: Quant interview notes: Black–Scholes deltas · Try it in the app →

Medium · Quant interview notes · Options · practice question on a reported topic

S = K = 100, r = 0, σ = 20%, T = 1 year.

  1. What is the option's gamma (per $1 move in S)?
    Answer and worked solution

    Answer: 0.019848

    Key idea. Γ = φ(d₁)/(Sσ√T).

    1. 0.397/20 ≈ 0.0198.

    Check. So a $1 rise lifts delta by about 0.02.

Source: Quant interview notes: Black–Scholes gamma · Try it in the app →

Medium · Quant interview notes · Options · practice question on a reported topic

S = K = 100, r = 0, σ = 20%, T = 1 year.

  1. By how much does the option's value change for a 1-point rise in volatility (20% → 21%)?
    Answer and worked solution

    Answer: 0.39695

    Key idea. Vega = Sφ(d₁)√T, then scale to one vol point.

    1. 100 × 0.397 × 1 = 39.7 per 1.00 of vol.
    2. Per point: ≈ 0.397.

    Check. Rule of thumb 0.4 × S × √T / 100 = 0.4.

Source: Quant interview notes: Black–Scholes vega · Try it in the app →

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.

Source: Quant interview notes: Greeks from put–call parity · Try it in the app →

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.

Source: Quant interview notes: Implied volatility · Try it in the app →

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.

Source: Quant interview notes: Smile and skew · Try it in the app →

Medium · Quant interview notes · Options · practice question on a reported topic

A cash-or-nothing call pays $1 if ST > K. Take S = K = 100, r = 0, σ = 20%, T = 1.

  1. What is its Black–Scholes price?
    Answer and worked solution

    Answer: 0.46017

    Key idea. Digital = e−rT N(d₂).

    1. d₂ = −0.1, N(−0.1) ≈ 0.460.

    Check. Below ½: under the risk-neutral measure the median of ST is below the forward.

    Trap. Using N(d₁) (the call's delta) instead of N(d₂).

Source: Quant interview notes: A digital call · Try it in the app →

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.

Source: Quant interview notes: Delta hedging, gamma and theta · Try it in the app →

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.

Source: Quant interview notes: Replicating portfolios · Try it in the app →

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.

Source: Quant interview notes: American v European · Try it in the app →

Medium · Quant interview notes · Options · practice question on a reported topic

S = 100, K = 110, r = 5% (continuous), T = 1, no dividends.

  1. What is the lowest no-arbitrage price for a European put?
    Answer and worked solution

    Answer: 4.6352

    Key idea. P ≥ max(K e−rT − S, 0).

    1. 110 e−0.05 ≈ 104.64.
    2. P ≥ 104.64 − 100 = 4.64.

    Check. Note it's below the intrinsic value 10: a European put can trade under intrinsic.

Source: Quant interview notes: A lower bound on a put · Try it in the app →

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).

Source: Quant interview notes: Market completeness · Try it in the app →

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.

Source: Quant interview notes: Implied v realised volatility · Try it in the app →

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.

Source: Quant interview notes: Dividends in pricing · Try it in the app →

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).

Source: Quant interview notes: The implied volatility surface · Try it in the app →

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.

Source: Quant interview notes: Risk reversals · Try it in the app →

Easy · Quant interview notes · Options · practice question on a reported topic

Buy a 90 call, sell two 100 calls and buy a 110 call, all with the same expiry.

  1. What is the largest payoff at expiry?
    Answer and worked solution

    Answer: 10

    Key idea. The tent peaks at the middle strike.

    1. At S = 100: (100 − 90) − 0 + 0 = 10.

    Check. It's zero below 90 and above 110, so the butterfly is a bet on the stock finishing near 100.

Source: Quant interview notes: A butterfly spread · Try it in the app →

Easy · Quant interview notes · Options · practice question on a reported topic

A 100-strike call costs 5 and the 100-strike put costs 3 (same expiry). You buy both.

  1. Above what stock price at expiry do you make money on the upside?
    Answer and worked solution

    Answer: 108

    Key idea. Break-evens are the strike ± the total premium.

    1. 100 + 8 = 108 (and 92 on the downside).

    Check. A long straddle is long gamma and vega and pays theta.

Source: Quant interview notes: Straddle break-even · Try it in the app →

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.

Source: Quant interview notes: Model risk · Try it in the app →

Medium · Quant interview notes · Options · practice question on a reported topic

A stock at 100 moves to 120 or 90 in one period; the gross risk-free return is 1.05.

  1. (a) What is the risk-neutral probability of the up move?
    Answer and worked solution

    Answer: 0.5

    Key idea. Risk-neutral probability makes the stock earn R.

    1. (1.05 − 0.9)/(1.2 − 0.9) = 0.5.
  2. (b) What is a call struck at 100 worth?
    Answer and worked solution

    Answer: 200/21 ≈ 9.5238

    Key idea. Discount the risk-neutral expected payoff.

    1. (0.5 × 20 + 0.5 × 0)/1.05 = 9.52.

    Check. Replication check: hold 2/3 of a share and borrow 57.14.

Source: Quant interview notes: A one-step binomial tree · Try it in the app →

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.

Source: Quant interview notes: The binomial model · Try it in the app →

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).

Source: Quant interview notes: Forwards v futures · Try it in the app →

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.

Source: Quant interview notes: Call and put payoffs · Try it in the app →

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.

Source: Quant interview notes: Prices and the risk-neutral density · Try it in the app →

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.

Source: Quant interview notes: Brownian motion · Try it in the app →

Easy · Quant interview notes · Stochastic calculus · practice question on a reported topic

W is standard Brownian motion.

  1. (a) What is Var(W₅ − W₂)?
    Answer and worked solution

    Answer: 3

    Key idea. Wt − Ws ~ N(0, t − s).

    1. 5 − 2 = 3.
  2. (b) What is E[W₂ W₅]?
    Answer and worked solution

    Answer: 2

    Key idea. Cov(Ws, Wt) = min(s, t).

    1. E[W₂²] + E[W₂(W₅ − W₂)] = 2 + 0 = 2.

Source: Quant interview notes: Brownian moments · Try it in the app →

Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic

W is standard Brownian motion.

  1. What is the quadratic variation of W over [0, 4]?
    Answer and worked solution

    Answer: 4

    Key idea. [W]T = T (written dW² = dt).

    1. Over [0, 4]: 4.

    Check. A smooth function has quadratic variation 0; Brownian paths are far rougher.

Source: Quant interview notes: Quadratic variation · Try it in the app →

Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic

What are the basic Itô multiplication rules?

Model answer

dt · dt = 0, dt · dW = 0, dW · dW = dt (and for two Brownian motions with correlation ρ, dW¹ dW² = ρ dt). The surprising one, dW² = dt, is quadratic variation: squared Brownian increments don't vanish at first order. It's why Itô's lemma has an extra ½σ² fxx term.

Source: Quant interview notes: Itô multiplication rules · Try it in the app →

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.

Source: Quant interview notes: Itô's lemma · Try it in the app →

Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic

A stock follows dS = μS dt + σS dW with S₀ = 100, μ = 10% and σ = 30%.

  1. (a) What is E[S₁]?
    Answer and worked solution

    Answer: 110.52

    Key idea. The mean grows at μ.

    1. 100 e0.1 ≈ 110.52.
  2. (b) What is the median of S₁?
    Answer and worked solution

    Answer: 105.65

    Key idea. The median grows at μ − σ²/2 (volatility drag).

    1. 100 e0.055 ≈ 105.65.

    Check. Mean above median: the lognormal is right-skewed.

    Trap. Using μ for the median as well.

Source: Quant interview notes: Mean and median of GBM · Try it in the app →

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.

Source: Quant interview notes: Why GBM for stocks · Try it in the app →

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.

Source: Quant interview notes: Martingales · Try it in the app →

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].

Source: Quant interview notes: Discounted prices as martingales · Try it in the app →

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.

Source: Quant interview notes: Girsanov's theorem · Try it in the app →

Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic

In Black–Scholes, a stock has expected return 10%, volatility 20%, and the risk-free rate is 3%.

  1. What is its market price of risk?
    Answer and worked solution

    Answer: 0.35

    Key idea. λ = (μ − r)/σ, the Sharpe ratio of the stock.

    1. (0.10 − 0.03)/0.20 = 0.35.

    Check. It's the drift shift Girsanov removes to reach the risk-neutral measure.

Source: Quant interview notes: The market price of risk · Try it in the app →

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.

Source: Quant interview notes: The Itô integral · Try it in the app →

Hard · Quant interview notes · Stochastic calculus · practice question on a reported topic

W is standard Brownian motion.

  1. What is E[(∫₀¹ t dWt)²]?
    Answer and worked solution

    Answer: 1/3 ≈ 0.33333

    Key idea. Isometry turns the second moment into an ordinary integral.

    1. ∫₀¹ t² dt = 1/3.

    Check. ∫₀¹ t dW is normal with mean 0 and variance 1/3.

Source: Quant interview notes: Itô isometry · Try it in the app →

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.

Source: Quant interview notes: Feynman–Kac · Try it in the app →

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.

Source: Quant interview notes: Optional stopping · Try it in the app →

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.

Source: Quant interview notes: Filtrations and adapted processes · Try it in the app →

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.

Source: Quant interview notes: Itô v Stratonovich · Try it in the app →

Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic

A spread follows dX = κ(θ − X) dt + σ dW with κ = 0.5 per year and σ = 0.2.

  1. (a) What is the half-life of a deviation from θ, in years?
    Answer and worked solution

    Answer: 1.3863

    Key idea. Half-life = ln 2 / κ.

    1. 0.693/0.5 ≈ 1.39 years.

    Check. A long half-life makes mean reversion slow to trade.

  2. (b) What is the long-run variance of X?
    Answer and worked solution

    Answer: 0.04

    Key idea. Stationary variance σ²/(2κ).

    1. 0.04/1 = 0.04 (standard deviation 0.2).

Source: Quant interview notes: An Ornstein–Uhlenbeck spread · Try it in the app →

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.

Source: Quant interview notes: Hitting times · Try it in the app →

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.

Source: Quant interview notes: Barriers and stopping times · Try it in the app →

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.

Source: Quant interview notes: Local martingales · Try it in the app →

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.

Source: Quant interview notes: Stochastic volatility · Try it in the app →

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.

Source: Quant interview notes: Adding jumps · Try it in the app →

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.

Source: Quant interview notes: Self-financing strategies · Try it in the app →

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.

Source: Quant interview notes: From Itô to the Black–Scholes PDE · Try it in the app →

Medium · Quant interview notes · Stochastic calculus · practice question on a reported topic

A stock follows GBM with μ = 8% and σ = 20%.

  1. (a) What is the mean of the one-year log return ln(S₁/S₀)?
    Answer and worked solution

    Answer: 0.06

    Key idea. Log returns are normal with mean (μ − σ²/2)T.

    1. 0.08 − 0.02 = 0.06.
  2. (b) What is its standard deviation?
    Answer and worked solution

    Answer: 0.2

    Key idea. SD = σ√T.

    1. 0.2.

Source: Quant interview notes: Log returns under GBM · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

A stock's daily returns are independent with volatility 1%. There are 252 trading days a year.

  1. What is its annualised volatility, in percent?
    Answer and worked solution

    Answer: 15.875

    Key idea. σannual = σdaily √252.

    1. 1% × √252 ≈ 15.9%.

    Check. Rule of thumb: daily vol × 16.

    Trap. Multiplying by 252.

Source: Quant interview notes: Scaling volatility · Try it in the app →

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.

Source: Quant interview notes: Brownian scaling · Try it in the app →

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.

Source: Quant interview notes: Simple and log returns · Try it in the app →

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.

Source: Quant interview notes: Rolling volatility · Try it in the app →

Medium · Quant interview notes · Coding · practice question on a reported topic

Write a vectorised Python function for the Black–Scholes call price.

Model answer

import numpy as np
from scipy.stats import norm
def bs_call(S, K, T, r, sigma):
    S, K, T, sigma = map(np.asarray, (S, K, T, sigma))
    if (T <= 0).any() or (sigma <= 0).any():
        raise ValueError("T and sigma must be positive")
    sq = sigma * np.sqrt(T)
    d1 = (np.log(S / K) + (r + 0.5 * sigma**2) * T) / sq
    d2 = d1 - sq
    return S * norm.cdf(d1) - K * np.exp(-r * T) * norm.cdf(d2)

NumPy broadcasting prices whole grids at once. Edge cases: T → 0 (return intrinsic value) and σ → 0 (discounted forward intrinsic).

Source: Quant interview notes: Vectorised Black–Scholes · Try it in the app →

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.

Source: Quant interview notes: Implied volatility by bisection · Try it in the app →

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.

Source: Quant interview notes: Monte Carlo call price · Try it in the app →

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).

Source: Quant interview notes: Antithetic variates · Try it in the app →

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).

Source: Quant interview notes: A binomial tree pricer · Try it in the app →

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.

Source: Quant interview notes: An American put on a tree · Try it in the app →

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).

Source: Quant interview notes: Historical VaR · Try it in the app →

Medium · Quant interview notes · Coding · practice question on a reported topic

Write a function for historical expected shortfall (CVaR).

Model answer

import numpy as np
def expected_shortfall(returns, level=0.975):
    r = np.asarray(returns, dtype=float)
    q = np.quantile(r, 1 - level)
    return -r[r <= q].mean()

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.

Source: Quant interview notes: Expected shortfall · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

A portfolio's value goes 100, 120, 90, 130, 104.

  1. What is its maximum drawdown, as a fraction?
    Answer and worked solution

    Answer: 0.25

    Key idea. Max drawdown = max over time of (running peak − value)/running peak.

    1. From 120 to 90: 25%. From 130 to 104: 20%.
    2. Maximum: 0.25.

    Check. In code: wealth / wealth.cummax() − 1, then the minimum.

    Trap. Using the global max and min (130 and 90), which come in the wrong order.

Source: Quant interview notes: Maximum drawdown · Try it in the app →

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)).

Source: Quant interview notes: Sharpe ratio in code · Try it in the app →

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.

Source: Quant interview notes: A backtest loop without lookahead · Try it in the app →

Easy · Quant interview notes · Coding · practice question on a reported topic

How do you find the first character in a string that appears only once?

Model answer

from collections import Counter
def first_unique(s):
    counts = Counter(s)
    return next((c for c in s if counts[c] == 1), None)

Two passes: count every character, then scan in order for the first with count 1. O(n) time, O(alphabet) space.

Source: Quant interview notes: First non-repeating character · Try it in the app →

Easy · Quant interview notes · Logic · practice question on a reported topic

Prices over six days: 7, 1, 5, 3, 6, 4. You may buy once and later sell once.

  1. What is the largest possible profit?
    Answer and worked solution

    Answer: 5

    Key idea. Single pass with the running minimum: O(n).

    1. Buy at 1 (day 2), sell at 6 (day 5).
    2. Profit 5.

    Check. Selling at 7 isn't allowed: it comes before the 1.

    Trap. Taking max − min regardless of order (6).

Source: Quant interview notes: One buy, one sell · Try it in the app →

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.

Source: Quant interview notes: An efficient moving average · Try it in the app →

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.

Source: Quant interview notes: Finding missing dates · Try it in the app →

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.

Source: Quant interview notes: Bisection root-finding · Try it in the app →

Medium · Quant interview notes · Logic · practice question on a reported topic

Use Newton's method on f(x) = x² − 2, starting from x₀ = 1.

  1. What is x₂ (after two steps)?
    Answer and worked solution

    Answer: 17/12 ≈ 1.4167

    Key idea. Newton for √2 averages x and 2/x.

    1. x₁ = 1.5.
    2. x₂ = (1.5 + 2/1.5)/2 = 17/12 ≈ 1.4167.

    Check. √2 ≈ 1.41421: the number of correct digits roughly doubles each step. It fails if f′ ≈ 0 or the start is far away.

Source: Quant interview notes: Newton's method · Try it in the app →

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.

Source: Quant interview notes: Why C++ in quant finance · Try it in the app →

Easy · Quant interview notes · Coding · practice question on a reported topic

Write a C++ function for the mean of a vector.

Model answer

#include <numeric>
#include <stdexcept>
#include <vector>
double mean(const std::vector<double>& v) {
    if (v.empty()) throw std::invalid_argument("empty");
    return std::accumulate(v.begin(), v.end(), 0.0) / v.size();
}

Take the vector by const reference (no copy), handle the empty case, and start the sum at 0.0 (not 0, which would make accumulate sum in int).

Source: Quant interview notes: Mean of a vector in C++ · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

Observations 2, 4 and 9 come from a normal distribution with known variance.

  1. What is the maximum-likelihood estimate of the mean?
    Answer and worked solution

    Answer: 5

    Key idea. For a normal mean, the MLE is the sample mean.

    1. (2 + 4 + 9)/3 = 5.

Source: Quant interview notes: MLE of a normal mean · Try it in the app →

Easy · Quant interview notes · Regression · practice question on a reported topic

Fit y = a + bx by least squares to the points (1, 2), (2, 3), (3, 5).

  1. What is the slope b?
    Answer and worked solution

    Answer: 1.5

    Key idea. Slope = sample covariance / sample variance of x (in matrix form, (XᵀX)⁻¹Xᵀy).

    1. Σ(x − x̄)(y − ȳ) = (−1)(−4/3) + 0 + (1)(5/3) = 3. Σ(x − x̄)² = 2.
    2. b = 3/2 = 1.5.

    Check. Intercept a = ȳ − b x̄ = 1/3.

Source: Quant interview notes: An OLS slope · Try it in the app →

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).

Source: Quant interview notes: What a p-value is · Try it in the app →

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.)

Source: Quant interview notes: Confidence intervals · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

You average 100 rolls of a fair die.

  1. What is the standard deviation of the average?
    Answer and worked solution

    Answer: 0.17078

    Key idea. SD of a mean = σ/√n; by the CLT the average is roughly normal.

    1. √(35/12) ≈ 1.708, divided by 10: ≈ 0.171.

    Check. So the average lands in 3.5 ± 0.34 about 95% of the time.

Source: Quant interview notes: The CLT and dice · Try it in the app →

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.

Source: Quant interview notes: The bias–variance trade-off · Try it in the app →

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.

Source: Quant interview notes: Multicollinearity · Try it in the app →

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.

Source: Quant interview notes: Heteroskedasticity · Try it in the app →

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).

Source: Quant interview notes: Autocorrelated residuals · Try it in the app →

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.

Source: Quant interview notes: Logistic regression · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

The data are 2, 4 and 6.

  1. (a) What is the unbiased sample variance (dividing by n − 1)?
    Answer and worked solution

    Answer: 4

    Key idea. Divide by n − 1 because the mean was estimated from the same data.

    1. 8/2 = 4.
  2. (b) And dividing by n?
    Answer and worked solution

    Answer: 8/3 ≈ 2.6667

    Key idea. Divide by n.

    1. 8/3 ≈ 2.67.

    Check. The n − 1 correction matters for small samples only.

Source: Quant interview notes: Sample v population variance · Try it in the app →

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.

Source: Quant interview notes: Correlation and causation · Try it in the app →

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.

Source: Quant interview notes: OLS in NumPy · Try it in the app →

Medium · Quant interview notes · Statistics · practice question on a reported topic

Xt = 1 + 0.5 Xt−1 + εt, with ε independent, mean 0, variance 1.

  1. (a) What is its long-run mean?
    Answer and worked solution

    Answer: 2

    Key idea. Mean = c/(1 − φ).

    1. 1/(1 − 0.5) = 2.
  2. (b) What is its long-run variance?
    Answer and worked solution

    Answer: 4/3 ≈ 1.3333

    Key idea. Variance = σ²/(1 − φ²).

    1. 1/(1 − 0.25) = 4/3.

    Check. As φ → 1 the variance blows up: a unit root.

Source: Quant interview notes: An AR(1) process · Try it in the app →

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.

Source: Quant interview notes: Why a random walk is non-stationary · Try it in the app →

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.

Source: Quant interview notes: Unit roots · Try it in the app →

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.

Source: Quant interview notes: Autocorrelation · Try it in the app →

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.

Source: Quant interview notes: AR v MA models · Try it in the app →

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.

Source: Quant interview notes: Cointegration · Try it in the app →

Medium · Quant interview notes · Statistics · practice question on a reported topic

Daily variance follows GARCH(1,1): ht = 0.00002 + 0.10 ε²t−1 + 0.85 ht−1.

  1. What is the long-run daily volatility?
    Answer and worked solution

    Answer: 0.02

    Key idea. Long-run variance ω/(1 − α − β).

    1. 0.00002/0.05 = 0.0004.
    2. Volatility √0.0004 = 0.02 (2% a day).

    Check. α + β = 0.95 means shocks decay slowly: a half-life of about 13.5 days.

Source: Quant interview notes: GARCH long-run volatility · Try it in the app →

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.

Source: Quant interview notes: The Kalman filter · Try it in the app →

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).

Source: Quant interview notes: Evaluating forecasts · Try it in the app →

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).

Source: Quant interview notes: Lagged features · Try it in the app →

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.

Source: Quant interview notes: Supervised v unsupervised learning · Try it in the app →

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.

Source: Quant interview notes: Splitting time-series data · Try it in the app →

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).

Source: Quant interview notes: Overfitting · Try it in the app →

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.

Source: Quant interview notes: L1 v L2 regularisation · Try it in the app →

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.

Source: Quant interview notes: Random forests · Try it in the app →

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.

Source: Quant interview notes: Gradient boosting · Try it in the app →

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.

Source: Quant interview notes: Uses of PCA · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

A default model flags 50 loans: 40 really default (true positives) and 10 don't (false positives). It misses 20 other defaults (false negatives).

  1. (a) What is its precision?
    Answer and worked solution

    Answer: 0.8

    Key idea. Precision = TP/(TP + FP).

    1. 40/50 = 0.8.
  2. (b) What is its recall?
    Answer and worked solution

    Answer: 2/3 ≈ 0.66667

    Key idea. Recall = TP/(TP + FN).

    1. 40/60 = 2/3.

    Check. With rare events, accuracy is misleading; precision and recall aren't.

Source: Quant interview notes: Precision and recall · Try it in the app →

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.

Source: Quant interview notes: Feature engineering in quant ML · Try it in the app →

Easy · Quant interview notes · Coding · practice question on a reported topic

Write Python code for a chronological train–test split.

Model answer

def time_split(df, test_frac=0.2, gap=0):
    df = df.sort_index()
    n_test = int(len(df) * test_frac)
    cut = len(df) - n_test
    return df.iloc[:cut - gap], df.iloc[cut:]

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.

Source: Quant interview notes: A time-series train–test split in code · Try it in the app →

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.

Source: Quant interview notes: Value, pointer, reference · Try it in the app →

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.

Source: Quant interview notes: RAII · Try it in the app →

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.

Source: Quant interview notes: unique_ptr v shared_ptr · Try it in the app →

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.

Source: Quant interview notes: Why std::vector is fast · Try it in the app →

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.

Source: Quant interview notes: map v unordered_map · Try it in the app →

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.)

Source: Quant interview notes: Median of a stream · Try it in the app →

Hard · Quant interview notes · Coding · practice question on a reported topic

Implement an LRU cache.

Model answer

from collections import OrderedDict
class LRU:
    def __init__(self, cap): self.cap, self.d = cap, OrderedDict()
    def get(self, k):
        if k not in self.d: return None
        self.d.move_to_end(k); return self.d[k]
    def put(self, k, v):
        self.d[k] = v; self.d.move_to_end(k)
        if len(self.d) > self.cap: self.d.popitem(last=False)

A hash map gives O(1) lookup; a doubly linked list keeps recency order with O(1) moves and evictions. OrderedDict is exactly that pair.

Source: Quant interview notes: An LRU cache · Try it in the app →

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).

Source: Quant interview notes: Rolling-window maximum · Try it in the app →

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.

Source: Quant interview notes: Cache locality · Try it in the app →

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.

Source: Quant interview notes: Allocation on the hot path · Try it in the app →

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.

Source: Quant interview notes: Latency v throughput · Try it in the app →

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)).

Source: Quant interview notes: False sharing · Try it in the app →

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.

Source: Quant interview notes: The limit order book · Try it in the app →

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.

Source: Quant interview notes: Tracking the top of the book · Try it in the app →

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.

Source: Quant interview notes: Designing an order book · Try it in the app →

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.

Source: Quant interview notes: Numerical stability · Try it in the app →

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.

Source: Quant interview notes: Avoiding matrix inverses · Try it in the app →

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.

Source: Quant interview notes: Finite differences for Black–Scholes · Try it in the app →

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.

Source: Quant interview notes: Stable sorting · Try it in the app →

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).

Source: Quant interview notes: Merging sorted arrays · Try it in the app →

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).

Source: Quant interview notes: Intersecting sorted arrays · Try it in the app →

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.

Source: Quant interview notes: Lookahead bias · Try it in the app →

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.

Source: Quant interview notes: Validating market data · Try it in the app →

Medium · Quant interview notes · Coding · practice question on a reported topic

Write Python to flag crossed markets in bid/ask data.

Model answer

def crossed(df):
    return df[df["bid"] >= df["ask"]]   # crossed (>) or locked (==)

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.

Source: Quant interview notes: Detecting crossed markets · Try it in the app →

Easy · Quant interview notes · Finance · practice question on a reported topic

Trades print at 100 shares @ $10, 300 @ $11 and 100 @ $12.

  1. What is the volume-weighted average price?
    Answer and worked solution

    Answer: 11

    Key idea. Weight each price by its volume.

    1. (1000 + 3300 + 1200)/500 = 5500/500 = $11.

    Check. In pandas: (df.price * df.size).sum() / df.size.sum().

Source: Quant interview notes: VWAP · Try it in the app →

Medium · Quant interview notes · Finance · practice question on a reported topic

You decide to buy 1,000 shares when the price is $50.00, and end up buying them at an average of $50.20.

  1. What is the implementation shortfall, in dollars?
    Answer and worked solution

    Answer: 200

    Key idea. Compare what you paid with the price when you decided.

    1. (50.20 − 50.00) × 1000 = $200, i.e. 40 basis points.

    Check. For a sell the sign flips.

Source: Quant interview notes: Implementation shortfall · Try it in the app →

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.

Source: Quant interview notes: Idempotency · Try it in the app →

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.

Source: Quant interview notes: Sequence numbers in feeds · Try it in the app →

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.

Source: Quant interview notes: Move semantics · Try it in the app →

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.

Source: Quant interview notes: Inclusion–exclusion · Try it in the app →

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]².

Source: Quant interview notes: The law of total variance · Try it in the app →

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.

Source: Quant interview notes: Jensen's inequality · Try it in the app →

Easy · Quant interview notes · Probability · practice question on a reported topic

X and Y are independent exponentials with rates 2 and 3.

  1. What is P(X < Y)?
    Answer and worked solution

    Answer: 0.4

    Key idea. P(X first) = λ/(λ + μ).

    1. 2/(2 + 3) = 0.4.

Source: Quant interview notes: An exponential race · Try it in the app →

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.

Source: Quant interview notes: Moment generating functions · Try it in the app →

Easy · Quant interview notes · Statistics · practice question on a reported topic

X ~ N(1, 4) and Y ~ N(2, 9) are independent (variances 4 and 9).

  1. What is the variance of 2X − Y?
    Answer and worked solution

    Answer: 25

    Key idea. Constants come out squared, and independent variances add.

    1. 4 × 4 + 1 × 9 = 25, so 2X − Y ~ N(0, 25).

    Check. The minus sign doesn't reduce the variance.

    Trap. Subtracting the variances (16 − 9).

Source: Quant interview notes: Combining independent normals · Try it in the app →

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).

Source: Quant interview notes: Change of variables · Try it in the app →

Hard · Quant interview notes · Statistics · practice question on a reported topic

X and Y are standard normal with correlation 0.6. You observe Y = 1.

  1. (a) What is E[X | Y = 1]?
    Answer and worked solution

    Answer: 0.6

    Key idea. The regression line through the means.

    1. 0.6 × 1 = 0.6.
  2. (b) What is Var(X | Y = 1)?
    Answer and worked solution

    Answer: 0.64

    Key idea. Var(X | Y) = σX²(1 − ρ²).

    1. 1 − 0.36 = 0.64.

    Check. Knowing Y removes ρ² = 36% of X's variance.

Source: Quant interview notes: Conditioning a bivariate normal · Try it in the app →

Medium · Quant interview notes · Markov chains · practice question on a reported topic

A two-state chain moves from state 0 to 1 with probability 0.3, and from 1 to 0 with probability 0.1 (otherwise it stays).

  1. In the long run, what fraction of time is it in state 1?
    Answer and worked solution

    Answer: 0.75

    Key idea. Flow balance between the two states.

    1. π₁/π₀ = 3 and π₀ + π₁ = 1.
    2. π₁ = 0.75.

Source: Quant interview notes: A stationary distribution · Try it in the app →

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.

Source: Quant interview notes: A martingale example · Try it in the app →

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.

Source: Quant interview notes: The score function · Try it in the app →

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/σ².

Source: Quant interview notes: Fisher information · Try it in the app →

Hard · Quant interview notes · Statistics · practice question on a reported topic

The sample mean of 100 observations with mean 2 and standard deviation 1 is X̄.

  1. Approximately what is the standard error of X̄²?
    Answer and worked solution

    Answer: 0.4

    Key idea. Linearise g around the true mean.

    1. |g′(2)| × 0.1 = 4 × 0.1 = 0.4.

    Check. It's an approximation that improves with n and fails near points where g′ = 0.

Source: Quant interview notes: The delta method · Try it in the app →

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).

Source: Quant interview notes: The bootstrap · Try it in the app →

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.

Source: Quant interview notes: Prior, likelihood, posterior · Try it in the app →

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.

Source: Quant interview notes: Ridge regression · Try it in the app →

Medium · Quant interview notes · Statistics · practice question on a reported topic

You test 100 independent trading signals, none of which has any real edge, each at the 5% level.

  1. (a) How many do you expect to come out "significant"?
    Answer and worked solution

    Answer: 5

    Key idea. Expected false positives = tests × α.

    1. 100 × 0.05 = 5.
  2. (b) What is the probability at least one does?
    Answer and worked solution

    Answer: 0.99408

    Key idea. Complement of "none passes".

    1. 1 − 0.95100 ≈ 1 − 0.006 = 0.994.

    Check. Hence Bonferroni (test at 0.05/100), false-discovery-rate control, or a deflated Sharpe ratio.

Source: Quant interview notes: Testing many signals · Try it in the app →

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).

Source: Quant interview notes: Identifying ARMA orders · Try it in the app →

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.

Source: Quant interview notes: Seasonality · Try it in the app →

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.

Source: Quant interview notes: Structural breaks · Try it in the app →

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.

Source: Quant interview notes: Walk-forward validation · Try it in the app →

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.

Source: Quant interview notes: Probability calibration · Try it in the app →

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.

Source: Quant interview notes: Limits of feature importance · Try it in the app →

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.

Source: Quant interview notes: Data leakage · Try it in the app →

Medium · Quant interview notes · Options · practice question on a reported topic

S = 100, K = 100, r = 5%, dividend yield q = 3% (both continuous), T = 1. The call costs 10.

  1. What should the European put cost?
    Answer and worked solution

    Answer: 8.0784

    Key idea. Parity with the stock replaced by its dividend-adjusted value.

    1. P = 10 − 97.04 + 95.12 ≈ 8.08.

    Trap. Forgetting the e−qT factor.

Source: Quant interview notes: Parity with a dividend yield · Try it in the app →

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.

Source: Quant interview notes: Static replication · Try it in the app →

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.

Source: Quant interview notes: Vega hedging · Try it in the app →

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.

Source: Quant interview notes: Why Black–Scholes can’t produce a smile · Try it in the app →

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.

Source: Quant interview notes: Local volatility · Try it in the app →

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).

Source: Quant interview notes: Path dependence of barriers · Try it in the app →

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).

Source: Quant interview notes: The Itô product rule · Try it in the app →

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.

Source: Quant interview notes: Why Itô integrals have mean zero · Try it in the app →

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).

Source: Quant interview notes: The generator of a diffusion · Try it in the app →

Medium · Quant interview notes · Coding · practice question on a reported topic

Write Python that generates walk-forward train/test splits.

Model answer

def walk_forward(n, train, test, step=None, expanding=False):
    step = step or test
    start = 0
    while start + train + test <= n:
        tr0 = 0 if expanding else start
        yield range(tr0, start + train), range(start + train, start + train + test)
        start += step

Each test window lies after its training window; roll by step, with a fixed or expanding training window. Add an embargo gap if labels overlap.

Source: Quant interview notes: Walk-forward splits in code · Try it in the app →

Medium · Quant interview notes · Coding · practice question on a reported topic

Write Python to winsorise a return series.

Model answer

def winsorize(r, lower=0.01, upper=0.99):
    lo, hi = r.quantile(lower), r.quantile(upper)
    return r.clip(lo, hi)

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.

Source: Quant interview notes: Winsorising returns · Try it in the app →

Easy · Quant interview notes · Expected value · practice question on a reported topic

You roll a fair die until you see a 6.

  1. What is the expected number of rolls?
    Answer and worked solution

    Answer: 6

    Key idea. Geometric waiting time.

    1. 1/(1/6) = 6.

Source: Quant interview notes: Waiting for a six · Try it in the app →

Medium · Quant interview notes · Probability · practice question on a reported topic

Orders arrive as a Poisson process at 10 per minute, and each is a buy independently with probability 0.3.

  1. What is the expected number of buys in 5 minutes?
    Answer and worked solution

    Answer: 15

    Key idea. Thinning: rate pλ.

    1. 3 × 5 = 15.

    Check. Buys and sells are then independent Poisson processes, a surprising fact.

Source: Quant interview notes: Thinning a Poisson process · Try it in the app →

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.

Source: Quant interview notes: Indicator variables · Try it in the app →

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.

Source: Quant interview notes: Zero covariance and independence · Try it in the app →

Medium · Quant interview notes · Conditional probability · practice question on a reported topic

A disease affects 1% of people. A test catches 99% of cases and gives a false positive to 5% of healthy people.

  1. If someone tests positive, what is the probability they have the disease?
    Answer and worked solution

    Answer: 1/6 ≈ 0.16667

    Key idea. Bayes: true positives against all positives.

    1. True positives 99, false positives 495.
    2. P = 99/594 ≈ 0.167.

    Check. False positives from the big healthy group swamp the true ones.

    Trap. Answering 99%, the test's sensitivity.

Source: Quant interview notes: Base rates · Try it in the app →

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.

Source: Quant interview notes: AIC v BIC · Try it in the app →

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.

Source: Quant interview notes: Likelihood-ratio tests · Try it in the app →

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.

Source: Quant interview notes: Omitted-variable bias · Try it in the app →

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.

Source: Quant interview notes: Endogeneity · Try it in the app →

Medium · Quant interview notes · Regression · practice question on a reported topic

A regression with 5 regressors on 50 observations has R² = 0.5.

  1. What is its adjusted R²?
    Answer and worked solution

    Answer: 0.44318

    Key idea. Penalise R² for the number of regressors.

    1. 1 − 0.5 × 49/44 ≈ 0.443.

    Check. Adding a useless regressor raises R² but can lower adjusted R².

Source: Quant interview notes: Adjusted R² · Try it in the app →

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.

Source: Quant interview notes: Newey–West standard errors · Try it in the app →

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.

Source: Quant interview notes: Volatility clustering · Try it in the app →

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.

Source: Quant interview notes: ARCH v GARCH · Try it in the app →

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.

Source: Quant interview notes: The I in ARIMA · Try it in the app →

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.

Source: Quant interview notes: One-step v multi-step forecasts · Try it in the app →

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.

Source: Quant interview notes: Lookahead in time-series features · Try it in the app →

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.

Source: Quant interview notes: ROC-AUC · Try it in the app →

Medium · Quant interview notes · Statistics · practice question on a reported topic

A model predicts probability 0.8 that an event happens, and it does.

  1. What is the cross-entropy (log) loss for this prediction (natural log)?
    Answer and worked solution

    Answer: 0.22314

    Key idea. Only the term for the outcome that happened counts.

    1. −ln 0.8 ≈ 0.223.

    Check. Predicting 0.99 for an event that doesn't happen costs −ln 0.01 ≈ 4.6: confident mistakes are punished hard.

Source: Quant interview notes: Cross-entropy loss · Try it in the app →

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.

Source: Quant interview notes: Accuracy on imbalanced data · Try it in the app →

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).

Source: Quant interview notes: Early stopping · Try it in the app →

Medium · Quant interview notes · Finance · practice question on a reported topic

You're long a forward to buy a stock at K = 100 in 6 months. The stock is now at 105 and r = 5% (continuous), no dividends.

  1. What is the forward contract worth now?
    Answer and worked solution

    Answer: 7.469

    Key idea. Stock minus the present value of the delivery price.

    1. 105 − 100 e−0.025 ≈ 105 − 97.53 = 7.47.

    Check. Equivalently (Ft − K) e−r(T−t).

    Trap. Answering 5, ignoring discounting.

Source: Quant interview notes: Valuing an existing forward · Try it in the app →

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.

Source: Quant interview notes: Why Itô has a second-derivative term · Try it in the app →

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.

Source: Quant interview notes: Rolling z-scores · Try it in the app →

Medium · Quant interview notes · Coding · practice question on a reported topic

Write Python to compute a confusion matrix from binary predictions.

Model answer

import numpy as np
def confusion(y_true, y_pred):
    t = np.asarray(y_true, bool); p = np.asarray(y_pred, bool)
    tp = int(( t &  p).sum()); fp = int((~t &  p).sum())
    fn = int(( t & ~p).sum()); tn = int((~t & ~p).sum())
    return {"tp": tp, "fp": fp, "fn": fn, "tn": tn}

Count the four combinations of true and predicted labels; precision, recall and accuracy follow from them.

Source: Quant interview notes: A confusion matrix in code · Try it in the app →

Easy · Quant interview notes · Coding · practice question on a reported topic

How do you remove duplicates from a list while keeping the original order?

Model answer

def dedupe(xs):
    seen, out = set(), []
    for x in xs:
        if x not in seen:
            seen.add(x); out.append(x)
    return out

O(n) with a set. In Python 3.7+ list(dict.fromkeys(xs)) does the same. list(set(xs)) loses the order.

Source: Quant interview notes: Removing duplicates, keeping order · Try it in the app →

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.

Source: Quant interview notes: Const correctness · Try it in the app →

Easy · Quant interview notes · Combinatorics · practice question on a reported topic

You arrange 6 distinct books on a shelf.

  1. In how many orders can they stand?
    Answer and worked solution

    Answer: 720

    Key idea. n distinct objects have n! orders.

    1. 6! = 720.

Source: Quant interview notes: Arranging objects · Try it in the app →

Medium · Quant interview notes · Coding · practice question on a reported topic

Write Python for a rolling annualised Sharpe ratio.

Model answer

import numpy as np
def rolling_sharpe(r, window=63, periods=252, rf=0.0):
    ex = r - rf / periods
    return ex.rolling(window).mean() / ex.rolling(window).std(ddof=1) * np.sqrt(periods)

Short windows make it very noisy: a 3-month Sharpe has a standard error of roughly 2 in annual terms, so don't read much into its swings.

Source: Quant interview notes: Rolling Sharpe ratio · Try it in the app →

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.

Source: Quant interview notes: Aligning two series by timestamp · Try it in the app →

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.

Source: Quant interview notes: Resampling trades to daily bars · Try it in the app →

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.

Source: Quant interview notes: Matching trades to quotes · Try it in the app →

Easy · Quant interview notes · Coding · practice question on a reported topic

Write pandas to add the mid price and bid–ask spread.

Model answer

def add_mid_spread(q):
    q = q[q["ask"] > q["bid"]].copy()      # drop crossed or locked quotes
    q["mid"] = (q["bid"] + q["ask"]) / 2
    q["spread"] = q["ask"] - q["bid"]
    q["spread_bps"] = 1e4 * q["spread"] / q["mid"]
    return q

Validate first (ask above bid, positive prices), then compute. Relative spread in basis points compares instruments of different prices.

Source: Quant interview notes: Spread and mid price · Try it in the app →

Medium · Quant interview notes · Coding · practice question on a reported topic

Write Python to flag stale prices.

Model answer

def stale_mask(p, max_run=5):
    run_id = (p != p.shift()).cumsum()
    run_len = p.groupby(run_id).transform("size")
    return run_len > max_run

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.

Source: Quant interview notes: Removing stale prices · Try it in the app →

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).

Source: Quant interview notes: Why NumPy vectorisation is fast · Try it in the app →

Easy · Quant interview notes · Coding · practice question on a reported topic

Write NumPy code for the covariance matrix of asset returns.

Model answer

import numpy as np
cov = np.cov(returns, rowvar=False)        # rows = dates, columns = assets
annual = cov * 252

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.

Source: Quant interview notes: A covariance matrix in NumPy · Try it in the app →

Easy · Quant interview notes · Coding · practice question on a reported topic

Implement prefix sums and say why they're useful.

Model answer

from itertools import accumulate
def prefix(a): return [0] + list(accumulate(a))
def range_sum(p, l, r): return p[r] - p[l]    # sum of a[l:r]

One O(n) pass, then any range sum in O(1). Used for rolling sums and means, cumulative volume, and 2D versions for image or grid queries.

Source: Quant interview notes: Prefix sums · Try it in the app →

Easy · Quant interview notes · Logic · practice question on a reported topic

The array is 2, 1, 5, 1, 3, 2.

  1. What is the largest sum of 3 consecutive elements?
    Answer and worked solution

    Answer: 9

    Key idea. Sliding window, O(n).

    1. Sums 8, 7, 9, 6.
    2. Maximum 9.

Source: Quant interview notes: Best window sum · Try it in the app →

Medium · Quant interview notes · Logic · practice question on a reported topic

The array is −2, 1, −3, 4, −1, 2, 1, −5, 4.

  1. What is the largest sum of a contiguous subarray?
    Answer and worked solution

    Answer: 6

    Key idea. Kadane: drop the running prefix whenever it goes negative.

    1. The subarray 4, −1, 2, 1.
    2. Sum 6.

    Check. O(n) time, O(1) space.

Source: Quant interview notes: Maximum subarray · Try it in the app →

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).

Source: Quant interview notes: Balanced brackets · Try it in the app →

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.

Source: Quant interview notes: Stack v heap · Try it in the app →

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.

Source: Quant interview notes: Destructors and exceptions · Try it in the app →

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).

Source: Quant interview notes: The rule of zero · Try it in the app →

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.

Source: Quant interview notes: reserve v resize · Try it in the app →

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.

Source: Quant interview notes: A streaming rolling mean · Try it in the app →

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.

Source: Quant interview notes: Deduplicating by sequence number · Try it in the app →

Easy · Quant interview notes · Finance · practice question on a reported topic

A two-asset portfolio rebalances from weights (50%, 50%) to (70%, 30%).

  1. What is the one-way turnover?
    Answer and worked solution

    Answer: 0.2

    Key idea. One-way turnover = ½ Σ|Δw|.

    1. ½ × 0.4 = 0.2 (20% of the portfolio traded).

    Check. Multiply by trading cost to estimate the rebalance's drag.

Source: Quant interview notes: Portfolio turnover · Try it in the app →

Easy · Quant interview notes · Finance · practice question on a reported topic

A portfolio holds 60% in asset A, which returns 2%, and 40% in asset B, which returns −1%.

  1. What is the portfolio's return (as a decimal)?
    Answer and worked solution

    Answer: 0.008

    Key idea. Weighted sum of returns (in pandas, (w * r).sum(axis=1) with aligned indexes).

    1. 0.012 − 0.004 = 0.008, i.e. 0.8%.

    Check. Use the weights held at the start of the period, not the end.

Source: Quant interview notes: Portfolio return from weights · Try it in the app →

Easy · Quant interview question bank · Combinatorics · practice question on a reported topic

You walk from (0, 0) to (10, 10), each step one unit right or up.

  1. How many different paths are there?
    Answer and worked solution

    Answer: 184760

    Key idea. Choose the positions of the 10 right-steps among 20.

    1. C(20, 10) = 184,756.

    Check. For a 2 × 2 grid this gives C(4, 2) = 6, easy to list.

Source: Quant interview question bank: Paths across a grid · Try it in the app →

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.

Source: Quant interview question bank: LLN v CLT · Try it in the app →

Medium · Quant interview question bank · Statistics · practice question on a reported topic

You flip a fair coin 1,000,000 times.

  1. Roughly what is the probability of fewer than 499,000 heads?
    Answer and worked solution

    Answer: 0.02275

    Key idea. Normal approximation via the CLT.

    1. (499,000 − 500,000)/500 = −2.
    2. Φ(−2) ≈ 0.023.

    Check. Two standard deviations either side covers about 95%, so each tail is about 2.3%.

Source: Quant interview question bank: A million coin flips · Try it in the app →

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.

Source: Quant interview question bank: Normal, uncorrelated, yet dependent · Try it in the app →

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.

  1. 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.

    1. ¾(W + 1) ≥ W ⇔ W ≤ 3, with equality at 3.
    2. 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.

Source: Quant interview question bank: Two coins, stop when you like · Try it in the app →

Medium · Quant interview question bank · Probability · practice question on a reported topic

A flips a fair coin 11 times and B flips one 10 times.

  1. What is the probability A gets more heads than B?
    Answer and worked solution

    Answer: 0.5

    Key idea. Symmetry: either A gets more heads, or A gets more tails, and not both.

    1. A has more heads than B or more tails than B (B has 10 of each total), exactly one of the two.
    2. By symmetry they're equally likely: ½.

Source: Quant interview question bank: Eleven flips against ten · Try it in the app →

Easy · Quant interview question bank · Probability · practice question on a reported topic

You and the dealer each draw a card from a shuffled 52-card deck (13 ranks, 4 of each). You win only if your rank is strictly higher.

  1. What is your probability of winning?
    Answer and worked solution

    Answer: 8/17 ≈ 0.47059

    Key idea. Remove ties, then split the rest evenly.

    1. P(tie) = 3/51 = 1/17.
    2. P(you win) = (1 − 1/17)/2 = 8/17 ≈ 0.47.

    Check. Ties going to the house is its edge.

Source: Quant interview question bank: Beat the dealer’s card · Try it in the app →

Medium · Quant interview question bank · Statistics · practice question on a reported topic

X is standard normal.

  1. (a) What is E[X³]?
    Answer and worked solution

    Answer: 0

    Key idea. Odd moments of a symmetric distribution vanish.

    1. E[X³] = 0.
  2. (b) What is E[X⁴]?
    Answer and worked solution

    Answer: 3

    Key idea. Even moments: (2k − 1)!! = 1 × 3 × … × (2k − 1).

    1. E[X⁴] = 3 × 1 = 3.

    Check. So a normal's kurtosis is 3; "excess kurtosis" is measured against it.

Source: Quant interview question bank: Moments of a standard normal · Try it in the app →

Hard · Quant interview question bank · Statistics · practice question on a reported topic

X ~ N(0, 1) and Y ~ N(0, 3) are independent, and you learn X + Y = 4.

  1. What is E[X | X + Y = 4]?
    Answer and worked solution

    Answer: 1

    Key idea. Each variable gets a share of the sum proportional to its variance.

    1. (1/(1 + 3)) × 4 = 1, and Y gets 3.

    Check. In general E[X | S = s] = μX + σX²/(σX² + σY²) × (s − μX − μY).

Source: Quant interview question bank: One normal given the sum · Try it in the app →

Medium · Quant interview question bank · Conditional probability · practice question on a reported topic

A bag has two coins: one lands heads 40% of the time, the other 60%. You pick one at random, toss it, and get heads.

  1. What is the probability the next toss of the same coin is heads?
    Answer and worked solution

    Answer: 0.52

    Key idea. Bayes update, then predict.

    1. P(H) = 0.5; P(HH) = (0.16 + 0.36)/2 = 0.26.
    2. P(next H | H) = 0.26/0.5 = 0.52.

    Check. A head makes the better coin more likely, so it's above 0.5.

Source: Quant interview question bank: Heads again? · Try it in the app →

Medium · Quant interview question bank · Bayes · practice question on a reported topic

Coins in a bucket have head-probabilities p spread uniformly between 0 and 1. You pick one and get 48 heads in 64 tosses.

  1. What is the posterior expected value of p?
    Answer and worked solution

    Answer: 0.74242

    Key idea. Beta–binomial conjugacy (Laplace's rule of succession).

    1. Posterior Beta(49, 17).
    2. Mean 49/66 ≈ 0.742.

    Check. Slightly pulled from 48/64 = 0.75 towards ½ by the prior.

Source: Quant interview question bank: A coin from a bucket · Try it in the app →

Hard · Quant interview question bank · Conditional probability · practice question on a reported topic

Alex and Beth take turns tossing a pair of coins, Alex first; the first to toss two heads wins. You're told Beth won.

  1. What is the probability she won on her second turn?
    Answer and worked solution

    Answer: 0.24609

    Key idea. Conditional probability over the turn on which she wins.

    1. P(Beth wins on turn 2) = (¾)³ × ¼ = 27/256.
    2. P(Beth wins) = (3/16)/(1 − 9/16) = 3/7.
    3. Ratio = (27/256)(7/3) = 63/256 ≈ 0.246.

    Check. Given she wins, her winning turn is geometric with ratio (¾)² = 9/16, so turn 1 has 7/16.

Source: Quant interview question bank: Beth wins: when? · Try it in the app →

Hard · Quant interview question bank · Probability · practice question on a reported topic

A fair coin is tossed until either HHH or THH appears. A backs HHH, B backs THH.

  1. What is the probability A wins?
    Answer and worked solution

    Answer: 0.125

    Key idea. Any T before the first HHH hands the win to THH.

    1. A wins only with HHH straight away: (½)³ = 1/8.

    Check. This is Penney's game: for any pattern there's another that beats it.

Source: Quant interview question bank: HHH against THH · Try it in the app →

Hard · Quant interview question bank · Probability · practice question on a reported topic

Two dice are rolled repeatedly. A wins if two consecutive rolls total 7; B wins if a roll totals 12.

  1. What is the probability A wins?
    Answer and worked solution

    Answer: 6/13 ≈ 0.46154

    Key idea. Two-state recursion.

    1. From the first equation, a₀ = (6/7)a₁.
    2. Then a₁ = 1/6 + (29/42)a₁ ⇒ a₁ = 7/13.
    3. a₀ = 6/13 ≈ 0.46.

    Check. B's single 12 (1/36) nearly matches A's 7-then-7 (1/36), but A's partial progress helps a little.

Source: Quant interview question bank: Two 7s before a 12 · Try it in the app →

Medium · Quant interview question bank · Random walks · practice question on a reported topic

A drunk man starts at 17 and steps left or right with equal probability, stopping at 0 or 100.

  1. What is the expected number of steps?
    Answer and worked solution

    Answer: 1411

    Key idea. For a symmetric walk from i between 0 and N, E[steps] = i(N − i).

    1. 17 × 83 = 1,411.

    Check. It's largest starting in the middle (2,500).

Source: Quant interview question bank: A drunk between 0 and 100 · Try it in the app →

Hard · Quant interview question bank · Combinatorics · practice question on a reported topic

Ten people queue for $1 tickets: five have a $1 coin and five only a $2 note. The seller starts with no change.

  1. For a random order of the queue, what is the probability everyone can be served in order?
    Answer and worked solution

    Answer: 1/6 ≈ 0.16667

    Key idea. Good orders are Dyck paths: a fraction 1/(n + 1) of all arrangements.

    1. n = 5: 1/(5 + 1) = 1/6.

    Check. By the reflection principle: bad paths ↔ paths ending at −2, C(10, 6) of them; (252 − 210)/252 = 1/6.

Source: Quant interview question bank: Change at the ticket office · Try it in the app →

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.

  1. 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.

    1. After game 1, P(A wins) is 42/64 with a win and 22/64 with a loss.
    2. Stake = 200 × (42 − 22)/64 ÷ 2 = 200 × 20/128 = $31.25.

    Check. Equivalently 100 × C(6, 3)/2⁶: the chance that game 1 is pivotal.

Source: Quant interview question bank: Betting on a series one game at a time · Try it in the app →

Hard · Quant interview question bank · Optimal stopping · practice question on a reported topic

You roll a die repeatedly, banking the face value each time, but a 6 wipes out everything and ends the game. You can stop whenever you like.

  1. At what total should you stop?
    Answer and worked solution

    Answer: 15

    Key idea. One-step look-ahead is optimal here because the threshold is monotone.

    1. Expected gain = 2.5 − W/6, which is ≤ 0 once W ≥ 15.
    2. Stop at 15 or more. The game is then worth about $6.15.

    Check. Below 15 another roll adds value on average.

Source: Quant interview question bank: Stop before a six · Try it in the app →

Hard · Quant interview question bank · Optimal stopping · practice question on a reported topic

A shuffled deck of 5 red and 5 black cards is turned over one at a time; each red pays you $1 and each black costs you $1. You may stop at any point.

  1. What is the game worth with the best strategy?
    Answer and worked solution

    Answer: 47/42 ≈ 1.119

    Key idea. Backward induction over the cards left.

    1. Working up the table gives V(5, 5) = 47/42 ≈ 1.12.

    Check. Without the option to stop, the game is worth exactly 0: the stopping option is worth $1.12.

Source: Quant interview question bank: Red and black cards · Try it in the app →

Hard · Quant interview question bank · Stochastic calculus · practice question on a reported topic

B is standard Brownian motion.

  1. What is P(B₁ > 0 and B₂ < 0)?
    Answer and worked solution

    Answer: 0.125

    Key idea. Two independent standard normals: probability = angle/2π.

    1. B₁ > 0 and Z < −B₁ is a wedge of angle π/4.
    2. P = (π/4)/(2π) = 1/8.

    Check. Compare P(B₁ > 0, B₂ > 0) = 3/8.

Source: Quant interview question bank: Positive, then negative · Try it in the app →

Medium · Quant interview question bank · Stochastic calculus · practice question on a reported topic

Standard Brownian motion starts at 0.

  1. (a) What is the expected time until it first hits −1 or +1?
    Answer and worked solution

    Answer: 1

    Key idea. Optional stopping on B² − t.

    1. E[τ] = E[Bτ²] = 1.

    Check. For the interval (−a, b) it's ab.

  2. (b) What is the probability it hits +3 before −5?
    Answer and worked solution

    Answer: 0.625

    Key idea. Optional stopping on B.

    1. p = 5/8 = 0.625.

    Check. The nearer barrier is the likelier one.

Source: Quant interview question bank: Leaving the interval · Try it in the app →

Hard · Quant interview question bank · Stochastic calculus · practice question on a reported topic

X follows dX = dt + dW from 0 (drift +1, volatility 1).

  1. What is the probability X ever reaches −1?
    Answer and worked solution

    Answer: 0.13534

    Key idea. Exponential martingale: P(ever hit −a) = e−2μa.

    1. e−2 × 1 × 1 = e−2 ≈ 0.135.

    Check. With no drift it would be certain.

Source: Quant interview question bank: Drifting up, ever reaching −1? · Try it in the app →

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] = ∞.

Source: Quant interview question bank: First-passage time of Brownian motion · Try it in the app →

Medium · Quant interview question bank · Stochastic calculus · practice question on a reported topic

Let Zt = √t · Bt for standard Brownian motion B.

  1. What is Var(Z₂)?
    Answer and worked solution

    Answer: 4

    Key idea. Var(Zt) = t × t = t².

    1. At t = 2: 4.

    Check. Z has mean 0 but isn't a martingale: E[Zt | Fs] = √t Bs ≠ √s Bs.

Source: Quant interview question bank: Is √t·B<sub>t</sub> a martingale? · Try it in the app →

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.

Source: Quant interview question bank: Is B<sup>3</sup> a martingale? · Try it in the app →

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".

Source: Quant interview question bank: Limits with ε and δ · Try it in the app →

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.

Source: Quant interview question bank: L'Hôpital's rule · Try it in the app →

Medium · Quant interview question bank · Logic · practice question on a reported topic

Consider √2√2√2…, defined as the limit of x₁ = √2, xn+1 = √2xn.

  1. What is its value?
    Answer and worked solution

    Answer: 2

    Key idea. Solve the fixed-point equation, then pick the root the iteration converges to.

    1. L = √2L has roots 2 and 4.
    2. Starting from √2 the sequence is increasing and bounded by 2, so L = 2.

    Check. 4 is a repelling fixed point.

    Trap. Answering 4.

Source: Quant interview question bank: An infinite power tower · Try it in the app →

Medium · Quant interview question bank · Logic · practice question on a reported topic

For a positive integer a, consider √(a + √(a + √(a + …))).

  1. What is the smallest a that makes it an integer?
    Answer and worked solution

    Answer: 2

    Key idea. Fixed point x² = a + x.

    1. a = x(x − 1): 2, 6, 12, 20, …
    2. Smallest: a = 2 (value 2).

Source: Quant interview question bank: A nested square root · Try it in the app →

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.)

Source: Quant interview question bank: A divergent series · Try it in the app →

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.

Source: Quant interview question bank: Derivatives and integrals · Try it in the app →

Easy · Quant interview question bank · Calculus · practice question on a reported topic

Give the derivatives of xⁿ, eˣ, ln x, sin x, cos x and tanh x, and the product, quotient and chain rules.

Model answer

(xⁿ)′ = nxⁿ⁻¹; (eˣ)′ = eˣ; (ln x)′ = 1/x; (sin x)′ = cos x; (cos x)′ = −sin x; (tanh x)′ = 1 − tanh²x = sech²x. Product: (uv)′ = u′v + uv′. Quotient: (u/v)′ = (u′v − uv′)/v². Chain: (f(g(x)))′ = f′(g(x)) g′(x).

Source: Quant interview question bank: Standard derivatives and rules · Try it in the app →

Medium · Quant interview question bank · Calculus · practice question on a reported topic

What is a Taylor expansion? Give those of eˣ, ln(1 + x), sin x and cos x.

Model answer

f(x) = Σ f⁽ⁿ⁾(a)(x − a)ⁿ/n!. Around 0: eˣ = 1 + x + x²/2! + x³/3! + …; ln(1 + x) = x − x²/2 + x³/3 − … (for |x| < 1); sin x = x − x³/3! + x⁵/5! − …; cos x = 1 − x²/2! + x⁴/4! − …. Uses: quick approximations (e0.05 ≈ 1.0513), delta–gamma P&L, and limits.

Source: Quant interview question bank: Taylor expansions · Try it in the app →

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².

Source: Quant interview question bank: Substitution and integration by parts · Try it in the app →

Medium · Quant interview question bank · Statistics · practice question on a reported topic

Compute ∫₀∞ e−x²/2 dx.

  1. Value:
    Answer and worked solution

    Answer: 1.2533

    Key idea. Use the normal density's normalising constant.

    1. ½ √(2π) = √(π/2) ≈ 1.2533.

    Check. The polar-coordinates trick proves ∫e−x² = √π.

Source: Quant interview question bank: Half a Gaussian integral · Try it in the app →

Medium · Quant interview question bank · Statistics · practice question on a reported topic

X is standard normal.

  1. What is E[X | X > 0]?
    Answer and worked solution

    Answer: 0.79788

    Key idea. Integrate x φ(x) over the positive half.

    1. (1/√(2π))/(½) = √(2/π) ≈ 0.798.

    Check. So E|X| = √(2/π) too.

Source: Quant interview question bank: E[X | X > 0] for a normal · Try it in the app →

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π).

Source: Quant interview question bank: A separable ODE · Try it in the app →

Medium · Quant interview question bank · Calculus · practice question on a reported topic

Solve y′ + y/x = 1/x² (x > 0).

Model answer

Integrating factor e∫1/x dx = x: (xy)′ = 1/x, so xy = ln x + C and y = (ln x + C)/x.

Source: Quant interview question bank: A first-order linear ODE · Try it in the app →

Medium · Quant interview question bank · Calculus · practice question on a reported topic

Solve ay″ + by′ + cy = 0, and then ay″ + by′ + cy = x.

Model answer

Try y = ert: ar² + br + c = 0. Distinct real roots r₁, r₂: y = C₁er₁x + C₂er₂x. Repeated root r: y = (C₁ + C₂x)erx. Complex roots α ± iβ: y = eαx(C₁cos βx + C₂sin βx). For the right-hand side x, add a particular solution yp = px + q (if c ≠ 0): c·p = 1 and bp + cq = 0, so yp = x/c − b/c².

Source: Quant interview question bank: Constant-coefficient second-order ODEs · Try it in the app →

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.

Source: Quant interview question bank: Determinants · Try it in the app →

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.

Source: Quant interview question bank: Eigenvalues and eigenvectors · Try it in the app →

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.

Source: Quant interview question bank: Positive definite matrices · Try it in the app →

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.

Source: Quant interview question bank: Diagonalisation · Try it in the app →

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.

Source: Quant interview question bank: QR decomposition · Try it in the app →

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.

Source: Quant interview question bank: LU decomposition · Try it in the app →

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.

Source: Quant interview question bank: Singular value decomposition · Try it in the app →

Easy · Quant interview question bank · Logic · practice question on a reported topic

One bell rings 4 times a minute and another 5 times a minute, evenly spaced. You hear them ring together.

  1. How many seconds until they next ring together?
    Answer and worked solution

    Answer: 60

    Key idea. LCM of the intervals.

    1. LCM(15, 12) = 60 seconds.

    Trap. Multiplying the intervals (180 s) instead of taking their least common multiple.

Source: Quant interview question bank: Two bells · Try it in the app →

Easy · Quant interview question bank · Logic · practice question on a reported topic

Add up the integers from 1 to 100.

  1. Total:
    Answer and worked solution

    Answer: 5050

    Key idea. Pair terms from the ends (Gauss): n(n + 1)/2.

    1. 50 pairs × 101 = 5,050.

Source: Quant interview question bank: Adding 1 to 100 · Try it in the app →

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.

Source: Quant interview question bank: Splitting a clock face · Try it in the app →

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.

Source: Quant interview question bank: Twelve marbles, one odd · Try it in the app →

Medium · Quant interview question bank · Logic · practice question on a reported topic

A circle touches both the x- and y-axes (in the first quadrant) and passes through (5, 10).

  1. What is the larger possible radius?
    Answer and worked solution

    Answer: 25

    Key idea. Centre (r, r), distance r to the point.

    1. r² − 30r + 125 = 0 ⇒ r = 5 or 25.
    2. Larger radius: 25.

    Check. Both work: (5, 10) is on the circle of radius 5 at (5, 5), and on the one of radius 25 at (25, 25).

Source: Quant interview question bank: A circle touching both axes · Try it in the app →

Medium · Quant interview question bank · Logic · practice question on a reported topic

A bug in a corner of a cube-shaped room with side 1 wants to reach the opposite corner, walking only on the walls, floor and ceiling.

  1. What is the shortest distance?
    Answer and worked solution

    Answer: 2.2361

    Key idea. Unfold the cube: the shortest path is a straight line on the net.

    1. Diagonal of a 1 × 2 rectangle: √(1 + 4) = √5 ≈ 2.236.

    Check. Shorter than going along edges (3), longer than through the air (√3).

Source: Quant interview question bank: A bug in a cube-shaped room · Try it in the app →

Easy · Quant interview question bank · Combinatorics · practice question on a reported topic

A 10 × 10 × 10 cube made of unit cubes is painted on the outside.

  1. How many unit cubes have at least one painted face?
    Answer and worked solution

    Answer: 488

    Key idea. Total minus the hidden interior.

    1. 1000 − 8³ = 1000 − 512 = 488.

Source: Quant interview question bank: A painted cube · Try it in the app →

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.

  1. 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.

    1. Distance = 1000 × (1/10 + 1/9 + … + 1/1) = 1000 × H10.
    2. ≈ 2,929 miles.

    Check. The harmonic series grows without bound, but slowly: 100 tanks get only about 5,187 miles.

Source: Quant interview question bank: A convoy of tanks · Try it in the app →

Easy · Quant interview question bank · Logic · practice question on a reported topic

What is the angle between the hour and minute hands at 6:15?

  1. Angle in degrees:
    Answer and worked solution

    Answer: 97.5

    Key idea. The hour hand moves 0.5° a minute.

    1. 187.5° − 90° = 97.5°.

    Trap. Saying 90°, forgetting that the hour hand has moved.

Source: Quant interview question bank: The hands at 6:15 · Try it in the app →

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.

  1. 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.

    1. P(new | seen) = (½ × 1)/(½ × 1 + ½ × 1/51) = 51/52.
    2. P(8 next) = 51/52 + (1/52)(1/50) = 2551/2600 ≈ 0.981.

    Check. Two cards in order is strong evidence: odds of 51 to 1 for the new deck.

Source: QFin UWA: The six and seven of clubs · Try it in the app →

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.

  1. What is the probability it came from A?
    Answer and worked solution

    Answer: 0.54795

    Key idea. Bayes with three causes.

    1. P(late) = 0.02 + 0.009 + 0.0075 = 0.0365.
    2. P(A | late) = 0.02/0.0365 ≈ 0.548.

    Check. A supplies 40% of computers but over half of the late ones.

Source: QFin UWA: Which supplier was late? · Try it in the app →

Medium · QFin UWA · Bayes · practice question on a reported topic

A coin's head-probability p is drawn uniformly from [0, 1]. You toss it 10 times and see 7 heads.

  1. (a) What is the posterior mean of p?
    Answer and worked solution

    Answer: 2/3 ≈ 0.66667

    Key idea. Beta–binomial updating.

    1. 8/(8 + 4) = 2/3.

    Check. It's pulled from 0.7 towards ½ by the prior; with 70 heads in 100 it would be 71/102 ≈ 0.696.

  2. (b) With 70 heads in 100 tosses instead, what is the posterior mean?
    Answer and worked solution

    Answer: 0.69608

    Key idea. Same updating rule, more data.

    1. 71/102 ≈ 0.696.

    Check. The 95% interval also narrows from roughly (0.39, 0.89) to about (0.61, 0.78).

Source: QFin UWA: A coin of unknown bias · Try it in the app →

Easy · QFin UWA · Combinatorics · practice question on a reported topic

John invites 5 of his 8 friends, but two of them refuse to come together.

  1. How many guest lists are possible?
    Answer and worked solution

    Answer: 36

    Key idea. Complement counting.

    1. C(8, 5) − C(6, 3) = 56 − 20 = 36.

    Check. By cases: neither 6, exactly one 2 × 15 = 30, total 36.

Source: QFin UWA: John's dinner party · Try it in the app →

Medium · QFin UWA · Combinatorics · practice question on a reported topic

On a 6 × 6 grid you move from (0, 0) to (6, 6) one step right or up at a time. Power-ups sit at (2, 3) and (4, 6).

  1. How many paths pass through at least one power-up?
    Answer and worked solution

    Answer: 460

    Key idea. Inclusion–exclusion over the two power-ups.

    1. Through (2, 3): 10 × 35 = 350. Through (4, 6): 210 × 1 = 210. Through both: 10 × 10 × 1 = 100.
    2. 350 + 210 − 100 = 460.

    Check. Out of C(12, 6) = 924 paths in total.

Source: QFin UWA: Paths through power-ups · Try it in the app →

Medium · QFin UWA · Game theory · practice question on a reported topic

Two players take turns adding a whole number from 1 to 10 to a running total that starts at 0. Whoever makes the total exactly 50 wins. You go first.

  1. What should you say first?
    Answer and worked solution

    Answer: 6

    Key idea. Keep the total at 50 minus a multiple of 11.

    1. 50 = 4 × 11 + 6, so start with 6.
    2. Then answer each x with 11 − x: 17, 28, 39, 50.

    Check. If 50 were a multiple of 11 you'd want to go second.

Source: QFin UWA: Race to 50 · Try it in the app →

Hard · QFin UWA · Expected value · practice question on a reported topic

Using rolls of a fair die, you want to simulate an event with probability 3/13 (drawing a picture card), using as few rolls as possible on average.

  1. With the best scheme, what is the expected number of rolls?
    Answer and worked solution

    Answer: 1.2

    Key idea. Generate U's base-6 digits lazily; each roll decides with probability 5/6.

    1. Rolls until a decision are geometric with success probability 5/6.
    2. Expected rolls = 6/5 = 1.2.

    Check. Rolling two dice and rerolling on unused outcomes needs about 2.77 rolls.

Source: QFin UWA: A picture card from a die · Try it in the app →

Easy · QFin UWA · Logic · practice question on a reported topic

The numbers 1 to 100 are listed in random order with one missing. The listed numbers add up to 5,000.

  1. Which number is missing?
    Answer and worked solution

    Answer: 50

    Key idea. Expected sum minus actual sum, O(n) time and O(1) memory.

    1. 5,050 − 5,000 = 50.

    Check. With two missing numbers, use the sum and the sum of squares to get a + b and a² + b², then solve (or XOR tricks).

Source: QFin UWA: The missing number · Try it in the app →

Medium · QFin UWA · Probability · practice question on a reported topic

A knockout tournament of 128 players uses a fixed bracket filled in at random; the stronger player always wins.

  1. What is the probability the two strongest players meet in the final?
    Answer and worked solution

    Answer: 0.50394

    Key idea. Opposite halves of the bracket.

    1. 64 of the 127 other slots are in the other half: 64/127 ≈ 0.504.

    Check. With re-drawing every round instead, the answer is the same: N/(2(N − 1)).

Source: QFin UWA: A fixed draw of 128 · Try it in the app →

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.

  1. 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.

    1. 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.

Source: QFin UWA: Aces and queens · Try it in the app →

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).

  1. (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.

    1. 3q − 2 + 2q = −q ⇒ 6q = 2.
    2. q = 1/3.
  2. (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.

    1. −3p + 1 − p = 2p ⇒ p = 1/6.

    Check. The game's value to Player 1 is −1/3.

Source: QFin UWA: A mixed-strategy equilibrium · Try it in the app →

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).

  1. 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.

    1. X = 17: about 1,758. X = 18: about 1,773. X = 19: about 1,755.
    2. 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.

Source: QFin UWA: The d20 threshold game · Try it in the app →

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.

  1. 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.

    1. n = 6: 94 × 63/64 = 92.53. n = 7: 93 × 127/128 = 92.27.
    2. Best: n = 6, worth ≈ $92.53.

    Check. Stop adding takes when the halved leftover is under 1% of the pot.

Source: QFin UWA: Place or take · Try it in the app →

Other firms

Jane Street · SIG (Susquehanna) · Optiver · IMC · Citadel / Citadel Securities · Five Rings · Two Sigma · Flow Traders · Maven Securities · Wincent · Akuna Capital · Da Vinci Derivatives · DRW · Common formats · Hudson River Trading · Jump Trading · Eclipse Trading · Old Mission · Belvedere Trading · Squarepoint Capital · Valkyrie Trading · Virtu Financial · Tibra · Tower Research Capital · D. E. Shaw · Mako

Practise by subject instead: topic guides.