Learn
Lesson · Dynamic Programming and Sequential Decisions · When to stop

Thresholds and When to Stop Looking

Offers arrive one per period, you may take one or wait, and waiting costs something and eventually runs out. The recursion is two lines and its answer has a shape: accept an offer exactly when it beats what carrying on is worth. That shape is almost always stated as though it were obvious. Here it is a measurement — every way of choosing which offers to accept in which period is enumerated and evaluated, and the winner is then tested for whether it is a threshold at all.

V(0) = 0, V(t) = E[ max(x, V(t-1)) ] - c accept an offer exactly when it beats V(t-1), the value of carrying on offers 10, 20, 30 each with probability 1/3; three periods; a look costs 1 thresholds 22 with three left, 19 with two, 0 with one the whole search is worth 71/3, and in the last period anything is taken 512 accept-sets enumerated; the best of them IS a threshold rule, measured
One recursion, and the shape of its answer checked rather than assumed

Core ideas

What this lesson establishes

Three ideas: what the state is, why the threshold falls, and what it takes to prove the rule has the shape the recursion assumed.

1

The state is how many periods are left, and nothing else

Not which offers have been seen, not their average, not how long you have been looking. Offers are independent draws from a known distribution, so the past is uninformative about the future and the only thing that matters is how many chances remain. That is the whole modelling content of the problem, and it is the assumption to interrogate first: it fails the moment offers are correlated or the distribution has to be learned.

2

The threshold is the value of carrying on, and it falls

V(t) is what the whole remaining search is worth with t periods to go, and an offer should be taken exactly when it beats V(t−1) — what you would get by refusing. With fewer periods left there is less to wait for, so V is smaller and the bar is lower. In the final period the bar is zero: there is nothing to carry on to, so any offer at all is taken.

3

The claim that the best rule is a threshold is a claim about SHAPE

The recursion assumes it by construction: it compares each offer against one number. But a rule could in principle accept an offer of 20 and refuse one of 30, and nothing in the recursion rules that out — it simply never considers it. So the lab enumerates every accept-set in every period, evaluates each resulting rule exactly, and then asks whether the winner has the property that accepting an offer implies accepting every larger one.

The material

Two lines of recursion, and a shape that is measured

The definition, the table it produces, and the enumeration that turns an assumption into a result.

Definition · The sell-or-wait problem

In each of T periods one offer arrives, drawn independently from a known distribution over values. You may accept it and stop, or refuse it and pay a search cost c to go on; a refused offer cannot be recalled. If you refuse the last one you get nothing.

Let V(t) be the expected value of the whole remaining search with t periods left, before the offer is seen. Then V(0) = 0 and V(t) = E[max(x, V(t−1))] − c. The optimal rule with t periods left is: accept x if and only if x > V(t−1).

The lab refuses a distribution whose probabilities do not sum to exactly 1, rather than renormalising it — the same discipline as the transition rows earlier on this course, and for the same reason. It also charges the search cost at every period including the last, so V(1) is the mean of the offers minus c rather than the mean.

offers 10, 20, 30 each with probability 1/3 c = 1 T = 3 V(0) = 0 V(1) = E[max(x, 0)] - 1 threshold 0 = (10 + 20 + 30)/3 - 1 = 20 - 1 = 19 take anything V(2) = E[max(x, 19)] - 1 threshold 19 = (19 + 20 + 30)/3 - 1 = 23 - 1 = 22 take 20 or 30 V(3) = E[max(x, 22)] - 1 threshold 22 = (22 + 22 + 30)/3 - 1 = 74/3 - 1 = 71/3 take 30 only so with three periods left the search is worth 71/3, about 23.67

Read the accept-sets down the table. With three periods left only 30 is taken; with two, 20 and 30; with one, everything. The rule tightens as you look further ahead and relaxes as the deadline approaches, which is the opposite of the way impatience usually feels and is exactly what the arithmetic says: what you are comparing an offer against is the value of the chances that remain, and there are fewer of them each period.

