Riddler Express: October 15, 2021

David Ding

October 17, 2021

Ballpark Figures

The American League Championship Series of Riddler League Baseball determines one of the teams that will compete in the Riddler World Series. This year’s teams — the Tampa Bay Lines and the Minnesota Twin Primes — are evenly matched. In other words, both teams are equally likely to win each game of the best-of-seven series.

On average, how many games will the series last? (Note that the series ends as soon as one team has won four games.)

Expected number of games = \(\frac{93}{16}\) or 5.8125 games.

Explanation:

First of all, I love those team names! Riddler League Baseball fans must also be fans of math as well. Some other team ideas I had were:

LA Angles

— David Ding (@DavidYiweiDing) October 15, 2021

Alright, cheesy team names apart, let's tackle the actual puzzle. I will do this by solving a more general case, which asks the question: on average, how many games will the series last if the Tampa Bay Lines have a probability of \(p\) to win each game? The answer to the original problem would be when \(p = 0.5\).

Before delving into the problem, let me clearly outline a few assumptions:

There are many ways to solve the problem given the above assumptions, including using a Markov Chain with an unsightly number of states and transitions. Since we are only interested in the number of games played and not the actual probability, we can simply the solving process by making a key observation:

The series ends in \(n\) games if the winning team wins the \(n\)th game while having won 3 out of the past \((n - 1)\) games, for \(4 \leq n \leq 7\).

At the first glance, it might seem that the above statement is not robust, as there could be opportunities for counterexamples or double counting. However, in fact, the observation is quite foolproof. For one thing, there is no way for the losing team to win 4 games out of the past \((n - 1)\) games if the winning team already won 3, because \(4 \leq n \leq 7\). Even as \(n = 7\), the most games the losing team could've won is 3, and so if the winning team takes game \(n\) then only that team can win the series. The second doubt regarding double-counting scenarios is in fact unwarranted, as there is no way for the same situation to be counted twice. The main reason is that while there are many ways for a team to win 3 out of \((n - 1)\) games, only one scenario can be established if game \(n\) is a series-clinching one. For example, consider two scenarios, where in the first the winning team wins the series in 5 games and in the latter 6 games. Say in both cases that team is up 3-1 through 4 games. Well, the difference is game 5. In the first case the winning team would win that game and clinch the series, whereas in the latter case that team must lose game 5 so that game 6 is the series-clinching one. In both cases, the sequences of victories are necessarily different in the end to ensure the specific games in the series, even if the beginnings are identical.

Therefore, we can go ahead and translate the above observation into the language of mathematics. Let \(f_p(n)\) denote the probability that Tampa Bay Lines clinch series in \(n\) games with each game's win probability being \(p\). Let's look at \(f_p(n)\). From our observation, we have:

\begin{align} &f_p(n) \\ &= P(\text{T wins game n} | \text{T wins 3 out of past (n-1) games}) \\ &\times P(\text{T wins 3 out of past (n-1) games}) \\ &= P(\text{T wins game n})P(\text{T wins 3 out of past (n-1) games}) \\ &= P(\text{T wins game n})P(\text{T wins 3 out of (n-1) games}) \\ &= pP(\text{T wins 3 out of (n-1) games}) \\ \end{align}

The last lines are from the independence assumption we made about the problem setup. The probability that Tampa Bay Lines win 3 out of \((n-1)\) games can be modelled with binomial distribution. Continuing our derivation on \(f_p(n)\), we have:

\begin{align} &f_p(n) \\ &= pP(\text{T wins 3 out of (n-1) games}) \\ &= p \binom{n-1}{3} p^3 q^{(n-1)-3} \\ &= \binom{n-1}{3} p^4 q^{n-4} \\ \end{align}

By symmetry, the probability that Minnesota Twin Primes clinch the series in \(n\) games is:

\begin{align} \binom{n-1}{3} q^4 p^{n-4} \\ \end{align}

