Chapter 149
Best-Of-Seven and the First-Price Auction
The Riddler for June 2, 2017. The Express is a clean expected-length calculation for a best-of-seven series under independent games. The Classic is a textbook Bayesian game: a sealed first-price auction with values drawn uniformly on , asking for the Nash equilibrium bidding strategy with two bidders, with bidders, and in the all-pay variant.
Riddler Express
How many games would we expect to be needed to complete a best-of-seven series if each team has a percent chance of winning each individual game? How about if one team has a percent chance of winning each game? How about ?
The Riddler, FiveThirtyEight, June 2, 2017(original post)
Solution
Let be the probability that team wins any given game; is the probability that wins. Games are independent.
The series lasts games (for ) exactly when one team reaches its fourth win on game . For team to win –, game itself must be one of ’s wins (the clinching game), and among the first games must have won exactly and lost . There are orderings of those first games, each with probability , and game contributes a further factor . So and symmetrically for , The expected length is then Plug in (so ): For (so ), which evaluates to approximately . For the analogous sum evaluates to approximately .
The series shortens as moves away from because the more imbalanced the matchup, the likelier it ends in a sweep or near-sweep.
The computation
Encode the actual rule: flip a biased coin until one side has won four games, and average the length over many independent series.
import random
def length(p, rng):
a = b = n = 0
while a < 4 and b < 4:
n += 1
if rng.random() < p: a += 1
else: b += 1
return n
rng = random.Random(0)
TRIALS = 300_000
for p in (0.5, 0.6, 0.7):
avg = sum(length(p, rng) for _ in range(TRIALS)) / TRIALS
print(f"p={p}: empirical E[length] = {avg:.4f}")
# p=0.5: empirical E[length] = 5.8114
# p=0.6: empirical E[length] = 5.6985
# p=0.7: empirical E[length] = 5.3786
The simulated averages match the closed-form values to three decimals.
Riddler Classic
You and a single arch nemesis bid in a sealed first-price auction for a painting. Each of you draws a private valuation uniformly at random from , where . The distribution and rules are common knowledge. You submit a sealed bid; whoever bids higher wins and pays their bid. If your valuation is , how much should you bid? Extra credit: what if there are bidders in the room? Extra extra credit: in an all-pay auction, where every bidder pays whatever they wrote down regardless of winning, how much should everyone bid?
The Riddler, FiveThirtyEight, June 2, 2017(original post)
Solution
This is a Bayesian game: each bidder knows her own valuation but only the distribution of the others’. We hunt for a symmetric Bayesian Nash equilibrium: a bidding rule such that, if every opponent uses , then is each bidder’s best response.
The two boundary observations. Bidding more than your valuation is dominated: at best you break even, more often you overpay. Bidding exactly your valuation is also dominated: winning then yields zero surplus. The optimal bid lies strictly between and your valuation, and you trade win probability against surplus per win.
Two-bidder case via linear ansatz. Suppose the opponent uses for some . Your opponent’s bid is then uniform on . If you bid with valuation , your expected payoff is This is a concave quadratic in ; the first-order condition gives For self-consistency we need your best response to coincide with the opponent’s rule, so . The equilibrium is The notable feature: the equilibrium bid is independent of . The factor cancels because both the win probability and the strategy scale linearly with valuations.
Extra credit: bidders. Suppose the other bidders each use . Each opponent’s bid is uniform on and they are independent. The probability that all of them bid below is . Your expected payoff is Differentiate (or use logarithmic derivative): setting gives Self-consistency forces : More bidders means stiffer competition; bids climb toward the valuation as , and the surplus per win shrinks accordingly.
Extra extra credit: all-pay auction with bidders. Now everyone pays their bid whether or not they win. Look for a symmetric, strictly increasing equilibrium .
If everyone else plays , a bidder of true valuation who pretends to have valuation (bids ) gets expected payoff The first term is the win probability times the value won; the second is the bid paid regardless. Equilibrium requires to maximise , so With boundary condition , integrate: For , : a bidder valuing the painting at bids only , much less than the she would bid in the first-price auction. The reason: paying win or lose makes overbidding far more painful, so equilibrium bids are heavily compressed.
A sanity check via expected surplus. In the first-price auction with , your expected utility before learning your value is where (opponent has lower value, equivalently lower bid) and surplus is . Revenue equivalence predicts the all-pay auction yields the same expected utility, which matches the Monte Carlo computation below.
The computation
We confirm two distinct claims: (i) is a best response when all others use it (first-price), and (ii) the equilibrium expected utility matches for in both auction formats (revenue equivalence).
Draw valuations uniformly on . Apply the candidate equilibrium bid for each.
Tally wins (highest bid takes the painting) and net utilities.
For best-response check: hold opponents at the equilibrium and vary your bid; confirm the maximum lands at the predicted value.
import random
V = 100_000_000
def eq_utility(N, trials, rng):
"""All N bidders use b(x) = (N-1)x/N; average winner's surplus."""
tot = 0.0
for _ in range(trials):
vals = [rng.uniform(0, V) for _ in range(N)]
bids = [(N-1)*v/N for v in vals]
i = bids.index(max(bids))
tot += vals[i] - bids[i]
return tot / trials
rng = random.Random(0)
for N in (2, 3, 5):
u = eq_utility(N, 200_000, rng)
# winner's expected surplus = E[max(X_1,...,X_N) / N]
# for N=2 that is (1/2)(2V/3) = V/3 = 33,333,333
print(f"N={N}: avg winner surplus = {u:.2f}")
# Best-response check at N=2, x = V/2
def br_check(N, x, rng):
best = (-1.0, None)
for frac in [0.30, 0.40, 0.45, (N-1)/N, 0.55, 0.60, 0.70]:
b_me = frac * x
u = 0.0
T = 200_000
for _ in range(T):
others = [rng.uniform(0, V) for _ in range(N-1)]
obids = [(N-1)*y/N for y in others]
if b_me > max(obids):
u += (x - b_me)
u /= T
if u > best[0]: best = (u, frac)
return best
print(f"N=2 best-response fraction (predicted 0.500): {br_check(2, V/2, rng)[1]}")
print(f"N=3 best-response fraction (predicted 0.667): {br_check(3, V/2, rng)[1]}")
# N=2: avg winner surplus = 33329015.18 (matches V/3 = 33333333)
# N=3: avg winner surplus = 24988709.23 (matches V/4 = 25000000)
# N=5: avg winner surplus = 16660330.67 (matches V/6 = 16666667)
# N=2 best-response fraction (predicted 0.500): 0.5
# N=3 best-response fraction (predicted 0.667): 0.6666666666666666
The best-response check picks out exactly the analytic fraction in each case, and the equilibrium winner surplus tracks the closed-form prediction. The all-pay calculation in the Solution agrees with the revenue-equivalence prediction for .