LibraryReference articles

Probability interview questions for quants, by method

Reference article

Lists of probability questions run to the hundreds, but the ways to solve them are few. In our view, most short questions of this kind yield to one of about seven methods. If you can name the method in the first minute, the rest is arithmetic. This page teaches the methods, one at a time, each with a short question and a full answer.

This page is for short probability questions of the kind found in quant interview practice material: dice, cards, coins and waiting times, solved in a few minutes without a calculator, while you talk.

There are many lists of such questions. This page does something different. It names the seven methods that, in our view, solve most of them, and teaches each one with a question we wrote and its full answer. After each method there are problems from the Thuztra Learn library to practise on.

A few words first. Probability is the maths of chance: a number from 0 to 1 for how likely something is. The expected value of a random number is its long-run average. Two events are independent when knowing one tells you nothing about the other.

We checked every answer on this page twice: once by exact working and once by a computer simulation, which is a program that plays the game many times and averages the results.

Method 1: counting and symmetry

When every outcome is equally likely, a probability is a count: the number of outcomes you want, divided by the number of outcomes in total. Symmetry is the shortcut. If several outcomes must have the same chance, you can often skip the count.

Question. Roll three fair dice, one after another. What is the chance that all three show different faces? What is the chance that they come up in strictly increasing order?

Answer. There are 6×6×6=2166 \times 6 \times 6 = 216 equally likely outcomes. For all faces to differ, the first die has 6 choices, the second 5 and the third 4, so 120120 outcomes work. The chance is 120/216=5/9120/216 = 5/9, about 0.56.

For the second part, use symmetry. Any set of three different faces can appear in 3!=63! = 6 orders, and each order is equally likely. Exactly one of the six is increasing. So the chance is (5/9)/6=5/54(5/9)/6 = 5/54, about 0.093. No second count is needed.

Practise on: two dice, one question, at least one six in three rolls, the card immediately after the first ace and at least one ace, and the count that arrives first. For the basics of counting, read from a list of ways to a number.

Method 2: conditioning and Bayes' rule

A conditional probability is the chance of one event, given that another has happened. Bayes' rule turns "how likely is the evidence, given the cause" into "how likely is the cause, given the evidence". The trap is the base rate: how common the cause is before you see any evidence.

Question. Suppose one card payment in 500 is fraud. A fraud check flags 99% of fraud payments. It also flags 2% of genuine payments by mistake. A payment is flagged. What is the chance it is fraud?

Answer. Count in whole payments instead of percentages. Take 100,000 payments. 200 are fraud, and the check flags 198 of them. 99,800 are genuine, and the check flags 2% of them, which is 1,996. So 2,194 payments are flagged, and 198 of those are fraud. The chance is 198/2194198/2194, about 0.09, or 9%.

A guess near 99% is tempting. The answer is low because genuine payments outnumber fraud by almost 500 to 1. So even a small false-alarm rate produces many more false alarms than true ones. In formula form, with FF for fraud and AA for a flag:

P(F∣A)=P(A∣F) P(F)P(A∣F) P(F)+P(A∣not F) P(not F)=0.99×0.0020.99×0.002+0.02×0.998≈0.090.P(F \mid A) = \frac{P(A \mid F)\,P(F)}{P(A \mid F)\,P(F) + P(A \mid \text{not } F)\,P(\text{not } F)} = \frac{0.99 \times 0.002}{0.99 \times 0.002 + 0.02 \times 0.998} \approx 0.090.

Practise on: a very accurate test for a very rare thing, three cards, one black face showing, Monty Hall, but the host has no idea where the car is and splitting balls between two urns.

Method 3: linearity of expectation, with indicators

The expected value of a sum is the sum of the expected values. This holds even when the parts depend on each other. An indicator is a number that is 1 if an event happens and 0 if it does not. Its expected value is the chance of the event. So to find the expected count of something, write the count as a sum of indicators and add up their chances.

Question. Roll a fair die 12 times. On average, how many different faces do you see?

Answer. Give each face its own indicator: 1 if that face appears at least once in the 12 rolls, 0 if not. A given face is missing from all 12 rolls with chance (5/6)12(5/6)^{12}, about 0.112. So it appears with chance 1−(5/6)121 - (5/6)^{12}, about 0.888. There are six faces, and the count of different faces is the sum of the six indicators. So the expected count is

