# How can I use math to fill out my NCAA tournament bracket?

With the NCAA basketball tournament right around the corner and the conference tournaments just beginning, it's the perfect time to consider strategies to fill out an NCAA tournament bracket. How can we use mathematics to inform our decisions?

A good answer should consist of an algorithm to produce a reasonable comparison of teams and, ideally, should produce an illustrative example. Of course, it's extremely unlikely that such an algorithm could produce a billion dollar bracket winner. But, hey, the tournament and math are both great fun, so why not try?

For those who might actually be interested in the challenge, I've posted the game outcomes for all 11585 games played by all 1083 NCAA teams (not just the 351 division 1 teams) in this zip file. That expands to a directory containing two CSV files

• A list of all the teams and
• A matrix of game outcomes, as described in the answer below.

An example illustrating the use of these files via Mathematica is also shown in the answer below.

• The most likely outcome is for the favorite to win every matchup. (however, this is only slightly more likely than the second-most-likely outcome). – vadim123 Mar 13 '14 at 14:06
• @vadim123 Of course, that's close since the committee that seeds the tournament considers exactly the things that a ranking system would consider. Thus, a winning bracket is exceedingly unlikely, given the well known phenomenon of upsets. Ultimately, the question concerns the mathematics behind such a ranking system. – Mark McClure Mar 13 '14 at 14:10
• @MarkMcClure And given that the rankings are based on opinion polls, there is practically no math involved. – Emily Mar 13 '14 at 14:11
• @Arkamis You are very wrong! :) – Mark McClure Mar 13 '14 at 14:13
• @MarkMcClure Duke being ranked above Virginia last week is proof that there is no logic at all to the system!! ;) – Emily Mar 13 '14 at 14:14

Note: I originally did this for the 2014 season. See the update at the bottom to view the 2015 tournament bracket produced by this technique.

There are a number sports ranking systems based on mathematics. One major tool that is often used is linear algebra and JP Keener published a nice overview of these techniques in the 1993 SIAM review. Here's an outline of perhaps the simplest such technique.

We wish to assign a positive ranking $r_i$ to each of $N$ teams. Each team has a strength $s_i$ associated with it, thus perhaps $$r_i = \frac{1}{n_i} \sum_{j=1}^N a_{ij} s_j,$$ where $a_{ij}$ is yet to be determined. We divide by $n_i$, the total number of games played by team $i$, so that a team can't inflate it's ranking by simply playing a lot of games. It seems reasonable that a team's ranking should be proportional to it's strength, i.e. $r_i=\lambda s_i$, thus $$\frac{1}{n_i} \sum_{j=1}^N a_{ij} s_i = \lambda s_i.$$ In mathematical terms, the vector whose elements are exactly the strengths of our teams (or similarly, the rankings) is an eigenvector of the matrix $A$ whose entries are the $a_{ij}$s.

A major question is, how should we choose the matrix $A$? Different choices lead to different rating schemes. As mentioned in Keener's paper, there is a powerful theorem in linear algebra (the Perron-Frobenius theorem) that describes when we can expect a matrix $A$ to have an eigenvector with positive entries. For one thing, $A$ should have non-negative entries. Perhaps the simplest way to choose $A$ is to let $a_{ij}$ be the number of times that team $i$ beat team $j$. Per the Perron-Frobenius theorem, we will not have a negative entry if team $i$ lost to team $j$.

Again, per the paper, we simply compute the largest positive eigenvalue and the corresponding eigenvector (commonly called the dominant eigenvector) should be our rankings!

Many variations are possible by simply altering the way the matrix $A$ is chosen. One possibility, that might account for close games, is to have the entries account for the score, in addition to a win versus a loss. Keener's paper considers several more significant variations.

Example

As an example, let's try to rank the teams in the Big Ten (2014). These were, listed alphabetically:

1. Illinois
2. Indiana
3. Iowa
4. Michigan State
5. Michigan
6. Minnesota
7. Northwestern
8. Ohio State
9. Penn State
10. Purdue
11. Wisconsin

Perhaps the fact that there are 12 teams in the Big Ten is a poor omen for our mathematical approach. Nonetheless, the matrix $A$ for the 2014 Big Ten just prior to the Big Ten Tournament was as follows.

$$A= \frac{1}{18}\left( \begin{array}{cccccccccccc} 0 & 1 & 1 & 1 & 0 & 1 & 0 & 0 & 2 & 0 & 0 & 1 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 & 1 & 1 & 2 & 1 & 1 & 1 & 0 & 1 \\ 1 & 2 & 2 & 0 & 0 & 1 & 2 & 1 & 2 & 1 & 0 & 0 \\ 1 & 1 & 1 & 2 & 0 & 2 & 1 & 1 & 1 & 2 & 1 & 2 \\ 0 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 2 & 1 & 1 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 2 & 1 & 0 \\ 2 & 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 & 2 & 1 & 1 \\ 0 & 1 & 0 & 0 & 0 & 0 & 1 & 2 & 0 & 1 & 0 & 1 \\ 1 & 1 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 \\ 2 & 1 & 2 & 1 & 1 & 1 & 1 & 0 & 1 & 2 & 0 & 0 \\ 1 & 2 & 0 & 1 & 0 & 1 & 2 & 1 & 1 & 1 & 1 & 0 \\ \end{array} \right).$$

In this particular case, the normalizing factor of $1/18$ is not important since all teams played 18 league games, but it's generally important in an NCAA wide example. The rows and columns are indexed by the teams in the conference in the order that they appear in the above list. Thus, the $2$ in row four and column two appears because Michigan State beat Indiana twice. The dominant eigenvector of $A$ has entries

1. 0.221
2. 0.248
3. 0.277
4. 0.331
5. 0.478
6. 0.234
7. 0.169
8. 0.303
9. 0.186
10. 0.150
11. 0.365
12. 0.326

The largest of these is $0.478$ corresponding to the awful fact that Michigan had the best record in the Big Ten this year. The complete rankings are

1. Michigan
2. Wisconsin
3. Michigan State
5. Ohio State
6. Iowa
7. Indiana
8. Minnesota
9. Illinois
10. Penn State
11. Northwestern
12. Purdue

Of course, we might get more (better?) information by expanding our field. A crawl through ncaa.org produced $11585$ games played by $1085$ teams in various divisions. (There are only 351 division 1 schools.) Here are the top twenty teams based on this technique.

1. Arizona
2. Wisconsin
3. Kansas
4. Villanova
5. Syracuse
6. Michigan
7. Florida
8. Creighton
9. Michigan State
10. Iowa State
11. Wichita State
12. Duke
13. Gonzaga
14. Ohio State
15. Oregon
16. UCLA
17. Oklahoma
18. Virginia
19. North Carolina
20. Arizona State

Note that Wisconsin ranks considerably above Michigan in this ranking. The complete ranking can be generated using Mathematica from the files in the original question as follows:

{games, teams} =
{rankings} = Eigenvectors[N[games], 1];
MapIndexed[Row[{#2[[1]], ". ", #1}] &,
Last /@ Reverse[teams[[Ordering[rankings]]]]] // Column


Update

Here are the 2015 top ten eigen-ranked teams, going into the NCAA tournament.

1. Kentucky
2. Villanova
3. Duke
4. Kansas
5. Wisconsin
6. Virginia
7. Notre Dame
8. Iowa State
9. Arizona
10. Maryland

And here's how the tournament would play out, based on those rankings: