Probability, lesson 12
Interview puzzles, worked
Classic interview puzzles, solved step by step.
Interview puzzles look like tricks, but each one gives way to a method you've already met. This lesson works four classic puzzles step by step and names the method behind each, so you can use it on the new versions you'll be asked. You need conditional probability, expected value and the complement.
By the end, you can:
Part 1. Ask how the news was chosen
Solve the three doors puzzle by asking how the host picks a door.
A prize is behind one of three doors. You pick one. The host, who knows where the prize is, opens one of the other two to show it's empty, and offers you a switch to the last closed door. Two doors are left, so it looks like 50:50. It isn't.
Example 1.1
Three doors
You pick door 1. The host opens an empty door from the other two, never the one with the prize. Should you switch to the door the host leaves shut?
- Split on where the prize isdoor 1, 2 or 3, chance 1/3 each
Your pick doesn't move the prize.
- Prize behind door 1switching loses: 1/3
The host can open either other door. Both are empty, and switching takes you off the prize.
- Prize behind door 2 or 3switching wins: 2/3
The host must open the other empty door, so the door left shut has the prize.
AnswerSwitch. It wins 2/3 of the time, and staying wins 1/3.
Your first pick is right 1 time in 3, and the host's move can't change that: there's always an empty door to open. When your pick is wrong, the host's rule forces the prize onto the one door left shut. So switching wins exactly when your first pick was wrong, 2 times in 3.
The Monty Hall problem
The Monty Hall problem is the usual name for the three doors puzzle. Its method reaches far past game shows: before you update on news, ask how the news was chosen. The same open door means different things under different rules.
Change the rule and the answer changes. Suppose the host doesn't know where the prize is, opens one of the other doors at random, and it happens to be empty. That rules out the case where the prize was behind it, and the two cases left are equally likely: switching wins 1/2. Same door, different news.
Your turn
The same game with 100 doors. You pick one, and the host opens 98 empty ones. Switching wins with chance:
Part 2. Name the states
Find the average wait for a pattern of flips, with one equation per state.
Keep going with Pro
You've done the first part. Pro opens the rest of this lesson, and every other one.
- Name the states
- Add up small pieces
- Count the complement
Probability overviewSpotted a mistake? Tell us.