Proving the shape rather than assuming it

A rule, in full generality, is a choice of which offers to accept in each period. With three distinct offer values and three periods that is nine independent yes-or-no decisions, so 512 rules. The lab constructs all 512, evaluates each of them exactly by working backwards over the distribution — a computation that asks what this rule is worth rather than what carrying on is worth — and reports the best.

The best is worth 71/3, which is what the recursion said; its accept-sets are exactly the ones the thresholds describe; and it passes the shape test, which is that in every period, accepting an offer implies accepting every larger one. So on this instance the threshold form is not an assumption that happened to be convenient. It is a measured property of the winner of an exhaustive search.

Example · A rare high offer

Offers of 8, 14 and 40 with probabilities 3/5, 3/10 and 1/10, four periods, a search cost of 1. The thresholds come out 399/25, 72/5, 12 and 0, so with three or four periods left only the 40 is accepted — even though it arrives one time in ten.

The whole search is worth 4341/250, about 17.36, against a mean offer of 13. Almost all of that is the tenth that pays 40: with the same shape of problem but the 40 removed the search is worth a little over 10. Waiting is worth doing here because of a tail, which is a real feature of real searches and the reason an average is a poor summary of one.

Example · Searching expensively

Two offers, 10 and 30, equally likely, four periods, and a look now costs 5. The thresholds are 75/4, 35/2, 15 and 0, and the accept-set is the same in every period but the last: take the 30, refuse the 10.

Compare that with the same offers at a cost of 1, where the thresholds are 103/4, 47/2, 19 and 0. The expensive search is worth 155/8 and the cheap one 215/8. At the high cost a second look adds 5/2, a third 5/4 and a fourth only 5/8: the cost eats the option value, and the rule stops changing long before the deadline does.

What the model left out

Offers are independent draws from a distribution you already know, which rules out the most interesting thing about real search: that the offers you have seen tell you something about the ones to come. It also rules out recall, since a refused offer is gone; rules out the offer arriving late or not at all; and treats the search cost as the same in every period. The recursion will produce a threshold for any of those situations if you hand it this model, and the threshold will be exactly right for the wrong problem.

One more, less obvious. The objective maximises the expected value of what you end up with, so a rule that occasionally ends with nothing is penalised only by the size of that nothing. In the instance here the optimal rule refuses everything but 30 in the first period; if the deadline matters more than the money, the rule you want is not this one, and no amount of exact arithmetic on the expectation will say so.

Interactive

When to stop looking

The threshold is the value of carrying on, and its shape is measured rather than assumed

When to stop lookingthe threshold is what carrying on is worth, and it falls as the chances run out
the thresholdan offer this period would acceptthe best rule of any shapethe cost of one more look

Method

Computing a stopping rule

Four steps, and the last of them is the one that separates a rule you can defend from a rule you have assumed.

1

Start from the end: with nothing left, the search is worth nothing

V(0) = 0. Everything else is built on that, and it is where the recursion bottoms out — the same role the last stage played on a network.

2

For each further period, average the better of the offer and carrying on

E[max(x, V(t−1))], which means replacing every offer below V(t−1) by V(t−1) itself and then averaging. Doing it that way rather than by cases makes the threshold visible in the arithmetic instead of implied by it.

3

Subtract the search cost, and record the threshold

V(t) = E[max(x, V(t−1))] − c. The threshold with t periods left is V(t−1), not V(t): it is what you are giving up by accepting, not what the search is worth.

4

Read the accept-set in each period and check the direction

Offers strictly above the threshold are accepted. The thresholds should fall as the deadline nears; if they do not, either the search cost is large enough that the rule barely moves, or something in the setup is wrong.

5

Enumerate every accept-set if the instance is small enough to allow it

With S offer values and T periods there are 2^(S×T) rules, which is 512 at three and three. Evaluating all of them and checking that the winner is a threshold rule turns the shape from an assumption into a measurement, and it is affordable exactly at the size a page can show.

