Mental Models204 cards · 12 fields

Mental Models/Computing & Information

Optimal Stopping

最优停止

When you can't go back, let the first few pass, then take the first that beats them all.

On July 20, 1969, Apollo 11's lunar module was heading for the Moon's Sea of Tranquility when Neil Armstrong saw that the autopilot was taking it into an area covered in boulders. He switched to flying it by hand and kept going, looking for flat ground to land on. The fuel dropped second by second. Houston called out sixty seconds left before the fuel warning point, then thirty. He set the lunar module down on a flat patch. One more second of flying might find flatter ground, but it also burned one more second of fuel, and he couldn't go back over ground he had passed. When to stop was the question he had to answer the whole way down.

You need to rent one of ten apartments. Each one needs an answer on the spot: if you don't sign, someone else takes it, and you can't go back to one you've seen. The first one is decent. Do you sign? If you do, a better one may come later; if you keep looking, you don't know when to stop. Optimal stopping offers a ready-made method. For the first three, only look and don't sign, and remember the best of them. From the fourth on, sign the first one that is better than all of the first three; if none comes, take the last one. Do it this way, and your chance of getting the best of the ten is about four in ten. Picking at random, it's only one in ten.

Let the first 37 go: best odds of the very best
0%20%40%020406080100How many you let go firstChance of hiring the bestSuccess rate10 let go: 23%37 let go: 37%
0%20%40%0255075100How many you let go firstChance of hiring the bestSuccess rate10 let go: 23%37 let go: 37%

100 interviews, decided on the spot, only the best counts. Let a batch go to set the bar, then hire the first to beat them. Let 10 go: 23%. Let 70 go: only 25%.

Let a batch go, then wait for the first one that sets a new record

A hundred people come in one at a time to be interviewed. You must hire or reject each on the spot, anyone who leaves can't be called back, and you only want the very best of all of them. Let a first batch go and note the strongest among them. After that, hire the first person who is stronger than everyone in that batch; if no such person shows up, hire the last one. The first batch is there only to set the bar, not to be hired.

Let too few or too many go, and the success rate drops

Let only 10 people go, and the success rate is about 23%: the bar is too low, a middling person soon beats it, and you hire them. Let 70 go, and the success rate is about 25%: the bar is solid, but there is a 70% chance the very best is already among the people you let go. It is highest when you let 37 go, with a success rate close to 37%.

This number can be worked out. With people and the first let go, the very best person is equally likely to be in any position, with a chance of for each. If they are in position (), then for you to hire them, the strongest of the people before them must be in the batch you let go; otherwise you would have stopped before position . The chance of that is . Multiply the two chances and add them up from position to position , and the success rate is:

With many people, the part in brackets is about ( is the natural logarithm). Call the share you let go , and the success rate is about:

If is too small, the first factor is small: the bar is too low, and you hire a middling person early. If is too large, is small: the very best has most likely been let go already. The product of the two is largest at , and the success rate there is also .

The number of people doesn't appear in the formula, so with a hundred people you let 37 go, and with a thousand you let 368 go. Even doing this, you still miss more than six times out of ten: either the very best was let go, or partway through you hired someone who wasn't the best.

When every extra wait costs something, stop once the expected gain is less than the cost

When you sell a house or look for a parking space, the second best also counts, but every extra wait costs something: a week's interest, a stretch of extra walking. Then whether to stop is a matter of doing the sums. What you expect to gain by waiting once more equals the chance of meeting a better option times how much better it is; if that is less than what you pay, take the one in front of you. The better the option you already have, the smaller the chance that a much better one comes later; and the fewer chances remain, the more you should stop.

The method only holds when the number of options is known, the order is random, a rejection can't be undone, and only first place counts. When you shop online and can put several items in your cart at once, or other people's offers stay open for a few days, just set the candidates side by side and compare them. If you want "good enough" rather than "the best," setting a line you'll accept is simpler. Carrying "let the first 37% go" over to the love choices of a whole life is copying the answer to one problem onto a different problem.