Let \(g_p(n)\) denote the probability that the series ends in \(n\) games given the win probability for each game for Tampa Bay Lines is \(p\). We have:

\begin{align} g_p(n) = \binom{n-1}{3} \left(p^4 q^{n-4} + q^4 p^{n-4}\right) \end{align}

As reminder, \(q = 1 - p\).

We now have an expression to denote the expected number of games:

\begin{align} &\text{Expected Number of Games} \\ &= \sum_{n = 4}^7 n g_p(n) \\ &= \sum_{n = 4}^7 n \binom{n-1}{3} \left(p^4 q^{n-4} + q^4 p^{n-4}\right) \\ &= \sum_{n = 4}^7 \frac{n (n-1)!}{3!(n-4)!} \left(p^4 q^{n-4} + q^4 p^{n-4}\right) \\ &= \boxed{4 \sum_{n = 4}^7 \binom{n}{4} \left(p^4 q^{n-4} + q^4 p^{n-4}\right)} \\ \end{align}

In particular, the solution to the original puzzle is when \(p = q = 0.5\), for which the above expression further simplifies:

\begin{align} &\text{Expected Number of Games For Evenly-Matched Teams} \\ &= \sum_{n = 4}^7 n g_{0.5}(n) \\ &= \left.4 \sum_{n = 4}^7 \binom{n}{4} \left(p^4 q^{n-4} + q^4 p^{n-4}\right)\right|_{p = q = 0.5} \\ &= 8 \sum_{n = 4}^7 \binom{n}{4} \left(0.5^n\right) \\ &= 8 \left(0.5^4 + 5(0.5^5) + 15(0.5^6) + 35(0.5^7)\right) \\ &= 8 \left(\frac{1}{16} + \frac{5}{32} + \frac{15}{64} + \frac{35}{128}\right) \\ &= 8 \left(\frac{8 + 20 + 30 + 35}{128}\right) \\ &= \boxed{\frac{93}{16}} \\ &= 5.8125 \end{align}

Simulation Verification of Theoretical Results

We can also simulate the scenario for different values of \(n\) using Monte-Carlo, and compare with our theoretical result. The simulation is done via MATLAB in a Monte-Carlo fashion with 10 million trials per value of \(p\):

   
function numGames = monteCarloGames(p)
    % Given the probability of winning in p, get the expected number of
    % games in monte-carlo fashion

    numTrials = 1e7;
    sumGames = 0;
    for k = 1:numTrials
        sumGames = sumGames + monteCarloHelper(p);
    end

    numGames = sumGames / numTrials;
end

function numGames = monteCarloHelper(p)
    % One trial of series
    aWin = 0;
    bWin = 0;
    numGames = 0;

    while aWin < 4 && bWin < 4
        if rand < p
            aWin = aWin + 1;
        else
            bWin = bWin + 1;
        end

        numGames = numGames + 1;
    end
end
		

This yields the following result:

graphResults

As one can see, the simulation is pretty close to our theoretical result. Furthermore, we can remark on several insights obtained from the graph. Namely:

Let's have one more interesting observation. Let's calculate the probability that the series will go into 7 games for two evenly-matched teams. That would be:

\begin{align} &\text{Probability of Series Going 7 With Two Evenly Matched Teams} \\ &= g_{0.5}(7) \\ &= \left.\binom{n-1}{3} \left(p^4 q^{n-4} + q^4 p^{n-4}\right)\right |_{p = q = 0.5,\quad n = 7} \\ &= 2 \binom{6}{3} \left(0.5^7\right) \\ &= \frac{40}{128} \\ &= \boxed{\frac{5}{16}} \\ &= 0.3125 \end{align}

Interestingly enough, for MLB, there have been 116 World Series played, of which 40 have reached seven games. That's a game-seven rate of 0.345, which is comparatively close to the evenly matched scenario presenting by two battling teams from Riddler League Baseball. Looks like whether we are in RLB or MLB, some things don't ever change!