Thresholds, deadlines and the shape of a rule

Score 0 / 0

The recursion, and all 512 rules it never considered

Three offers, three periods, a search cost of 1. The recursion first, then the exhaustive search over every way of deciding which offers to accept when.

offers 10, 20, 30 each 1/3 c = 1 T = 3 THE RECURSION periods left threshold accept worth carrying on 1 0 10, 20, 30 19 2 19 20, 30 22 3 22 30 71/3 V(1) = (10 + 20 + 30)/3 - 1 = 19 V(2) = (19 + 20 + 30)/3 - 1 = 22 V(3) = (22 + 22 + 30)/3 - 1 = 71/3 EVERY RULE 3 offer values x 3 periods = 9 yes-or-no choices, 2^9 = 512 rules each evaluated backwards over the distribution, asking what THAT rule is worth rather than what carrying on is worth best of the 512 71/3 its accept-sets 3 left: 30 2 left: 20 30 1 left: 10 20 30 the threshold rule 3 left: 30 2 left: 20 30 1 left: 10 20 30 identical, set by set is the winner a threshold rule? yes in every period, accepting an offer implies accepting every larger one

The two accept-set rows being identical is a stronger statement than the two values being equal. A rule worth the same as the optimum would be enough to confirm the number; matching set by set says the recursion found the same rule and not merely an equally good one, which is what makes the shape test meaningful.

For a rehearsal, set the search cost to 0 and recompute by hand. The thresholds become 0, 20 and 70/3, the whole search is worth 230/9, and with two periods left only the 30 is now accepted — a free look makes the rule fussier, not less. Then put the cost up to 6: the thresholds drop to 0, 14 and 46/3, and the 20 becomes acceptable again with two and with three left. So the accept-set with two periods left changes between a cost of 0 and a cost of 1, and confirming that is the exercise.

The harder rehearsal: construct offers on which the best of all accept-sets is not a threshold rule. You will not manage it with independent draws and a constant cost — there is a proof that it cannot happen — and the useful part is working out which of those two conditions your attempted counterexample keeps breaking.

Common mistakes

1
Comparing the offer against the wrong period's valueAccepting ends the search and refusing leaves t−1 periods, so the comparison is with V(t−1). Using V(t) makes every threshold one period too high and produces a rule that refuses offers it should take, including in the final period — where the correct threshold is zero and the mistaken one is the mean minus the cost.
2
Expecting the threshold to rise as the deadline approachesImpatience suggests it should: you are running out of time, so surely you should get pickier. The arithmetic says the reverse, and the reason is that the threshold is not a measure of urgency but of what you are giving up. With one period left you are giving up nothing, so the bar is on the floor.
3
Treating the threshold form as something the recursion provedThe recursion assumed it: it is built out of one comparison per period and cannot express any other kind of rule. What proves it on this page is the enumeration of all 512 accept-sets, which contains the non-threshold rules and finds them worse. That distinction is the lesson, and it disappears the moment the instance is too large to enumerate — at which point the shape is again an assumption, and should be named as one.

Check your understanding

✓
Finish when you can compute the thresholds for a three-period search by hand, say which offers are accepted in each period, and explain what an enumeration of accept-sets adds.

You should be able to write V(t) = E[max(x, V(t−1))] − c, compute it period by period in exact fractions, identify the threshold as V(t−1) rather than V(t), explain why the thresholds fall as the deadline nears, and say precisely what the recursion assumes about the shape of a rule and how the page establishes it instead.

Note: Here the offers had values, and comparing one with a threshold was straightforward. The next lesson, “The Secretary Problem, Exactly”, removes the values: candidates arrive one at a time and all you ever learn is whether this one is the best so far. The rule that survives is a different shape — look at a fixed number and then take the next record — and its probability of success comes out of a harmonic sum rather than a recursion over values. It is also the one place on this course where a textbook reaches for an irrational number, and the page prints the exact table beside it.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.