Design
When interviews fill a whole week and candidates want an answer on the spot, write down before the first one how many people you will only look at, and what kind of candidate after that gets an offer. Then you don't agonize all over again after each one.
Explain
After an afternoon of shopping, what you end up buying is often the first item, in one of the later shops, that beats everything before it: the earlier shops set your bar.
Predict
Predict how this method turns out: even if you follow it, you still miss the best more than six times in ten, so before you commit, ask whether you can live with missing it.
  1. Do I want the very best of all, or one that's good enough?
  2. How many more options will come, who decides their order, and can I go back to one I've passed?
  3. If I keep looking, how much more do I expect to gain, and what does each extra look cost me?

Business

Setting a line to sell a home

You put your old home on the market. Buyers view it one at a time and make an offer on the spot; if you don't accept, they go look elsewhere. Suppose each extra week on the market costs another 10,000 yuan in mortgage interest and property fees. Offers in the first two weeks fall between 1.7 million and 1.8 million yuan. You estimate that if the offer in hand reaches 1.85 million, waiting another week gives only about a 20% chance of a buyer offering 50,000 more. That is an expected gain of 10,000 yuan, which just covers a week's costs. So you set your line at 1.85 million. In the third week a buyer offers 1.88 million, and you sign that day.

Everyday life

Finding parking on a one-way street

On the one-way street to a restaurant, once you drive past an empty space you can't go back, and you can't see whether there are spaces ahead. While you are still far from the restaurant, plenty of spaces ahead might open up, and passing one is expected to save you a long walk, so you pass two. The closer you get to the door, the fewer spaces are left ahead, and passing another one most likely means circling around to look again. Almost at the restaurant's door, you meet an empty space and pull straight in, whether or not it's the closest one.

Photography

The last frame of film

You carry a film camera down a one-way trail with only one frame of film left, and you want to shoot the most beautiful view on the whole walk. The map marks 12 viewpoints. You won't go back once you pass one, and you don't know in advance which is the most beautiful. At the first 4 you only look, and you remember the best of them. At the 7th, the sea of clouds is better than at any of the 6 before it, and you press the shutter. Shooting this way, your chance of catching the most beautiful view of the whole walk is about four in ten.

Optimal StoppingExplore vs ExploitThe more chances you have left, the more it pays to try something new.You've just moved to a new city and want a regular barber. This is the explore-exploit trade-off: try a new shop, or stick with one you know is decent. If you plan to live there ten years, try more shops, and don't settle too soon even if the first two are decent, because every month afterward pays back what the trials cost. If you're moving away next month and have only three haircuts left, you must settle on one after a few tries. When you can try many times, try more shops; when tries are limited and a missed one is gone, decide first how many to pass up, and then settle on the first one that's better.Optimal StoppingBounded Rationality / SatisficingNobody can weigh every option, so we stop at the first one that's good enough.Take buying a washing machine. Someone chasing the best one on the whole market will keep comparing and never be able to stop. Bounded rationality reminds you that you can't think through every option, so set the bar at "good enough" and buy the first machine that meets it. Optimal stopping is worth following, letting a batch pass at its pace, only when you truly must have the best and can look at each option only once.Optimal StoppingSunk CostMoney already spent won't come back, so don't let it decide what you do next.You've interviewed twenty people and hired none of them. If you want to keep interviewing, the reason shouldn't be "I've already put in so much work." The work already spent is a sunk cost and can't be recovered. Whether one more interview is worth it depends only on how much improvement one more person is expected to bring, and on what each extra day of waiting costs you.

At a procurement fair, 24 suppliers come on stage one after another to present their bids, in random order. After each one, you must answer on the spot; any supplier you pass on signs with someone else that day, with no going back. You can reliably compare the bids you've already heard, and your goal is to pick the best supplier of all.

How should you set the point where you commit?

You're looking for a place to rent. A listings site has 12 places that meet your needs, every landlord will hold theirs for a week, and you can go back and compare at any time. A friend suggests: look at four without signing, then sign the first one better than all four.

Does this advice fit your situation?

You've had a used guitar listed for three days. Now someone offers 1,800 yuan and will keep the offer open for one day. If you wait one more day, there's a 25% chance a buyer offering 2,000 yuan comes along; otherwise you still sell for 1,800. You put the cost of waiting one more day (the loss from it sitting unused, platform fees) at 80 yuan.

Going only on this information, what is the most sensible thing to do?