Congratulations! The Acme Axegrinders, which you own, are the regular season champions of the National Squishyball League (NSL). Your team will now play a championship series against the Boondocks Barbarians, which had the second-best regular season record. You feel good about Acme’s chances in the series because Acme won exactly 60 percent of the hundreds of games it played against Boondocks this season. (The NSL has an incredibly long regular season.) The NSL has two special rules for the playoffs:
The owner of the top-seeded team (i.e., you) gets to select the length of the championship series in advance of the first game, so you could decide to play a single game, a best two out of three series, a three out of five series, etc., all the way up to a 50 out of 99 series. The owner of the winning team gets \$1 million minus \$10,000 for each of the victories required to win the series, regardless of how many games the series lasts in total. Thus, if the top-seeded team’s owner selects a single-game championship, the winning owner will collect \$990,000. If he or she selects a 4 out of 7 series, the winning team’s owner will collect \$960,000. The owner of the losing team gets nothing. Since Acme has a 60 percent chance of winning any individual game against Boondocks, Rule 1 encourages you to opt for a very long series to improve Acme’s chances of winning the series. But Rule 2 means that a long series will mean less winnings for you if Acme does take the series.
How long a series should you select in order to maximize your expected winnings? And how much money do you expect to win?
In [3]:
from matplotlib import pyplot as plt
from scipy.special import binom
$A_n(p) = \sum_{k=n}^{2 n - 1} \binom{2 n - 1}{k} p^k (1 - p)^{2 n - 1 - k}$
In [4]:
def how_many_games(p=0.6, initial_amount=1_000_000, win_subtraction=10_000):
expected_winnings = []
for num_wins in range(1,50):
series_length = 2*num_wins - 1
prize = initial_amount - (win_subtraction*num_wins)
win_p = 0
for k in range(num_wins, series_length + 1):
win_p += binom(series_length, k) * (p**k) * ((1-p)**(series_length - k))
expected_winning = prize * win_p
expected_winnings.append((series_length, expected_winning))
return expected_winnings
In [5]:
expected_winnings = how_many_games()
plt.plot(*zip(*expected_winnings))
plt.show()
In [7]:
sorted_by_winnings = sorted(expected_winnings, key=lambda x: x[1], reverse=True)
sorted_by_winnings[0:5]
Out[7]: