The single most reused probability question in the market.
Hats returned at random
The question
N people leave hats at a cloakroom and receive them back in a uniformly random order. What is the expected number of people who get their own hat?
Have a go before you open the solution. If you are stuck after a few minutes, the first paragraph below is usually enough of a nudge.
Show the worked solution
The answer
Exactly one, for every N.
Let X be the count of matches and write it as the sum of indicator variables, one per person.
Each person has probability 1/N of receiving their own hat, so each indicator has expectation 1/N.
Linearity of expectation sums N of them to give exactly 1, and this needs no independence at all.
The variance is also 1, and the count converges to a Poisson with mean 1, which is where the probability of no match at all being roughly 1/e comes from.
What it is testing
Linearity of expectation used without worrying about dependence.
Try these next
The final roll
HardYou roll a fair six-sided die until the running total first exceeds 12. What is the probability the final roll is a 6?
Two children, one is a boy
Warm-upA family has two children. You are told at least one of them is a boy. What is the probability both are boys?
The three doors
Warm-upThree doors hide one prize. You pick a door. The host, who knows where the prize is, opens a different door and reveals it is empty, then offers you the swap. Do you swap?
First head wins
StandardYou and I alternate flipping a fair coin, you first. The first person to flip heads wins. What is your probability of winning?
Preparing properly
Live opportunities
Interviewing soon? See who is hiring
Open vacancies we track at quant firms, grouped by role and city. Adverts are anonymised.
Hiring for these roles? Brief the desk on a hire or check your fit for a role.
Research desk
Speak to a quant market specialist
Ask what a firm really pays, how a desk hires, or where your profile sits. One reply from the research desk, in confidence, no obligation.