# Probability questions in quant interviews, worked step by step

Ten classic problems and the methods that crack them.

URL: https://insideout.sh/blog/quant-interview-probability-questions
Published: 2026-11-11
Updated: 2026-11-12

Most probability questions in quant interviews give way to five methods: count the outcomes, condition on what you know, work backwards from the end, add up expectations piece by piece, and set up a first-step equation. Below are ten classic problems, each solved step by step under the method that cracks it. Try each one yourself before you read the steps.

## 1. Five methods

| Method | Use it when | Problems here |
| --- | --- | --- |
| Counting | Every outcome is equally likely | Two aces, a shared birthday |
| Conditioning | You learn something, or the problem splits into cases | The two-headed coin |
| Working backwards | You make choices along the way | Rolling up to three times |
| Linearity of expectation | You want the average of a total | Hats returned, every face of a die |
| First-step analysis | Something repeats until it stops | The first six, two heads in a row, a fair bet |

One more tool helps with problems on a continuous line: draw the possible outcomes as a shape and measure the part that works. The broken stick at the end uses it.

Two habits help in every problem. Say which method you'll use before you start. And check the size of the answer at the end: a probability must lie between 0 and 1, and an average wait can't be shorter than one try.

## 2. Counting

**Example 2.1: Two aces**
Problem: You draw two cards from a shuffled 52-card deck. What is the chance both are aces?
1. First card: 4/52 (4 of the 52 cards are aces.)
2. Second card, given the first was an ace: 3/51 (3 aces are left among 51 cards.)
3. Multiply: 4/52 × 3/51 = 12/2,652 = 1/221 (Check by counting pairs: C(4, 2) ÷ C(52, 2) = 6 ÷ 1,326 = 1/221.)
Answer: 1/221, about 0.45%.

**Example 2.2: A shared birthday**
Problem: 23 people are in a room. Ignore leap years and treat every birthday as equally likely. What is the chance that at least two share a birthday?
1. Count the opposite: all different: 365/365 × 364/365 × … × 343/365 ("At least two" has many cases. "All different" has one, so work that out and subtract.)
2. Multiply it out: ≈ 0.493 (Each new person must miss everyone already in the room.)
3. Subtract from 1: 1 − 0.493 = 0.507
Answer: About 50.7%, just better than even.

## 3. Conditioning

**Example 3.1: The two-headed coin**
Problem: A bag holds two coins: one fair, one with heads on both sides. You pick one at random and flip it: heads. How likely is it that you hold the two-headed coin? And what is the chance the next flip of the same coin is heads?
1. Chance of heads with each coin: fair: 1/2 × 1/2 = 1/4; two-headed: 1/2 × 1 = 1/2 (Pick the coin, then flip it.)
2. Condition on seeing heads: 1/2 ÷ (1/2 + 1/4) = 2/3 (Of all the ways to see heads, two thirds come from the two-headed coin.)
3. The next flip: 2/3 × 1 + 1/3 × 1/2 = 5/6 (Average over which coin you hold, using the updated odds.)
Answer: 2/3 that it's the two-headed coin, and 5/6 that the next flip is heads.

The same move, weighing each explanation by how likely it makes what you saw, is Bayes' rule. [Conditional probability](https://insideout.sh/courses/probability/03) builds it up from counts.

## 4. Working backwards

**Example 4.1: Rolling up to three times**
Problem: You roll a fair die and are paid its face value in dollars. You may re-roll up to two times, and you keep the last roll. Played well, what is the game worth?
1. With no re-rolls left: 3.5 (You take whatever comes up.)
2. With one re-roll left: keep 4, 5 or 6: 1/2 × 5 + 1/2 × 3.5 = 4.25 (Keep any roll that beats 3.5.)
3. With two re-rolls left: keep 5 or 6: 2/6 × 5.5 + 4/6 × 4.25 ≈ 4.67 (Now a 4 isn't good enough, because rolling on is worth 4.25.)
Answer: 14/3, about $4.67.

## 5. Linearity of expectation

**Example 5.1: Hats returned at random**
Problem: n people leave their hats at a cloakroom, and the hats come back in random order. On average, how many people get their own hat?
1. Split the total into pieces: matches = X1 + X2 + … + Xn (Xi is 1 if person i gets their own hat, and 0 if not.)
2. Average of one piece: P(person i gets their own hat) = 1/n (Their hat is equally likely to go to any of the n people.)
3. Add the averages: n × 1/n = 1 (The average of a total is the total of the averages, even when the pieces depend on each other.)
Answer: 1, whatever the number of people.

**Example 5.2: Every face of a die**
Problem: On average, how many rolls of a fair die does it take to see all six faces?
1. Split the wait into stages: stage k: waiting for a new face when k − 1 are seen (Six stages, one for each new face.)
2. Average wait for each stage: 6/6, 6/5, 6/4, 6/3, 6/2, 6/1 (If something happens with chance p on each try, the average wait is 1/p.)
3. Add the stages: 1 + 1.2 + 1.5 + 2 + 3 + 6 = 14.7
Answer: 14.7 rolls.

## 6. First-step analysis

**Example 6.1: Waiting for a six**
Problem: On average, how many rolls of a fair die until the first six?
1. Call the answer E: E = 1 + 5/6 × E (You always spend one roll. With chance 5/6 it isn't a six, and you're back where you started.)
2. Solve: E ÷ 6 = 1, so E = 6
Answer: 6 rolls.

**Example 6.2: Two heads in a row**
Problem: On average, how many flips of a fair coin until you see two heads in a row?
1. Name the states: E from the start, H just after one head (Flipping tails always sends you back to the start.)
2. From the start: E = 1 + 1/2 × H + 1/2 × E (Heads moves you to H; tails leaves you at the start.)
3. After one head: H = 1 + 1/2 × 0 + 1/2 × E (Heads finishes; tails sends you back.)
4. Solve: E = 2 + H and H = 1 + E/2, so E = 6
Answer: 6 flips. Heads then tails takes only 4 on average, because a failed try doesn't send you all the way back.

**Example 6.3: A fair bet until you stop**
Problem: You start with $1 and bet $1 on each flip of a fair coin. You stop when you have $0 or $3. What is the chance you reach $3?
1. Name the chances: p1 from $1, p2 from $2; p0 = 0, p3 = 1
2. First step from $1: p1 = 1/2 × p2 + 1/2 × 0
3. First step from $2: p2 = 1/2 × 1 + 1/2 × p1
4. Solve: p1 = 1/4 + p1/4, so p1 = 1/3
Answer: 1/3. A shortcut: a fair game keeps your average wealth at $1, so 3 × p = 1.

## 7. Draw the outcomes

**Example 7.1: Breaking a stick**
Problem: A stick is broken at two points chosen at random along its length. What is the chance that the three pieces can form a triangle?
1. Turn the rule into numbers: every piece shorter than 1/2 (Three lengths make a triangle when each is shorter than the other two together. With a total of 1, that means each is under 1/2.)
2. Draw the outcomes: break points x and y fill a 1 × 1 square (Every point in the square is equally likely.)
3. Shade where it works, for x < y: x < 1/2, y > 1/2, y − x < 1/2 (A triangle of area 1/8. The half where y < x gives another 1/8.)
4. Add both halves: 1/8 + 1/8 = 1/4
Answer: 1/4.

If you can't see the shape, simulate. A few lines of Python that break a million sticks will land close to 0.25, and that's a fair check to mention in an interview.

```python
import random

def triangle():
    x, y = sorted((random.random(), random.random()))
    return max(x, y - x, 1 - y) < 0.5

n = 1_000_000
print(sum(triangle() for _ in range(n)) / n)  # close to 0.25
```

## 8. How to practise

1. Try each problem for five minutes before you read any steps.
2. Say the method out loud before you calculate: count, condition, work backwards, split, or first step.
3. Keep fractions while you work, and turn them into decimals only at the end.
4. Check the size of every answer.
5. Redo every miss three days later, without notes.

[Probability practice](https://insideout.sh/interview/probability) gives you fresh problems in these patterns, and [Puzzles and Brainteasers](https://insideout.sh/courses/puzzles) covers the logic questions that sit beside them. For the whole interview, read [how to prepare for a quant interview](https://insideout.sh/blog/quant-interview-prep).

## Questions

**What probability topics come up in quant interviews?** Counting, conditional probability and Bayes' rule, expected value, common distributions such as the binomial and geometric, and processes that repeat until something happens. Some interviews add continuous problems like the broken stick.

**How many practice problems should I do?** Enough that you recognise the method within a minute. For most people that means a few problems a day for several weeks, with every miss redone a few days later.

**Can I use a calculator?** Usually not in phone or video rounds. Keep numbers as fractions while you work, and turn them into a decimal or percentage at the end.

**What if I get stuck?** Say what you know, try a smaller case, or simulate in your head with a few outcomes. Interviewers often give a hint when they see you reasoning clearly.

## Learn it properly

- [Counting outcomes](https://insideout.sh/courses/probability/01) (Probability, lesson 1, free)
- [Probability is counting](https://insideout.sh/courses/probability/02) (Probability, lesson 2, free)
- [Conditional probability](https://insideout.sh/courses/probability/03) (Probability, lesson 3, free)
- [A puzzle you've never seen](https://insideout.sh/courses/puzzles/01) (Puzzles and Brainteasers, lesson 1, free)
- [Invariants and parity](https://insideout.sh/courses/puzzles/02) (Puzzles and Brainteasers, lesson 2, free)
- [The pigeonhole principle](https://insideout.sh/courses/puzzles/03) (Puzzles and Brainteasers, lesson 3, free)
