Chapter 111
Can You Figure Out How To Beat Roger Federer At Wimbledon?
You face peak Roger Federer in the Wimbledon final and win each point with probability just . As a courtesy, Federer lets you name any score for the match to start from. What score should you choose, and what is your chance of lifting the trophy?
The Riddler, FiveThirtyEight (Ted LeMoine)(original post)
Solution
Name yourself two sets up, the third set level at six games all, and yourself ahead six points to none in the resulting tiebreak. That gives the best shot at the title,
The one idea is to count your match points, the moments where a single point ends the contest in your favour. You win each point so rarely that your only realistic hope is to need just one more point, so the score you name should hand you as many such points as possible. A men’s match is best of five sets; declaring two sets already won leaves you one set short. Inside that third set, the most match points available come not from leading a game but from a tiebreak, where reaching six points up means six separate chances to win the title on the very next point. (Wimbledon plays no tiebreak in the deciding fifth set, so you must engineer this in the third.)
From six points to none in a tiebreak, you lose only if you fail to win any of the next six points and then also lose the protracted ending. Failing all six happens with probability , so the easy estimate is . Add the slender chance of scraping through after it reaches six all (where winning from a tie has probability ), and the exact figure rises a hair to Everything beyond the tiebreak is negligible: your chance of winning a fresh set outright is about , so naming a weaker position such as “up –, –love” (only three match points, about a title chance) is markedly worse. Stack the match points and the rare event becomes as likely as it ever can.
The computation
Walk the tiebreak as a small Markov chain from six points to none: first to seven, win by two, each point yours with probability . Treat any tie from six all on with the standard win-from-deuce probability so the recursion terminates.
from functools import lru_cache
p = 0.01
deuce = p * p / (p * p + (1 - p) ** 2) # win from any tie >= 6-6
@lru_cache(None)
def win(me, opp):
if me >= 7 and me - opp >= 2: return 1.0
if opp >= 7 and opp - me >= 2: return 0.0
if me >= 6 and opp >= 6 and me == opp: return deuce
return p * win(me + 1, opp) + (1 - p) * win(me, opp + 1)
print(round(100 * win(6, 0), 5)) # 5.86159