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:
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?
Let's first define some terms.
A series @@11@@ can be won in anywhere from @@12@@ to @@13@@ games. We can calculate the probability of winning the overall series by adding up the probabilities of each series run length.
But we need to take care that we don't overcount. That is, for a series @@15@@ that is won in @@16@@ games, we need to remove the combination of wins of @@17@@ games (because that series would have ended in @@18@@ games).
So there are a number of steps to calculate the overall probability. 1. Calculate the probability of winning a series requiring @@19@@ wins in @@20@@ games. - This takes into consideration the combinations of wins and losses as well as the probabilities of wins and losses. - Remove from this count those combinations that would have resulted in a shorter series. 2. Calculate the probability of winning the series by adding up the probabilities for all the possible series lengths.
So this is a good sanity check.
Let's check that the probabilities for the series going to @@0@@ games makes sense.
Let's also check that all the probabilities sum to 1.
So now that we have the probability of the team winning the series given the number of required wins @@0@@, we can calculate the expected value @@1@@.
Calculate all the probabilities and payouts for series from 1 to 50 games. We'll put it in a DataFrame for convenient plotting.
Let's put this altogether in an interactive form.