6(1−(56)12)≈5.33.6 \left(1 - \left(\tfrac{5}{6}\right)^{12}\right) \approx 5.33.

The indicators here are not independent: if one face is missing, the others are a little more likely to appear. Linearity does not care, which is why it is so useful.

Practise on: the cards caught between two jokers, neighbouring flips that agree, how often a running maximum gets beaten and rolling until every face has appeared.

Method 4: first-step analysis

Many questions ask how long you wait for something, or the chance of reaching one state before another. First-step analysis means: look at what the first step can do, and write the answer in terms of the answers from where that step leaves you. That gives a small set of equations.

Question. Flip a fair coin until you see two heads in a row. On average, how many flips do you need?

Answer. Name two states. Let E0E_0 be the expected number of flips still needed when the last flip was not a head, or at the start. Let E1E_1 be the expected number still needed when the last flip was a head. One flip from each state gives

E0=1+12E1+12E0,E1=1+12⋅0+12E0.E_0 = 1 + \tfrac{1}{2} E_1 + \tfrac{1}{2} E_0, \qquad E_1 = 1 + \tfrac{1}{2} \cdot 0 + \tfrac{1}{2} E_0.

From the first equation, E0=2+E1E_0 = 2 + E_1. Put that into the second: E1=1+12(2+E1)E_1 = 1 + \tfrac{1}{2}(2 + E_1), so E1=4E_1 = 4 and E0=6E_0 = 6. You need 6 flips on average.

A good follow-up is to ask about heads then tails instead. The answer is 4, not 6. After a head, a tail ends the wait and another head keeps you one step away. For two heads, a tail sends you back to the start. Interviewers like this pair because the two patterns look alike.

Practise on: winning a game that keeps returning to deuce, random walk to the far corner of a cube, waiting for a three-flip pattern and a fair walk, and the level one step above.

Method 5: geometric and continuous probability

When a number is drawn at random from an interval, the chance of landing in a region is its length, or its area if there are two numbers. Draw the square, shade the region you want, and measure it.

Question. Draw two numbers XX and YY independently and uniformly from 0 to 1. Uniformly means every part of the interval of the same length is equally likely. What is the chance that X+Y>1.5X + Y > 1.5? What is the expected value of the larger of the two?

Answer. The pair (X,Y)(X, Y) is a random point in the unit square, which has area 1. The region X+Y>1.5X + Y > 1.5 is the corner triangle with corners (0.5,1)(0.5, 1), (1,1)(1, 1) and (1,0.5)(1, 0.5). Its two short sides are 0.5 long, so its area is 12×0.5×0.5=0.125\tfrac{1}{2} \times 0.5 \times 0.5 = 0.125. The chance is 1/81/8.

For the larger number MM, the chance that M≤mM \le m is the chance that both numbers are at most mm, which is m2m^2. A number between 0 and 1 has expected value equal to the area above its cumulative curve, so

E[M]=∫01(1−m2)dm=1−13=23.E[M] = \int_0^1 \left(1 - m^2\right) dm = 1 - \tfrac{1}{3} = \tfrac{2}{3}.

Practise on: two arrivals, a quarter hour of patience, the longer piece of a snapped stick, a chord drawn at random, and three honest answers and the largest, the smallest, and the gap.

Method 6: fair games and gambler's ruin

A fair game is one where your expected wealth after each bet equals your wealth before it. A result called the optional stopping theorem says that, under conditions, this stays true even when you choose when to stop. The conditions matter. The simplest safe case is a game whose wealth stays inside fixed limits and that ends in finite time. For more, read martingales.

Question. You start with 2 counters. A fair coin decides each round: heads, you win a counter; tails, you lose one. You stop at 0 or at 5. What is the chance you reach 5? How many rounds does the game last on average?

Answer. Your counters stay between 0 and 5, and the game ends, so optional stopping applies. Expected final counters equal the starting 2. If pp is the chance of reaching 5, then 5p+0×(1−p)=25p + 0 \times (1 - p) = 2, so p=2/5p = 2/5.

For the length, a second fair-game fact helps: counters squared, minus the number of rounds played, also has a constant expected value. At the start it is 22=42^2 = 4. At the end, counters squared is 25 with chance 2/52/5 and 0 otherwise, so its expected value is 10. So 10−E[T]=410 - E[T] = 4, where TT is the number of rounds, and E[T]=6E[T] = 6. This matches the known formula a(b−a)=2×3a(b - a) = 2 \times 3 for a start at aa and a target at bb.

