+ All Categories
Home > Documents > On Learning the Optimal Waiting Time - CiteSeerX

On Learning the Optimal Waiting Time - CiteSeerX

Date post: 26-Feb-2023
Category:
Upload: khangminh22
View: 0 times
Download: 0 times
Share this document with a friend
15
On Learning the Optimal Waiting Time Tor Lattimore and Andr´ as Gy ¨ orgy and Csaba Szepesv ´ ari Department of Computing Science, University of Alberta, Canada [email protected],{gyorgy,szepesva}@ualberta.ca Abstract. Consider the problem of learning how long to wait for a bus before walking, experimenting each day and assuming that the bus arrival times are independent and identically distributed random variables with an unknown distribution. Similar uncertain optimal stopping problems arise when devising power-saving strategies, e.g., learning the optimal disk spin-down time for mobile computers, or speeding up certain types of satisficing search procedures by switching from a potentially fast search method that is unreliable, to one that is reliable, but slower. Formally, the problem can be described as a repeated game. In each round of the game an agent is waiting for an event to occur. If the event occurs while the agent is waiting, the agent suffers a loss that is the sum of the event’s “arrival time” and some fixed loss. If the agents decides to give up waiting before the event occurs, he suffers a loss that is the sum of the waiting time and some other fixed loss. It is assumed that the arrival times are independent random quantities with the same distribution, which is unknown, while the agent knows the loss associated with each outcome. Two versions of the game are considered. In the full information case the agent observes the arrival times regardless of its actions, while in the partial information case the arrival time is observed only if it does not exceed the waiting time. After some general structural observations about the problem, we present a number of algorithms for both cases that learn the optimal weighting time with nearly matching minimax upper and lower bounds on their regret. 1 Introduction Each day a student travels to school, either bybus or on foot, whichever is faster. The expected travel time for the bus is five minutes and is denoted by β while walking takes twenty minutes and is denoted by ω. Unfortunately, the bus is not always on time, so on each day t the student must decide how long they want to wait for the bus, Y t . The bus comes at random time X t and if X t Y t , then the student catches the bus. If X t >Y t , then they walk. The loss at time step t is the total travel time, which the student wants to keep as small as possible and is defined by t (Y t ) . = ( X t + β, if X t Y t ; Y t + ω, otherwise . We assume that β<ω and that the arrival times for the bus (X t ) t are identically and independently distributed accord- ing to some unknown distribution over the positive real line. We make no additional assumptions on the distribution of arrival times. 1 The expected loss of a fixed deterministic waiting time y 0 is (y)= E [1{X y} (X + β)+ 1{X>y} (y + ω)] , where X is identically distributed to X t . 2 An optimal waiting time is given by y * . = arg min y0 (y), which we will show to exist (y * may be infinite and the optimal waiting may not be unique, as we will demonstrate below). To guide the reader’s intuition, in Table 1 we tabulate the loss function, the optimal action, and the loss of the optimal action for two particular arrival time distributions. The examples show that the loss may be convex, or concave, it can be unbounded and the optimal action can also take on any value between 0 and infinity. These examples should not mislead the reader. Our methods do not need to know the form of the arrival time distributions, i.e., we consider the nonparametric setting. 1 Note that the game is trivial if β ω, since in this case the student should always walk regardless of the expected arrival time of the bus. 2 One can show that the expected loss is minimized by a fixed deterministic waiting time, i.e., there is no advantage to using a stopping rule. The simple reason is that when the bus arrives, due to our assumption that ω>β it is better to take the bus then to continue waiting and then eventually walk (since no more buses are coming).
Transcript

On Learning the Optimal Waiting Time

Tor Lattimore and Andras Gyorgy and Csaba Szepesvari

Department of Computing Science, University of Alberta, [email protected],gyorgy,[email protected]

Abstract. Consider the problem of learning how long to wait for a bus before walking, experimenting each day andassuming that the bus arrival times are independent and identically distributed random variables with an unknowndistribution. Similar uncertain optimal stopping problems arise when devising power-saving strategies, e.g., learningthe optimal disk spin-down time for mobile computers, or speeding up certain types of satisficing search proceduresby switching from a potentially fast search method that is unreliable, to one that is reliable, but slower. Formally, theproblem can be described as a repeated game. In each round of the game an agent is waiting for an event to occur. Ifthe event occurs while the agent is waiting, the agent suffers a loss that is the sum of the event’s “arrival time” andsome fixed loss. If the agents decides to give up waiting before the event occurs, he suffers a loss that is the sum ofthe waiting time and some other fixed loss. It is assumed that the arrival times are independent random quantitieswith the same distribution, which is unknown, while the agent knows the loss associated with each outcome. Twoversions of the game are considered. In the full information case the agent observes the arrival times regardless ofits actions, while in the partial information case the arrival time is observed only if it does not exceed the waitingtime. After some general structural observations about the problem, we present a number of algorithms for bothcases that learn the optimal weighting time with nearly matching minimax upper and lower bounds on their regret.

1 Introduction

Each day a student travels to school, either by bus or on foot, whichever is faster. The expected travel time for the busis five minutes and is denoted by β while walking takes twenty minutes and is denoted by ω. Unfortunately, the busis not always on time, so on each day t the student must decide how long they want to wait for the bus, Yt. The buscomes at random time Xt and if Xt ≤ Yt, then the student catches the bus. If Xt > Yt, then they walk. The loss attime step t is the total travel time, which the student wants to keep as small as possible and is defined by

`t(Yt).=

Xt + β, if Xt ≤ Yt ;

Yt + ω, otherwise .

We assume that β < ω and that the arrival times for the bus (Xt)t are identically and independently distributed accord-ing to some unknown distribution over the positive real line. We make no additional assumptions on the distributionof arrival times. 1 The expected loss of a fixed deterministic waiting time y ≥ 0 is

`(y) = E [1X ≤ y (X + β) + 1X > y (y + ω)] ,

where X is identically distributed to Xt.2 An optimal waiting time is given by y∗ .= arg miny≥0 `(y), which we will

show to exist (y∗ may be infinite and the optimal waiting may not be unique, as we will demonstrate below).To guide the reader’s intuition, in Table 1 we tabulate the loss function, the optimal action, and the loss of the

optimal action for two particular arrival time distributions. The examples show that the loss may be convex, or concave,it can be unbounded and the optimal action can also take on any value between 0 and infinity. These examples shouldnot mislead the reader. Our methods do not need to know the form of the arrival time distributions, i.e., we considerthe nonparametric setting.

1 Note that the game is trivial if β ≥ ω, since in this case the student should always walk regardless of the expected arrival time ofthe bus.

2 One can show that the expected loss is minimized by a fixed deterministic waiting time, i.e., there is no advantage to using astopping rule. The simple reason is that when the bus arrives, due to our assumption that ω > β it is better to take the bus thento continue waiting and then eventually walk (since no more buses are coming).

p(x) `(y) y∗ `(y∗)

Power 1x≥1x2

β + 1 + ω−βy

+ log y ω − β β + 2 + log(ω − β)

Exponential λe−λx β + 1λ

+ e−λy[(ω − β)− 1

λ

] 0, if ω − β < 1λ

;∞, otherwise

ω, if ω − β < 1λ

;β + 1

λ, otherwise

Table 1: Examples of losses and optimal waiting times for particular choices of arrival distributions. The first column gives the density of the arrival times.

Since the distribution of arrival times is unknown, the student cannot know when to stop waiting and must experi-ment to gain information. The regret at time step t is the difference between the actual travel time and the travel timeunder an optimal waiting time, rt

.= `t(Yt)− `t(y∗). Note that rt may be negative, but has non-negative expectation,

and that rt does not depend on the choice of y∗. The cumulative regret until time step n is

Rn.=

n∑t=1

(`t(Yt)− `t(y∗)

).

In the long run the student hopes to choose Yt in such a way as to learn the optimal waiting time, in which caselimn→∞ E[Rn]/n = 0.

Two observation models will be considered. The first is a full information setting where Xt is always observed.This assumption is unnatural for the problem of waiting for a bus because the student would not usually observe thearrival time of the bus if they decided to walk. There are, however, waiting problems for which the full informationsetting is appropriate. An example is maximising hard-disk efficiency in mobile computing, previously consideredby Krishnan, Long, and Vitter [12] where a hard-disk controller must decide after each interaction how long to waitbefore spinning down the disk to conserve energy. This is modelled by choosing β = 0 and ω to be some value thatreflects the cost (in terms of time/energy/annoyance) of spinning up the disk. The goal of the controller is to minimisethe sum of energy consumption and spin-up costs.

The second setting, called the partial information setting, is trickier, but often more natural, e.g., for the bus-stopproblem, when the student in general will not observeXt unlessXt ≤ Yt. More precisely, the student observes the pair(Zt, δt) where Zt = min Xt, Yt and δt = 1Xt ≤ Yt. So δt is 1 if the student travelled by bus and 0 otherwise,while Zt is the time at which the travel starts. Another application of the partial information setting is the problemof combining algorithms to solve a number of instances of a satisficing search problems.3 We assume that the agenthas access to two algorithms for a given type of search problem. The first is potentially fast, but unreliable, while thesecond is typically slower, but has known guarantees on its performance. For each problem instance, the agent tries touse the potentially fast solver, switching to the more consistent algorithm if the first fails to deliver a solution within acertain amount of time. The task of the agent is to learn when to switch between solvers. Formally, the unreliable solverprovides a solution to instance t at random time Xt, and the completion time of the slower method is deterministicallyω for all instances. As for the hard-disk problem, β = 0. Comparisons between stochastic satisficing search algorithmshave been made before (eg., [15] and references there-in), but to our knowledge the sequential setting combined withthe regret criterion are new.

Estimating the common distribution of Xt (or other quantities depending on this distribution) in the partial infor-mation (or “censored”) setting is heavily studied in the statistics literature [e.g. 6], but the focus tends to be on thenatural medical applications where the censoring times are uncontrolled and independent of the arrival times. We knowof no previous work on the decision problem studied here. Optimising the regret is more complex when only partialinformation is available because in this case the actions influence the observations.

The censored information problem is an instance of stochastic partial monitoring, first studied by Agrawal, Teneket-zis, and Anantharam [1]. In recent years there has been significant progress towards understanding partial monitoringwith finitely many actions, both in the stochastic and adversarial settings [4, 9, 3], but the case where the number ofactions is infinite/continuous the work has been more limited and specialised [11].

Summary of Results. The full information setting is analysed in Section 3 where we present two algorithms. The firstis based on discretising the action space and applying the exponential weighting algorithm (EWA), while the second isan instance of the Follow-the-Leader (FTL) algorithm. We prove that EWA suffers a regret of at mostO(log3/2(n)

√n)

3 A search problem is satisficing if the searcher can stop once a satisfactory solution has been found, with SAT being a prototypicalexample.

2

while for FTL we were able to shave off a small amount and bound the regret by O(log(n)√n). We also establish a

lower bound of Ω(√n).

For the partial information case we also consider two algorithms (Section 4). The first is again based on a vari-ant of the exponential weights algorithm, which cleverly controls the exploration of actions to deal with the partialinformation setting [2]. We establish that this algorithm enjoys a regret of O(log2(n)

√n). Next we propose a novel

optimistic algorithm that conservatively waits for the longest time that it cannot prove to be sub-optimal with highprobability. We prove that this algorithm enjoys a regret of O(log3/2(n)

√n). Thus, for both algorithms, the cost of

partial information is surprisingly small and of order O(log1/2(n)).The theoretical findings are complemented by computer simulations in a variety of controlled scenarios (Section 5).

Results are presented for the full information setting only (similar results were observed in the partial informationsetting). The most interesting finding here is that for the exponential distribution, both algorithms perform better thanis predicted by theory, with at least FTL achieving O(log n) regret. The EWA algorithm behaves comparably to FTL,but only when the learning rate is tuned to be much larger than is theoretically justified.

Notation. At time step t define the empirical probability measure by Pt A.= 1

t

∑ts=1 1Xs ∈ A where A is

any Borel-measurable subset of the real line. The cumulative distribution of the samples X1, . . . , Xt is Ft(x) =Pt (−∞, x]. Expectations with respect to the empirical distribution Pt · are denoted by Et·. Further, by slightlyabusing the notation for any measurable function f : R→ R, we define Et[f(X)] =

∫f(x)dPt(x) and for any Borel

measurable subset A of the real line, Pt X ∈ A = Et[1X ∈ A].

2 Structure of the Waiting Problem

Before the main theorems we present a crucial lemma that characterises the cumulative distribution of the arrival timesin terms of the optimal action y∗. The result shows that the tail of X decays exponentially for times before y∗. Asa consequence, if the optimal waiting time is large then the loss of choosing y much smaller than optimal cannot betoo large. This latter fact should not be surprising. If it is optimal to wait for the bus for a very long time, then theremust be a reasonable probability that it will arrive soon. This means that the bus is still likely to arrive if you wait fora shorter time. The critical case occurs when arrival times are exponentially distributed. As a result, it is not hard tosee that to achieve a polynomially decreasing regret in n time steps, it is enough to consider waiting times below someO(log n) threshold.

Lemma 1. Let 0 < y ≤ y such that infy∈[0,y] `(y) ≥ `(y). Then, the following hold true for any y ∈ [0, y]:

1. P X > y ≤ 2−by

2(ω−β)c.2. `(y)− `(y) ≤ (ω − β)2−b

y2(ω−β)c.

In particular, if y∗ ∈ [0,∞] is optimal, then the above holds with y = y = y∗.

The proof of the lemma utilizes the following bounds on loss differences, which will also be useful later andfollows trivially from the definitions. The proof may be found in the appendix.

Lemma 2. Let y2 ≥ y1, then1. `(y2)− `(y1) = E[1y1 < X ≤ y2 (X − y1 + β − ω) + 1X > y2 (y2 − y1)].2. `(y2)− `(y1) ≥ (y2 − y1)(1− F (y2))− (ω − β)(F (y2)− F (y1)).3. `(y2)− `(y1) ≤ (y2 − y1)(1− F (y1))− (ω − β)(F (y2)− F (y1)).

Proof (Lemma 1). Let c ≥ 0 be some constant to be chosen later and 0 ≤ y ≤ y − c. Then we have

0(a)

≤ `(y)− `(y)(b)= E[(y + ω − β −X)1y < X ≤ y+ (y − y)1X > y]

(c)

≤ E[(y + ω − β −X)1y < X ≤ y + c+ (ω − β − c)1X > y + c](d)

≤ (ω − β)E[1y < X ≤ y + c+ (ω − β − c)1X > y + c](e)= (ω − β)P y < X ≤ y + c+ (ω − β − c)P X > y + c (1)

3

(f)

≤ (ω − β)P y < X , (2)

where (a) follows since `(y) ≤ `(y) by assumption, (b) follows from Part 1 of Lemma 2, (c) follows by breaking1y + c < X ≤ y off from both indicators and since y ≤ y−c ≤ y−c, while (d) is true by noting that y+ω−β−X ≤ω − β for y ≤ X . (e) and (f) are trivial. Choosing c = 2(ω − β) > 0, (1) implies

P y < X ≤ y + 2(ω − β) ≥ P X > y + 2(ω − β) .

Therefore, for any y ≥ 0 such that y + 2(ω − β) ≤ y,

P X ≤ y + 2(ω − β)|X > y ≥ 1

2(3)

and if 2k(ω − β) ≤ y, then

P X > 2k(ω − β) (a)=

k∏i=1

P X > 2i(ω − β)|X > 2(i− 1)(ω − β)

(b)=

k∏i=1

(1− P X ≤ 2i(ω − β)|X > 2(i− 1)(ω − β))(c)

≤ 2−k , (4)

where (a) follows from the chain rule for probability, (b) is just P A|B = 1− P Ac|B for events A and B and (c)follows by substituting (3), which is permitted thanks to 2k(ω − β) ≤ y. The above inequality immediately impliesPart 1 (for y ≤ y < 2k(ω − β) the result holds trivially) and, combined with (2) for c = 0, it also yields Part 2. ut

That an optimal waiting time is guaranteed to exist follows from Lemma 1 by a tedious case-based analysis. Seethe appendix for the proof.

Theorem 1. For any arrival time distribution there exists a y∗ ∈ [0,∞] such that `(y∗) = infy∈[0,∞] `(y).

Part 2 of Lemma 1 also shows that to guarantee an ε-optimal action, it suffices to consider the waiting times in aninterval of length O(log(1/ε)) starting at zero:

Corollary 1. Let ε > 0 and y(ε).= 2(ω − β) max

1 + log2(ω−βε ), 0

. Then infy∈[0,y(ε)] `(y)− `(y∗) < ε.

Proof. The result follows by a straightforward calculation from Part 2 of Lemma 1.

3 Full Information Setting

We consider the case when Xt is always observed in round t. Our first algorithm discretises the set of actions andthen applies the exponential weighting algorithm [e.g., 5]. The key observation is that by Corollary 1, to guaranteean ε-optimal action, it suffices to play in the interval of length O(log(1/ε)). Since the exponential weights algorithmassumes a finite action set, we need to discretise the action space. The following elementary observation, which followsdirectly from Part 1 of Lemma 2 shows that to achieve an ε-error, it suffices to discretise the interval with an accuracyof ε.

Proposition 1. For any y2 ≥ y1 ≥ 0, `(y2)− `(y1) ≤ y2 − y1.

The exponential weights algorithm enjoys a regret smaller than R√n log(K)/2, where n is the number of rounds, K

is the number of actions, and R is the range of losses [5, §4.2, Thm 2.2]. So we see that this method suffers a regret ofat leastO(

√n). This suggests choosing ε = (ω−β)/

√n and using the action setA = kε : 0 ≤ k ≤ y(ε)/ε, k ∈ N,

leading to Algorithm 1, where for tuning the learning rate η we use that the range of the loss function is m+ ω whenthe largest waiting time is m = maxA. The running time of the algorithm is O(|A|) per time step, which in this caseis O(

√n log(n)).

4

Algorithm 1 EWA for Optimal Waiting1: Input: ω, β, and n2: ε← (ω − β)/

√n, A← kε : 0 ≤ k ≤ y(ε)/ε, k ∈ N, R← y(ε) + ω, η ←

√8 log(|A|)/n/R

3: w1(y)← 1 for all y ∈ A4: for t = 1, . . . , n do5: Wt ←

∑y∈A wt(y) and pt(y)← wt(y)/Wt for each y

6: Sample waiting time Yt from distribution pt on A and observe Xt7: for y ∈ A do // Update the weights

`t(y)← 1Xt ≤ y (Xt + β) + 1Xt > y (y + ω)

wt+1(y)← wt(y) exp(−η`t(y))

8: end for9: end for

Theorem 2 (EWA Regret). Let n > 0 and Rn be the regret of Algorithm 1 when used for n rounds. Then E [Rn] ∈O((ω − β) log3/2(n)

√n).

Proof. Let ε, A and R be as in the pseudo-code of the algorithm. As noted beforehand, the expected regret4 of EWAagainst the best action in A is R

√n/2 logK, where K = |A| ≤ dy(ε)/εe = dy((ω − β)/

√n)√n/(ω − β)e.

By Proposition 1, miny∈A `(y) − infy∈[0,y(ε)] `(y) ≤ ε and by Corollary 1, infy∈[0,y(ε)] `(y) − `(y∗) ≤ ε. Hence,E [Rn] ≤ R

√n/2 log(y((ω − β)/

√n)√n/(ω − β) + 1) + 2(ω−β)

√n ∈ O((ω−β) log3/2(n)

√n), where we used

R = y((ω − β)/√n) + ω and that y((ω − β)/

√n) ∈ O((ω − β) log(n)).

Under the full information stochastic setting the FTL algorithm, which at each round chooses the waiting time thatminimises the empirical loss so far, is also expected to do well. The next theorem shows that FTL does indeed improveslightly on EWA.

Theorem 3 (FTL Regret). Let Yt be defined by Y1.= 0 and, for all t ≥ 2,

Yt ∈ arg miny

t−1∑s=1

(1Xs ≤ y (Xs + β) + 1Xs > y (y + ω)) .

Then, E[Rn] ≤ (ω − β)(11.6√n log n− 11

√n+ log n+ 12).

Remark 4 It is easy to see that for any t ≥ 1, Yt = Xs for some 1 ≤ s ≤ t − 1, hence Yt can be computed in O(t)time. Note that Yt is not unique.

Proof. The empirical loss of wait-time y at time step t is

ˆt(y)

.=

1

t

t∑s=1

(1Xs ≤ y (Xs + β) + 1Xs > y (y + ω)) .

The expected regret at time step t may be decomposed. Let (st)t be a sequence of constants to be chosen later. Then,

E [rt|Yt] = `(Yt)− `(y∗) = `(Yt)− `(st) + `(st)− `(y∗)

= `(Yt)− ˆt−1(Yt) + ˆ

t−1(Yt)− `(st) + ˆt−1(st)− ˆ

t−1(st) + `(st)− `(y∗)(a)

≤∣∣∣`(Yt)− ˆ

t−1(Yt)∣∣∣+∣∣∣`(st)− ˆ

t−1(st)∣∣∣+ `(st)− `(y∗) ,

4 Bounds for adversarial algorithms like EWA are typically proven for the regret without the expectation, but in the stochastic casethis distinction is not important with bounds on the expected regret following from a straight-forward application of standardconcentration inequalities.

5

where in (a) we used the fact that ˆt−1(Yt) ≤ ˆ

t−1(st). Now,

|`(y)− ˆt(y)| (a)

= |(E− Et)[1X ≤ y (X + β) + 1X > y (ω + y)]|(b)= |(E− Et)[1X ≤ y (X − y) + 1X > y (ω − β)]|(c)

≤ y |F (y)− Ft(y)|+ (ω − β) |F (y)− Ft(y)| ,

where (a) is simply the definition of the losses and (E−Et), (b) by rearranging and using the fact that (E−Et)α = 0for any constant α, (c) by |X − y| ≤ y which holds for 0 ≤ X ≤ y and the definition of the cumulative distribution.Combined with [7, Thm. 3.3], which states that E[supx |Ft(x)− F (x)|] ≤ 1/

√t, the last inequality gives

E[supy≤s

∣∣∣`(y)− ˆt(y)

∣∣∣] ≤ s+ ω − β√t

. (5)

Next we show that Yt+1 ∈ O(log t) for any t ≥ 1. Since Yt+1 is the optimal waiting time for the empirical distributionof the arrival times, we can apply Part 1 of Lemma 1 to obtain

Pt X ≥ Yt+1 = infε>0

Pt X > Yt+1 − ε ≤ infε>0

2−⌊Yt+1−ε2(ω−β)

≤ infε>0

21−Yt+1−ε2(ω−β) = 21− Yt+1

2(ω−β) .

Therefore, if Yt+1 > mt+1.= 2(ω−β)(1+log2 t), then Pt X ≥ Yt+1 < 1/t. On the other hand, Pt X ≥ Yt+1 ≥

1/t since Yt+1 ∈ X1, . . . , Xt. Thus, Yt+1 ≤ mt+1. Choose st = min y∗,mt. Then, by (5),

E [rt+1] ≤ E[∣∣∣`(Yt+1)− ˆ

t(Yt+1)∣∣∣+∣∣∣`(st+1)− ˆ

t(st+1)∣∣∣]+ `(st+1)− `(y∗)

≤ E

[sup

y≤mt+1

∣∣∣`(y)− ˆt(y)

∣∣∣+∣∣∣`(st+1)− ˆ

t(st+1)∣∣∣]+ `(st+1)− `(y∗)

≤ (mt+1 + st+1 + 2(ω − β))1√t

+ `(st+1)− `(y∗)

≤ (mt+1 + st+1 + 2(ω − β))1√t

+ω − βt

,

where in the last step we used Part 2 of Lemma 1 to bound `(st+1)− `(y∗). Summing over t ultimately leads to

E [Rn] = E [r1] +

n∑t=2

E [rt]

≤ (ω − β)

(1 +

n−1∑t=1

[6 + 4 log t

log 2√t

+1

t

])

≤ (ω − β)

(1 +

∫ n

1

4 log t

log 2√tdt+

∫ n

1

6/√tdt+

∫ n

1

1

tdt

)≤ (ω − β)

(1 +

8√n(log n− 2) + 16

log 2+ 12√n− 12 + log n

)≤ (ω − β)(11.6

√n log n− 11

√n+ log n+ 12) .

as required. ut

If the arrival time Xt is exponentially distributed, then the regret of the FTL algorithm may be shown to be at mostpoly-logarithmic. Experimental results suggest that the true regret is actually logarithmic in n, but so far the proofeludes us.

6

Theorem 5. Assume that Xt is exponentially distributed with parameter λ such that 1/λ < ω − β. Then, for thealgorithm of Theorem 3, we have E [Rn] ∈ O(log2 n).

Proof. By the computations given in Table 1 and the assumption that 1/λ < ω− β, we have that the optimal action isto wait indefinitely (y∗ =∞) and the instantaneous expected regret of waiting for time y is

e−λy(ω − β − 1/λ). (6)

Fix t ≥ 1. As we have already mentioned in Remark 4, the waiting time chosen by FTL satisfies Yt+1 ∈ X1, . . . , Xt.Let X(t,1), X(t,2), . . . , X(t,t) denote the order statistics of X1, . . . , Xt. It is known that the order statistics can beexpressed as X(t,k) =

∑tj=t−k+1 Vj/j, where Vj are independent exponentially distributed random variables with

parameter λ.5 Recall the notation ˆt for the empirical loss from the proof of Theorem 3. We are going to show that

with high probability ˆt(X(t,t)) ≤ ˆ

t(X(t,t−k)) for all k large enough. Note that

ˆt(X(t,k)) =

1

t

k∑i=1

(X(t,i) + β) +1

t

t∑i=k+1

(X(t,k) + ω).

Therefore, for any 1 ≤ k < t,

t( ˆt(X(t,t))− ˆ

t(X(t,t−k))) =

t∑i=t−k+1

(X(t,i) −X(t,t−k) − (ω − β))

=

t∑i=t−k+1

t∑j=t−i+1

Vj/j −t∑

j=k+1

Vj/j − (ω − β)

=

t∑i=t−k+1

k∑j=t−j+1

Vj/j − (ω − β)

=

k∑j=1

t∑i=t−j+1

Vj/j − (ω − β)

=

k∑j=1

Vj − k(ω − β) .

Now∑kj=1 Vj has an Erlang(k, λ) distribution, which is exactly the distribution of time required to have k arrivals

in a Poisson process with intensity λ. Let N(τ, λ) denote the number of arrivals in such a process in time τ . ThenN(τ, λ) ∼ Poisson(τλ). Therefore,

P

ˆt(X(t,t)) > ˆ

t(X(t,t−k))

= P

k∑j=1

Vj > k(ω − β)

= P N(k(ω − β), λ) < k <(eλ(ω − β)

eλ(ω−β)

)k.= αk ,

where we used the well-known bound P N(τ, λ) ≤ k ≤ e−λτ (eλτ)k/kk for k < τλ (note that λk(ω − β) > k byour assumptions on λ). Since λ(ω − β) 6= 1, α < 1 by log x < x− 1 for x 6= 1. Therefore, by the union bound,

P

ˆt(X(t,t)) > ˆ

t(X(t,t−i)) for some i ≤ t− k≤

t∑i=k

αi ≤ αk

1− α,

5 To see this, recall that the minimum X(t,1) is an exponential random variable with parameter λt, X(t,2) is X(t,1) plus theminimum of t− 1 exponentials, and so on.

7

and so for any 1 ≤ k < t we have,Yt+1 ≥ X(t,t−k) (7)

with probability at least 1 − αk/(1 − α). To bound the regret of selecting Yt+1 at time t + 1, we are going to boundX(t,t−k) from below. Using that E

[V qj]

= q!/λq for any non-negative integer q, we get, for any 0 ≤ k ≤ t− 1,

E[X(t,t−k)

]= E

t∑j=k+1

Vj/j

≥ 1

λ

∫ t+1

k+1

1

jdj =

1

λlog

t+ 1

k + 1. (8)

Furthermore, for 1 ≤ k ≤ t− 1,

t∑j=k+1

E[(Vj/j)

2]

=2

λ2

t∑j=k+1

1

j2<

2

λ2

∫ t

k

1

j2dj ≤ 2

λ2k

.= vk

and similarly for any q ≥ 3,

t∑j=k+1

E [(Vj/j)q] <

q!

λq

∫ t

k

1

jqdj ≤ q!

λq(q − 1)kq−1≤ vk · q!

2· 1

(λk)q−2.

Thus, by [16, Thm. 2.10] we obtain that for any δ > 0 and any 1 ≤ k ≤ t− 1,

PE[X(t,t−k)

]−X(t,t−k) >

√vk log(1/δ) +

log(1/δ)

λk

≤ δ .

Combining with (7) and (8) we get that, with probability at least 1− αk

1−α − δ,

Yt+1 ≥1

λlog

t+ 1

k + 1− 1

λ

√2 log(1/δ)

k− log(1/δ)

λk

for 1 ≤ k ≤ t− 1. Thus, by (6), the expected regret for time step t+ 1 is bounded by

(ω − β − 1/λ)

(αk

1− α+ δ + e− log t+1

k+1 +

√2 log(1/δ)

k +log(1/δ)

k

).

Since αk/(1− α) ≤ 1/t if

k ≥ log t− log(1− α)

log(1/α).

Selecting γ large enough such that

γ log t ≥ log t− log(1− α)

log(1/α)

(e.g., γ ≥ (1+log 11−α )/ log 1

α ) and δ = 1/t, we obtain that the instantaneous expected regret at time t+1 is boundedby

(ω − β − 1/λ)

(2/t+

γ log t+ 1

t+ 1e√

2/γ+1/γ

).

Applying the bound of Theorem 3 for the first γ log n+ 1 steps, we get

ERn ≤ (ω − β)√γ log n+ 1 log(γ log n+ 1) +

t∑t=γ logn+2

(ω − β − 1/λ)

(2/t+

γ log t+ 1

t+ 1e√

2/γ+1/γ

)∈ O(log2 n) ,

which completes the proof. ut

8

3.1 Lower Bound

The general upper bounds given in the previous section cannot be greatly improved in the worst-case. Note that thefollowing theorem is proven for the easier full information setting, so translates immediately to give an identical lowerbound in the partial information setting.

Theorem 6. There exists a universal constant c > 0 such that for each algorithm and fixed n there exists a distributionsuch that ERn ≥ c(ω − β)

√n.

Proof. For p ∈ [0, 1] let Pp be a measure defined such that Pp(X = 1/2) = p and Pp(X =∞) = 1−p. Let us denotethe expected loss under measure Pp by `p. A simple calculation shows that

`p(y) =

y + ω, if y < 1

2 ;

p( 12 + β) + (1− p)(y + ω), otherwise.

Thus, `p is piecewise linear, with two increasing segments. The two local minima of `p are at 0 and 1/2 with values`p(0) = ω and `p(1/2) = 1/2 + ω − p(ω − β). For simplicity, we set ω = 1, β = 0, the full result can be obtainedby scaling. Thus, `p(0) = 1, `p(1/2) = 3/2 − p and the optimal waiting time y∗p is 0 for p < 1/2 and 1/2 forp > 1/2. If p = 1/2, then 0 and 1 are both optimal. It is also clear that for the “rounding function” ρ defined byρ(y) = 1

21y ≥ 1/2, then for any y ≥ 0 it holds that `p(ρ(y)) ≤ `p(y): By “rounding down” the waiting time yto either 0 or 1/2, one can only win in terms of the expected loss. Based on Pp, we construct three environments andwill use a fairly standard technique based on the relative entropy that shows that the regret will be large in at leastin one of the environments. The three environments are given by the measures P1/2, P1/2+ε and P1/2−ε for someε ∈ [0, 1/2) to be chosen later. Note that |`1/2+σε(0) − `1/2+σε(1/2)| = σε. Fix n > 0. Now, take any algorithmA and let Yt be the choice made by A in round 1 ≤ t ≤ n. Let Rσ be the expected regret of A during the firstn rounds when used on the measure P1/2+σε, σ ∈ −1, 0,+1. Denoting by Eσ the expectation under P1/2+σε,we thus have Rσ = Eσ[

∑nt=1 `1/2+σε(Yt) − `1/2+σε(y

∗1/2+σε)]. Let Yt = ρ(Yt) be the “rounded” decision and let

N(y) =∑nt=1 1

Yt = y

, y ∈ 0, 1/2. Then,

Rσ ≥ Eσ

[n∑t=1

`1/2+σε(Yt)− `1/2+σε(y∗1/2+σε)

]

and thus

R1 ≥ εE1[N(0)], R−1 ≥ εE−1[N(1/2)] . (9)

Now, a standard argument shows that

E0[N(0)]− E1[N(0)] ≤ n√n

2D(P0||P1) ≤ 2nε

√n

2,

E0[N(1/2)]− E−1[N(1/2)] ≤ n√n

2D(P0||P−1) ≤ 2nε

√n

2,

whereD(P0||P−1) denotes the relative entropy between P0 and P−1. Summing up these two inequalities and using (9),n − (R1/ε+R−1/ε) ≤ 4nε

√n/2. Setting ε = c/

√n and reordering gives

√nc(1 − 2

√2c) ≤ R1 + R−1. Choose

c = 1/(4√

2) and note that 2 max(R1, R−1) ≥ R1 +R−1 to finish the proof. ut

4 Partial Information

We now consider the more challenging case where Xt is not observed if Yt < Xt and so the waiting time directlyinfluences the amount of information gained at each time step. Just like in the previous section, our first algorithm

9

is based on a discretisation idea. As before, we first notice that it is enough to consider stopping times in an intervalof length O((ω − β) log(n)) and also that a discretisation accuracy of ε = (ω − β)/

√n will suffice to get a O(

√n)

regret, which is conjectured to hold. In this case, however, an appropriately modified version of the exponential weightsalgorithm is needed which works with estimated losses and adds exploration to facilitate the estimation of losses. Infact, as it turns out, after discretisation, our problem falls into the framework of prediction with expert advice withside-observations, where after the learner chooses an action Yt ∈ A it observes the losses for a subset S(Yt) ⊂ A ofactions. In our case, S(Yt) = y ∈ A : y ≤ Yt, which means that waiting for a longer time leads to more informationthan waiting for a shorter time. This framework was first studied by Mannor and Shamir [13]. Here, we will use theExp3-DOM algorithm of Alon et al. as this algorithm improves upon the results of Mannor and Shamir for our setting[2]. The general idea of Exp3-DOM is to restrict exploration to actions in a dominating set D, which is a subset ofactions such that ∪a∈DS(a) = A. In particular, exploration is restricted to a minimal dominating set. In our case, theminimal dominating set contains a single element, ymax = maxA. This results in Algorithm 2. If the learning rate η ischosen carefully, then Theorem 7 of [2] shows that the algorithm suffers a O(

√n) regret. Recall the definition of y(ε)

Algorithm 2 Exp3-Dom1: Input: ω, β, and n2: // Recall definition of y(ε) given in Corollary 13: ε← (ω − β)/

√n, A← kε : 0 ≤ k ≤ y(ε)/ε, k ∈ N, R← y(ε) + ω, η ← 1/(R

√n)

4: w1(y)← 1 for all y ∈ A5: for t = 1, . . . , n do6: Wt ←

∑y∈A wt(y) and pt(y)← ηwt(y)/Wt + (1− η)1y = maxA for each y

7: Sample waiting time Yt from distribution pt on A and observe Zt, δt8: wt+1(y)← wt(y) for all y ∈ A9: for y ∈ A ∩ [0, Yt] do // Update the weights

`t(y)← 1Zt ≤ y (Zt + β) + 1Zt > y (y + ω)

qt(y)←∑

y′∈A:y′≥y

pt(y′) and ˜

t(y)← `t(y)/qt(y)

wt+1(y)← wt(y) exp(−η ˜t(y))

10: end for11: end for

Theorem 7. Pick n > 0 and let Rn be the regret of Algorithm 1 when used for n rounds. Then, E [Rn] ∈ O((ω −β) log2(n)

√n).

Proof. Let ε,A andR be as in the pseudo-code of the algorithm. Using that in our case the the observation sets S(a) arefixed, Theorem 7, Eq. (2) of [2] gives that the regret of Exp3-DOM against the best waiting time inA isO(K log(K)+log(K)(1/η + ηR2

∑nt=1(1 + Qt))), where K = |A| is the number of actions and Qt =

∑y∈A pt(y)/qt(y) and

where we used that the dominant set in our case has a single element. Now, Lemma 13 of [2] gives that Qt =α ln(K/η), where α is the so-called independence number of the graph (A,E) underlying the observation system:(a1, a2) ∈ E if a1 ∈ S(a2) or a2 ∈ S(a1). In our case, the graph is a clique and hence its independence numberis α = 1. Choosing η = 1/(R

√n) thus gives that the regret of Exp3-DOM against the best waiting time in A

is O(R log(K)√n + K log(K)). By Proposition 1, miny∈A `(y) − infy∈[0,y(ε)] `(y) ≤ ε, while by Corollary 1,

infy∈[0,y(ε)] `(y)−`(y∗) ≤ ε. Hence, E [Rn] ∈ O(R log(K)√n+K log(K)+(ω−β)

√n). Now, using the definition

of y, y((ω − β)/√n) ∈ O((ω − β) log(n)). Thus, K = |A| ∈ O(dy(ε)/εe) = O(y((ω − β)/

√n)√n/(ω − β)) =

O(log(n)√n) and R = y((ω − β)/

√n) + ω ∈ O((ω − β) log(n)). Plugging these into the previous bound, we get

E [Rn] ∈ O((ω − β) log2(n)√n).

Note that since the partial information setting is strictly more difficult than the full information setting, our previouslower bound shows that the regret cannot be better than Ω(

√n). However, as in the full information setting, we

can expect to improve upon the performance of Exp3-DOM by using an algorithm that exploits the fact that theenvironment is stochastic. In particular, as is common in sequential learning algorithms we make use of an optimistic

10

strategy, which will wait for the bus as long as reasonably possible. The algorithm maintains an estimate of thecumulative distribution and chooses a non-increasing sequence of waiting times starting from a carefully chosen upperbound. The waiting times decrease at a data-dependent rate that is chosen to ensure some nearly-optimal waiting timeis always smaller than the action chosen. This results in Algorithm 3.

Algorithm 3 Optimistic Waiting1: Input: ω, β, and n2: α← 3/2 and ymax ← 2(ω − β)(1 + log2

√n) and Y1 ← ymax

3: for t = 1, . . . , n do4: Observe Zt, δt

5: Compute the empirical distribution: Gt(y).=

1

t

t∑s=1

1Zs ≤ y

6: Compute waiting time for next day:

εt ←√

log 2nα

2t

Yt+1 ← max

0 ≤ y ≤ Yt : Gt(y)−Gt(y′) + 2εt ≥

y − y′

ω − β (1−Gt(y)− εt)−1√n, 0 ≤ y′ ≤ y

7: end for

The following theorem bounds the expected regret of Algorithm 3. The bound is worse by a factor of O(√

log n)than that obtained in the full information setting described in Section 3, but improves the bound announced in Theo-rem 7.

Theorem 8. The regret is bounded by E [Rn] ≤ (ω − β)(42 + 7 log3/2(n)√n).

Lemma 3. Define y = min y∗, ymax, where ymax is given in Algorithm 3. Then `(y)− `(y∗) ≤ (ω − β)/√n.

Proof. Apply Part 2 of Lemma 1 and the definition of y. ut

The following lemma shows that Yt ≥ y for all 1 ≤ t ≤ n with high probability. This means that if y∗ ≥ ymax,then with high probability the algorithm will always choose Yt = ymax and suffer no more than (ω − β)/

√n regret

per time step. On the other hand, if y∗ < ymax, then the algorithm will choose Yt ≥ y∗, which guarantees that it iscontinually learning information about the loss of the optimal action.

Lemma 4. For 1 ≤ t ≤ n, we have that P Acn ≤ n1−α, where event At is defined by

At =⋂s≤t

Ys ≥ y and supy≤Ys−1

|Gs−1(y)− F (y)| ≤ εt−1

.

Proof. Define eventB =⋃t≤n

supx≤Yt−1

|Gt−1(x)− F (x)| ≥ εt−1

and recall thatFt(x) = 1

t

∑ts=1 1Xs ≤ x,

which is unknown to the learner. The Dvoretzky–Kiefer–Wolfowitz–Massart theorem [8, 14] gives that

P

supx|Ft(x)− F (x)| ≥ εt

≤ 2 exp

(−2ε2

t t)

= n−α.

Therefore, by the union bound, with probability at least 1 − n1−α it holds that |Ft(x) − F (x)| ≤ εt for all t ≤ nand x ∈ R. By the definition of the observations (Zs)s, Gt(y) = Ft(y) for all y ≤ min1≤s≤t Ys. Further, since byconstruction (Yt)t is non-increasing, min1≤s≤t Ys = Yt and so Gt(y) = Ft(y) for all y ≤ Yt. Therefore P B ≤n1−α. We now show that if B does not occur then At holds for 1 ≤ t ≤ n. We prove this by induction on t. That Bc

implies A1 is trivial. Now, assume that Bc implies that At holds for some 1 ≤ t < n. On Bc we have

supy≤Yt

|Gt(y)− F (y)| ≤ εt. (10)

11

Thus, it suffices to show that on Bc, Yt+1 ≥ y also holds. By the induction hypothesis, Yt ≥ y. Combining this with(10) we get

supy≤y|Gt(y)− F (y)| ≤ εt. (11)

Now let y′ ≤ y ≤ y∗. Then

0(a)

≥ `t(y∗)− `t(y′)

(b)

≥ `t(y)− `t(y′)−ω − β√

n

(c)

≥ (y − y′)(1− F (y))− (ω − β)(F (y)− F (y′))− ω − β√n

(d)

≥ (y − y′)(1−Gt(y)− εt)− (ω − β)(Gt(y)−Gt(y′) + 2εt)−ω − β√

n,

where (a) follows since y∗ is the optimal waiting time, (b) by Lemma 3, (c) by Part 2 of Lemma 2, and (d) holds by(11). Rearranging we obtain

Gt(y)−Gt(y′) + 2εt ≥y − y′

ω − β(1−Gt(y)− εt)−

1√n,

which implies, by the definition of Yt+1, that Yt+1 ≥ y. Therefore At+1 holds and so Bc implies that An holds.Therefore P An ≥ P Bc ≥ 1− n1−α. ut

Proof (of Theorem 8). The proof follows almost immediately from Lemmas 2 to 4. Assume that An holds. Then

`(Yt)− `(y∗)(a)

≤ `(Yt)− `(y) +ω − β√

n

(b)

≤ (Yt − y)(1− F (y))− (ω − β)(F (Yt)− F (y))

(c)

≤ (Yt − y) (1−Gt−1(y) + εt−1)− (ω − β) (Gt−1(Yt)−Gt−1(y)− 2εt−1)

(d)

≤ 2εt−1(Yt − y) + 4εt−1(ω − β) +ω − β√

n, (12)

where (a) follows from Lemma 3, (b) by Part 2 of Lemma 2 and the fact that Yt ≥ y, (c) follows from the definition ofAn while (d) follows from the definition of Yt. Therefore, on An,

n∑t=1

`(Yt)− `(y∗)(a)

≤ `(Y1)− `(y∗) +n∑t=2

(2εt−1(Yt − y) + 4εt−1(ω − β) +

ω − β√n

)(b)

≤ ymax +

n∑t=2

(2εt−1(ymax + 2(ω − β)) +

ω − β√n

)(c)

≤ (ω − β)(40 + 5 log32 (n)√n) ,

where (a) follows from (12), (b) follows by naively bounding Yt − y ≤ ymax, while (c) follows arduously from thedefinition of εt and ymax. In caseAn does not hold, the regret may be as much as ymax per day, but P Acn ≤ n1−α =1/√n. Combining with the previous display completes the result. ut

5 Experiments

We performed three experiments comparing EWA with FTL in the full-information case with ω = 20 and β = 5.We used two exponential distributions with λ = 1/20 and 1/5 respectively, as well as a power law distribution (seeTable 1). The horizon was set to n = 10, 000 and the learning rate of exponential weighting was tuned to be a

12

factor of 100 larger than the theoretical optimum, which was observed to give a good performance across all threeproblems. The FTL algorithm generally out-performs the exponential weighting algorithm, but not by an enormousmargin. If the theoretically optimal learning rate is used then the performance of exponential weighting deterioratessignificantly. Figures (e) and (f) suggest that FTL suffers

√n regret on the power-law distribution, but logarithmic

regret for exponentially distributed arrival times with parameter λ = 1/20. Each data point is the average of 20independent trials. Code is available at http://downloads.tor-lattimore.com/projects/optimal_waiting.

0 2,000 4,000 6,000 8,000 10,000

0

100

200

300

n

Rn

EWA

FTL

(a) Exponential: λ = 1/20

0 2,000 4,000 6,000 8,000 10,000

0

10

20

n

Rn

EWA

FTL

(b) Exponential: λ = 1/5

0 2,000 4,000 6,000 8,000 10,000

0

100

200

n

Rn

EWA

FTL

(c) Power

20 40

10

15

20

25

y

`(y) Power

Exp,λ = 1/5

Exp,λ = 1/20

(d) Expected Loss Functions

0 10,000 20,000 30,000 40,000 50,000

0

20,000

40,000

n

R2 n

FTL

(e) Power Law, squared regret

0 10,000 20,000 30,000 40,000 50,000

0

10

20

n

Rn/

logn

FTL

(f) Exponential, λ = 1/20

6 Conclusions

We introduced the problem of learning an optimal waiting time with two variants. In both cases, we presented twogeneral algorithms relying on no assumptions that were shown to enjoy near-optimal worst-case regret. Interestingfuture work is to further analyse the problem-dependent regret bounds of FTL and other algorithms in both full andpartial information settings beyond exponentially distributed arrivals. One approach for less conservative algorithmsmay be to use the Kaplan-Meier estimator rather than the standard empirical distribution, but the mathematical theorybehind this estimator is not yet well-developed for this setting where the censoring times are known and not i.i.d.One exception is by Ganchev et. al., but unfortunately their confidence bound depends on the scale and is not suitablefor obtaining optimal regret bounds in our problem [10]. Another challenge is to improve the running time of thealgorithms to O(1) per time step. While our results are the first in this setting, we expect various extensions to relatedproblems, such as when one can choose between multiple options with random durations.

References

[1] Rajeev Agrawal, Demosthenis Teneketzis, and Venkatachalam Anantharam. “Asymptotically efficient adaptive allocationschemes for controlled i.i.d. processes: Finite parameter space”. In: IEEE Transaction on Automatic Control 34 (1989),pp. 258–267.

[2] Noga Alon, Nicolo Cesa-Bianchi, Claudio Gentile, and Yishay Mansour. “From Bandits to Experts: A Tale of Dominationand Independence”. In: Advances in Neural Information Processing Systems. 2013, pp. 1610–1618.

13

[3] Gabor Bartok. “A near-optimal algorithm for finite partial-monitoring games against adversarial opponents”. In: COLT.2013, pp. 696–710.

[4] Gabor Bartok, David Pal, and Csaba Szepesvari. “Minimax Regret of Finite Partial-Monitoring Games in Stochastic Envi-ronments”. In: COLT 2011. 2011, pp. 133–154.

[5] Nicolo Cesa-Bianchi. Prediction, learning, and games. Cambridge University Press, 2006.[6] A Clifford Cohen. Truncated and censored samples: theory and applications. CRC press, 1991.[7] Luc Devroye and Gabor Lugosi. Combinatorial methods in density estimation. Springer, 2001.[8] Aryeh Dvoretzky, Jack Kiefer, and Jacob Wolfowitz. “Asymptotic minimax character of the sample distribution function

and of the classical multinomial estimator”. In: The Annals of Mathematical Statistics 27 (1956), pp. 642–669.[9] Dean P. Foster and Alexander Rakhlin. “No Internal Regret via Neighborhood Watch”. In: Journal of Machine Learning

Research - Proceedings Track (AISTATS) 22 (2012), pp. 382–390.[10] Kuzman Ganchev, Yuriy Nevmyvaka, Michael Kearns, and Jennifer Wortman Vaughan. “Censored exploration and the dark

pool problem”. In: Communications of the ACM 53.5 (2010), pp. 99–107.[11] Robert Kleinberg and Tom Leighton. “The value of knowing a demand curve: Bounds on regret for online posted-price

auctions”. In: Foundations of Computer Science, 2003. Proceedings. 44th Annual IEEE Symposium on. IEEE. 2003, pp. 594–605.

[12] P. Krishnan, Philip M. Long, and Jeffrey Scott Vitter. “Adaptive Disk Spindown via Optimal Rent-to-Buy in ProbabilisticEnvironments”. In: Algorithmica 23.1 (1999), pp. 31–56.

[13] Shie Mannor and Ohad Shamir. “From Bandits to Experts: On the Value of Side-Observations.” In: NIPS. 2011, pp. 684–692.

[14] Pascal Massart. “The Tight Constant in the Dvoretzky-Kiefer-Wolfowitz Inequality”. In: The Annals of Probability 18(1990), pp. 1269–1283.

[15] Celso C Ribeiro, Isabel Rosseti, and Reinaldo Vallejos. “Exploiting run time distributions to compare sequential and parallelstochastic local search algorithms”. In: Journal of Global Optimization 54.2 (2012), pp. 405–429.

[16] Gabor Lugosi Stephane Boucheron and Pascal Massart. Concentration Inequalities: A Nonasymptotic Theory of Indepen-dence. Oxford University Press, 2014.

A Technical Proofs

Proof (Lemma 2). We use the definition of the loss.

`(y2)− `(y1)(a)= E[1X ≤ y2 (X + β) + 1X > y2 (y2 + ω)]

− E[1X ≤ y1 (X + β) + 1X > y1 (y1 + ω)]

(b)= E[1y1 < X ≤ y2 (X + β − y1 − ω) + 1X > y2 (y2 − y1)]

(c)

≤ E[1y1 < X ≤ y2 (β − ω) + 1X > y1 (y2 − y1)]

(d)= (y2 − y1)(1− F (y1))− (ω − β)(F (y2)− F (y1)),

where (a) follows by substituting the definition of the loss function, (b) by linearity of expectation and trivial arithmetic,which completes the proof of part 1, (c) by bounding 1y1 ≤ X ≤ y2X ≤ y2, (d) by linearity of expectation andthe definition of F . Similarly,

`(y2)− `(y1) = E[1y1 < X ≤ y2 (X + β − y1 − ω) + 1X > y2 (y2 − y1)]

(a)

≥ E[1y1 < X ≤ y2 (β − ω) + 1X > y2 (y2 − y1)]

(b)= (y2 − y1)(1− F (y2))− (ω − β)(F (y2)− F (y1)) ,

where in (a) we used the fact that 1y1 ≤ X ≤ y2X ≥ y1 and (b) follows again from the definition of F . ut

Proof (Theorem 1). Let `∗ .= infy `(y). It is easy to see that there exists a sequence of real numbers (yk)k that is

monotone (increasing or decreasing) such that limk→∞ `(yk) = `∗ and limk→∞ yk = y∞ exists with y∞ ∈ [0,∞].We analyse two cases.

14

Case 1: y∞ < ∞. If (yk)k is monotone decreasing, then by Lemma 2 we have

limk→∞

`(yk)− `(y∞) = limk→∞

E [1y∞ < X ≤ yk (X − y∞ + β − ω) + 1X > yk (yk − y∞)]

≥ limk→∞

P y∞ < X ≤ yk (β − ω) + (yk − y∞) = 0.

Therefore `(y∞) = `∗, so y∞ is optimal. If (yk)k is monotone increasing, then

limk→∞

`(y∞)− `(yk) = limk→∞

E [1yk < X ≤ y∞ (X − yk + β − ω) + 1X > y∞ (y∞ − yk)]

≤ limk→∞

y∞ − yk = 0,

which implies as before that y∞ is optimal.

Case 2: y∞ = ∞ for every sequence (yn)n satisfying the above conditions. For any y ∈ [0,∞) there is a k withyk > y and `(yk) ≤ `(y) for all y ∈ [0, y]. Therefore,

P X > y ≤ 2−by

2(ω−β)c ≤ 21− y2(ω−β) (13)

for any y ∈ [0,∞) by Part 1 of Lemma 1. This implies that for any y > ω − β,

`(y) = E[X + β] + E [1X > y (y + ω − β −X)]

≥ E[X + β]− E [1X > y + ω − β (X − (y + ω − β))]

= E[X + β]−∫ ∞y+ω−β

P X > x dx

≥ E[X + β]−∫ ∞y+ω−β

21− x2(ω−β) dx

= E[X + β] +2√

2(ω − β)

log 22−

y2(ω−β) ,

where the first inequality holds since 1y < X ≤ y + ω − β (y+ω−β−X) ≥ 0, while the second inequality holdsby the above tail bound onX . Therefore, `∗ = limn→∞ `(yn) ≥ E[X+β]. But by Eq. (13) we have P X =∞ = 0,so `(y∞) = `(∞) = E[X + β] ≤ `∗. Therefore y∞ =∞ is optimal. ut

15


Recommended