Baseball and Pascal’s Triangle

Published on 2011-10-28 by Mark VandeWettering

I was standing in Tom’s office, and asked him a simple probability question (and a timely one, given the World Series):

If the odds of a particular team winning against their opponent is some probability p, what are the odds that they will win a 7 game series?

If you had any probability at all, you probably have solved this problem before. I know I have: I blogged about it before.. But I was trying to remember the equations: I knew they had something to do with the binomial coefficients, but their exact form seemed problematic.

Tom pointed out that you could just write it down by making a table. We are looking for the best 4 out of 7, so let’s make a 5×5 array. For each cellij, we are going to compute the odds that the series will reach team A having I wins and team B having wins. Let’s begin by writing down the table:

  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
</tr>

<tr>
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
</tr>

<tr>
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
</tr>

<tr>
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
</tr>

<tr>
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
  
  <td style="width: 5em;">
    &nbsp;
  </td>
</tr>
1

Let’s say that team A wins with probability p, and team B wins with probaility q (note that q = 1 – p). Each time team A wins, let’s move one step to the right… Let’s imagine that team A wins in a clean sweep, we can fill in those numbers quite easily:

  <table border="1">
    <tr>
      <td style="width: 5em;">
        1
      </td>
      
      <td style="width: 5em;">
        p
      </td>
      
      <td style="width: 5em;">
        p<sup>2</sup>
      </td>
      
      <td style="width: 5em;">
        p<sup>3</sup>
      </td>
      
      <td style="width: 5em;">
        p<sup>4</sup>
      </td>
    </tr>
    
    <tr>
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
    </tr>
    
    <tr>
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
    </tr>
    
    <tr>
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
    </tr>
    
    <tr>
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
      
      <td style="width: 5em;">
        &nbsp;
      </td>
    </tr>
  </table>
  
  <p>
    </center>
  </p>
  
  <p>
    Similarly, we can compute the odds that team B has a clean sweep by marching down the first column, multiplying each previous entry by q.
  </p>
  
  <p>
    <center>
      </p> 
      
      <table border="1">
        <tr>
          <td style="width: 5em;">
            1
          </td>
          
          <td style="width: 5em;">
            p
          </td>
          
          <td style="width: 5em;">
            p<sup>2</sup>
          </td>
          
          <td style="width: 5em;">
            p<sup>3</sup>
          </td>
          
          <td style="width: 5em;">
            p<sup>4</sup>
          </td>
        </tr>
        
        <tr>
          <td style="width: 5em;">
            q
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
        </tr>
        
        <tr>
          <td style="width: 5em;">
            q<sup>2</sup>
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
        </tr>
        
        <tr>
          <td style="width: 5em;">
            q<sup>3</sup>
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
        </tr>
        
        <tr>
          <td style="width: 5em;">
            q<sup>4</sup>
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
          
          <td style="width: 5em;">
            &nbsp;
          </td>
        </tr>
      </table>
      
      <p>
        </center>
      </p>
      
      <p>
        But now, what are the odds that we reach (say) a 1-1 even series. Well, there are two ways of reaching 1-1, either team A wins then team B, or team B wins then team A. If the games are independent, then the odds are the same regardless of the path taken, and there are two paths. So, we can fill 1-1 in as 2 p q &#8230;
      </p>
      
      <p>
        <center>
          </p> 
          
          <table border="1">
            <tr>
              <td style="width: 5em;">
                1
              </td>
              
              <td style="width: 5em;">
                p
              </td>
              
              <td style="width: 5em;">
                p<sup>2</sup>
              </td>
              
              <td style="width: 5em;">
                p<sup>3</sup>
              </td>
              
              <td style="width: 5em;">
                p<sup>4</sup>
              </td>
            </tr>
            
            <tr>
              <td style="width: 5em;">
                q
              </td>
              
              <td style="width: 5em;">
                2 p q
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
            </tr>
            
            <tr>
              <td style="width: 5em;">
                q<sup>2</sup>
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
            </tr>
            
            <tr>
              <td style="width: 5em;">
                q<sup>3</sup>
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
            </tr>
            
            <tr>
              <td style="width: 5em;">
                q<sup>4</sup>
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
              
              <td style="width: 5em;">
                &nbsp;
              </td>
            </tr>
          </table>
          
          <p>
            </center>
          </p>
          
          <p>
            We can continue this, being careful to keep track of the number of paths, and it will begin to look like Pascal&#8217;s triangle&#8230;
          </p>
          
          <p>
            <center>
              </p> 
              
              <table border="1">
                <tr>
                  <td style="width: 5em;">
                    1
                  </td>
                  
                  <td style="width: 5em;">
                    p
                  </td>
                  
                  <td style="width: 5em;">
                    p<sup>2</sup>
                  </td>
                  
                  <td style="width: 5em;">
                    p<sup>3</sup>
                  </td>
                  
                  <td style="width: 5em;">
                    p<sup>4</sup>
                  </td>
                </tr>
                
                <tr>
                  <td style="width: 5em;">
                    q
                  </td>
                  
                  <td style="width: 5em;">
                    2 p q
                  </td>
                  
                  <td style="width: 5em;">
                    3 p<sup>2</sup> q
                  </td>
                  
                  <td style="width: 5em;">
                    4 p<sup>3</sup> q
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                </tr>
                
                <tr>
                  <td style="width: 5em;">
                    q<sup>2</sup>
                  </td>
                  
                  <td style="width: 5em;">
                    3 p q<sup>2</sup>
                  </td>
                  
                  <td style="width: 5em;">
                    6 p<sup>2</sup> q<sup>2</sup>
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                </tr>
                
                <tr>
                  <td style="width: 5em;">
                    q<sup>3</sup>
                  </td>
                  
                  <td style="width: 5em;">
                    4 p q<sup>3</sup>
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                </tr>
                
                <tr>
                  <td style="width: 5em;">
                    q<sup>4</sup>
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                  
                  <td style="width: 5em;">
                    &nbsp;
                  </td>
                </tr>
              </table>
              
              <p>
                </center>
              </p>
              
              <p>
                If you are familiar with Pascal&#8217;s triangle, or with binomial coefficients, those numbers are beginning to look pretty familiar to you. But you have to be a little careful in filling in the remaining squares: for instance, it&#8217;s perfectly possible for the series to end 4-1, but there are no paths that end up there that pass through 4-0 (when the first team wins 4 games, the series is over). So you don&#8217;t continue to add in the same way. for these remaining squares. And, of course the series won&#8217;t end 4-4, so the final square will remain unfilled.
              </p>
              
              <p>
                <center>
                  </p> 
                  
                  <table border="1">
                    <tr>
                      <td style="width: 5em;">
                        1
                      </td>
                      
                      <td style="width: 5em;">
                        p
                      </td>
                      
                      <td style="width: 5em;">
                        p<sup>2</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        p<sup>3</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        p<sup>4</sup>
                      </td>
                    </tr>
                    
                    <tr>
                      <td style="width: 5em;">
                        q
                      </td>
                      
                      <td style="width: 5em;">
                        2 p q
                      </td>
                      
                      <td style="width: 5em;">
                        3 p<sup>2</sup> q
                      </td>
                      
                      <td style="width: 5em;">
                        4 p<sup>3</sup> q
                      </td>
                      
                      <td style="width: 5em;">
                        4 p<sup>4</sup>q
                      </td>
                    </tr>
                    
                    <tr>
                      <td style="width: 5em;">
                        q<sup>2</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        3 p q<sup>2</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        6 p<sup>2</sup> q<sup>2</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        10 p<sup>3</sup> q<sup>2</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        10 p<sup>4</sup> q<sup>2</sup>
                      </td>
                    </tr>
                    
                    <tr>
                      <td style="width: 5em;">
                        q<sup>3</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        4 p q<sup>3</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        10 p<sup>2</sup> q<sup>3</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        20 p<sup>3</sup> q<sup>3</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        20 p<sup>4</sup> q<sup>3</sup>
                      </td>
                    </tr>
                    
                    <tr>
                      <td style="width: 5em;">
                        q<sup>4</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        4 p q<sup>4</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        10 p<sup>2</sup> q<sup>4</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        20 p<sup>3</sup> q<sup>4</sup>
                      </td>
                      
                      <td style="width: 5em;">
                        &nbsp;
                      </td>
                    </tr>
                  </table>
                  
                  <p>
                    </center>
                  </p>
                  
                  <p>
                    So, what are the odds that team A wins? We can just sum up the probabilities in the final column. That team B wins? We can sum up the final row (and the combination better add up to one).
                  </p>
                  
                  <p>
                    Let&#8217;s say that p = 0.5. That means p = q, and we&#8217;d expect the odds to be the same. Just staring at the equations, substituting p for q should convince you that the probabilities are the same. If we&#8217;ve filled in our formulas correctly, we&#8217;d expect the overall probability to be 0.5 as well. It&#8217;s far from obvious to me, staring at those equations that it&#8217;s true, but if you go ahead and plug in the numbers, you&#8217;ll find that it does indeed work out.
                  </p>
                  
                  <p>
                    So, let&#8217;s say that in a (for examples) Rangers vs. St. Louis matchup, the Rangers would win 60% of their games. What are the odds that the Red Birds win the Series? About 26.4% of the time. But if the Series is all tied up 3-3, then of course their probability is 40%.
                  </p>
                  
                  <p>
                    Of course all this doesn&#8217;t take into account the difference in home field advantage, or pitching matchups, or any of a million other factors, so it&#8217;s relation to any games being played tonight is strictly theoretical.
                  </p>
                  
                  <p>
                    </j>
                  </p>