Practise on: reaching the target before going broke, adding up a random number of rolls, the rule that wins almost every time and the system that wins every time.

Method 7: the sanity check habit

The last method is not a formula. It is a habit of checking an answer before you say it. Three checks catch most slips.

  1. Bounds. A probability is between 0 and 1. The expected number of different faces in 12 rolls must be between 1 and 6, and 5.33 is. An expected wait for two heads must be at least 2.
  2. Small cases. Shrink the question until you can count it by hand. For the dice in Method 1, two dice that differ have chance 30/36=5/630/36 = 5/6, and the same method gives 6×5/366 \times 5 / 36. The method agrees with the hand count, so trust it at three dice.
  3. Simulation. At home, check with a short program. This one plays the two-heads game 100,000 times with a fixed seed, so it prints the same number each time:
import random

random.seed(1)
total = 0
for _ in range(100_000):
    flips, last_was_head = 0, False
    while True:
        flips += 1
        head = random.random() < 0.5
        if head and last_was_head:
            break
        last_was_head = head
    total += flips
print(round(total / 100_000, 1))  # 6.0

In an interview you cannot run code, but you can say what you would run. That tells the interviewer you know how to check yourself.

How to answer out loud

Interviewers hear your reasoning, not only your number. We suggest this order:

  1. Say the question back in your own words, and ask about anything unclear, such as whether a coin is fair.
  2. Name the method you will try, for example "this looks like first-step analysis".
  3. Work a small case if the full case is large.
  4. Give the answer as an exact fraction, then as a rough decimal.
  5. Do one sanity check out loud.

If you are stuck, say what you have tried and why it did not work. A clear dead end is better than silence.

A practice plan

We suggest one method a day for a week, with the seventh day for mixed questions under a timer. For each method, solve the worked question above without looking. Then do the linked problems. Write down every slip you make, and redo those problems at the end of the week.

For a free course with lectures and problem sets, MIT OpenCourseWare publishes 6.041SC Probabilistic Systems Analysis and Applied Probability, taught by Prof. John Tsitsiklis in Fall 2013. The course page lists lecture videos, problem sets with solutions and problem-solving videos. For books, see the best books for quant interviews. For more questions, see the interview questions, quant puzzles and quant brainteasers banks, and the probability topic page.

What Thuztra Learn covers here, and what it does not

Thuztra Learn is our product. Its modules that teach these methods include Probability from zero, Level 1: First instincts, Level 1: The expectation toolkit, Probability from the ground up and Level 1: Stopping, games and edge. Every problem linked above is in its library. Four of the problems are free to read in full, and the rest need a membership. The questions and worked answers are written by us, though many set-ups are classic problems. Learn does not give you questions from any firm's real interviews, and it does not place anyone in a job. Membership is a paid subscription: see what Thuztra Learn is and what it costs.

Your first method to practise

Pick the method above you are least sure of. Close this page and solve its worked question on paper. Then open its first linked problem.

You know it worked if you can name the method within a minute of reading a new question. Two things go wrong most often. You recall an answer but cannot say why: redo the worked question and say each step out loud. Or the maths words are new: start with from a list of ways to a number first.

Fine print: MIT is named only as the publisher of a free course. It has no link to Thuztra. Education only, not advice.

In short

Learn the methods, not the answers. For each new question, ask which method fits, try a small case, and check the size of your answer before you say it. Then practise out loud, because the interviewer is listening to how you reason as much as to the number.

Terms used here

Related

The cards caught between two jokers

A shuffled deck with both jokers left in. How many ordinary cards sit strictly between them on average? One card at a time, and the deck size stops mattering.

A very accurate test for a very rare thing

A screening test that is right almost every time, applied to a condition almost nobody has. The number most people give is wrong by more than an order of magnitude.

From a list of ways to a number

Count the ways that suit us, count all the ways, divide. Worked on a die and on two coins, together with the one condition that has to hold before the division is allowed at all.

The best books for quantitative finance interviews

Nine books for quant interviews, grouped by the stage they help with, plus what the Green Book and Heard on the Street each are, from the author and catalogue records. No book problems copied.

More on these topics

Topics

Also in the library