
simple reduction (see e.g., [RWW20]). The continuity of Figuarantees that for any α∈(0,1], we
may define the (1 −α)-quantile of Dias the minimum number τthat satisfies PrXi∼Di[Xi> τ ] =
1−Fi(τ) = α.
In the prophet setting, the values of different options are drawn independently from distributions
D1,D2,...,Dn. At the beginning of the game, the player is given certain information about the
distributions.2We consider both the case that the player receives a complete description of (Di)n
i=1,
and the case where the player sees one sample ˆ
Xidrawn from each Di. In the latter case, the
observed sample ˆ
Xiis independent from the actual value Xi, and the expected score of the player
is defined over the randomness in ( ˆ
Xi)n
i=1 as well. Finally, the player’s score is compared to that of
an omniscient prophet that knows the realization of X1, . . . , Xnand always picks the highest one.
Definition 3 (Secretary setting).The player is given information about a1, a2, . . . , an≥0. The
nvalues X1, X2, . . . , Xnare guaranteed to be a permutation, either uniformly random or arbitrary,
of a1, a2, . . . , an.
The player is α-competitive in the random order case if its expected score, over the randomness
in both the permutation and the player itself, is at least 1
α·maxi∈[n]ai. The player is α-competitive
in the arbitrary order case if for any permutation (Xi)n
i=1 of (ai)n
i=1, the player’s expected score,
over the randomness in the player itself, is at least 1
α·maxi∈[n]ai.
Note that an α-competitive player for the arbitrary order case is also α-competitive under
a random arrival order. We consider the following three forms of information provided to the
player, in decreasing order of helpfulness: (1) full information, the player is given a1, a2, . . . , an;
(2) optimum information, the player is given maxi∈[n]ai; (3) no information, the player is given
nothing.
With full or optimum information, if the player could observe each Xidirectly, it would be
easy to achieve a utiliy of maxi∈[n]ai—simply accept option ionly if Xiis equal to this maximum.
This is, however, not true for the online pen testing problem. For example, when (a1, a2, . . . , an) =
(1,2, . . . , n), the player can only ensure that Xi=nby setting the threshold θito n−1, but this
would leave a remaining utility of merely 1.
1.2 Our Results
We obtain the optimal competitive ratios (modulo constant factors) for online pen testing, under
different variants of the prophet and secretary settings defined above.
A simple lower bound. The following example shows that even when the Xi’s are drawn
independently from the same “nice” distribution, our score can still be an Ω(log n) factor away
from the optimal outcome.
Fact 1.5. Suppose that X1, X2, . . . , Xnare drawn independently from the exponential distribu-
tion with parameter 1. The expected score of the player is at most 1, while the maximum among
X1, X2, . . . , Xnis Hn:=Pn
k=1 1
k= Ω(log n)in expectation.
Proof of Fact 1.5.Whenever the player accepts option iafter testing it at threshold θi, the expected
remaining utility is EX∼D [X|X > θi]−θi= 1. The expected score of the player is thus at most 1.
The second claim follows from a straightforward calculation, which is deferred to Appendix A.
2Without information about (Di)n
i=1, this is as hard as the worst-case setting when every Diis degenerate.
4