Showing posts with label URNBALL. Show all posts
Showing posts with label URNBALL. Show all posts

Wednesday, March 26, 2014

Hypersensitive Probabilities

There's been a lot of talk about Tennessee and their bewilderingly high tempo-free rating, a rating so confusing that Ken Pomeroy wrote a column trying to explain it. To summarize, Tennessee is CHAOSTEAM: they throw a wrench into the ranking system by consistently winning by a lot and losing by a little. That's how a 12-loss team can have a Pythagorean rating of 91.61%.

A team's Pythagorean rating is an estimate of the probability of the team defeating an average team. In Division I in 2013-14, the teams that rate out as most average are Holy Cross, a good team from a weak conference, and USC, a bad team from a power conference. If you have the Pythagorean ratings for two teams, A and B, you can calculate the probability that Team A defeats Team B using the log5 formula rediscovered by Bill James:


In words, the log5 formula states that the odds in favor of Team A beating Team B are equal to the odds in favor of Team A beating an average team times the odds in favor of an average team beating Team B. This formula is equivalent to the Elo chess rating system and several formal statistical models. If we apply the log5 formula to the Tennessee-Michigan game, we input Tennessee's Pythagorean rating of 91.61% and Michigan's rating of 90.32% and find that the probability of Tennessee winning the game is about 55%.

However, a lot of people are looking askance at these Pythagorean ratings as it just doesn't seem right that a 24-12 team from the weakest of the power conferences should be the #6 team in the country. Tennessee has been extremely unlucky according to kenpom: they rank 337th out of 351 with a luck score of -0.86. Among major conference teams, only Iowa and Oklahoma State have been unluckier.

The word "luck" is a misnomer here as it implies that deviations from the model are due to random chance. For all but the simplest of phenomena, errors in a statistical model are a combination of both random chance and systemic error. No existing model has captured effects like the B Factor - these effects are not necessary intangible, but they aren't captured by the models and are part of the reason that predictions can go awry.

Let's look at the Final Four probabilities for the Midwest Regional and suppose that some percentage of a team's luck is a real, systemic, deviation from their calculated Pythagorean rating. If luck is completely transitory, then Louisville is the clear favorite with a 46% chance of making it to Dallas, followed by Tennessee, Michigan, and then Kentucky.

The ratings and luck for the four teams are:

            Pyth  Luck
Louisville .9543 -.034
Tennessee  .9161 -.086
Michigan   .9032  .054
Kentucky   .8986 -.043

Of these four teams, only Michigan has had positive luck this year. If some of this luck is a real effect, how does luck effect the probability of going to the Final Four? Introduce a luck factor that can vary from 0 to 1, and suppose that each team's actual rating is Pyth+Luck*(luck factor). As the effect of luck (or uncertainty) increases, the chances of making the Final Four change a great deal:
You only need to believe that 10% of that luck is a real systemic error for Tennessee and Michigan to be at even odds. If you're willing to accept that even more luck is real, you can increase the chances of Michigan making the Final Four from 17% to 57%!

The issue is that probabilities computed using log5 become very sensitive when each team has a very high Pythagorean rating. This isn't a huge problem in baseball, where teams almost never win less than 30% or more than 70% of their games. But this does cause a problem when calculating the win probabilities between very good teams. Slight changes in the Pythagorean ratings can result in big changes in the log5 output.

For comparison, let's turn the four teams in the Midwest Regional into average teams by subtracting 0.4 from their Pythagorean ratings. I've changed the team names to average teams with similar tempo-free numbers:

                Pyth  Luck
Boston College .5543 -.034
Santa Clara    .5161 -.086
Holy Cross     .5032  .054
Brown          .4986 -.043

When the teams are close to average, the log5 probabilities are far less sensitive to changes in the Pythagorean ratings. Holy Cross, as the only lucky team, sees its win probability increase from 23% to 35% as we increase the role of luck, but this is far less than the 40% swing we saw with Michigan. The probabilities for Boston College and Brown decrease only slightly, while Santa Clara, the unluckiest team of all, has its probability of winning two games decrease by 10%.

Most statistical models are far better at predicting the behavior of the average or typical subjects and far weaker at predicting how outliers will behave. Now that we've reached the Sweet Sixteen, it turns out that tempo-free stats are no different: the probability that a given team will make the final four is very sensitive to the precise value of the Pythagorean rating, to the point where these ratings can really only give a rough estimate of win probability with very large error bars.

Or, to put things even more simply: I am incapable of predicting what's going to happen in the Sweet Sixteen because no one can predict what's going to happen with a high degree of confidence. The probabilities are just too sensitive to underlying uncertainties and systemic errors. Being uncertain about the outcome makes sports fun. Also terrifying, but fun.

Tuesday, March 18, 2014

Tempo-Free Hate 2013-2014: Bo Ryan's Revenge!

Last year, between the Ohio and Wisconsin games, we spent the time wondering why do we all hate Aaron Craft so much? To answer this question, we proposed the Four Factors of Hate, and used these factors to find the Big Ten leaders in Tempo-Free Hate. This year, the question of why we all hate Aaron Craft was answered once and for all when Doug Gottlieb blamed this on the ball being too slippery:

GIF by Timothy Burke (@bubbaprog)
Even though unwarranted media attention and apologia are good reasons to be annoyed by a player, the Four Factors of Hate try to quantify just what makes a player so annoying using only the stats on the floor. The four factors are:
  • Steals per personal foul (ST/PF). Also known as handchecking ability, or Craftiness.
  • Ability to draw fouls (Free Throw Attempts/(Minutes Played * Usage %)).  Jordan Morgan is not as bad at this as you think.
  • Three-Point Specialization (3FG/FG). The "Just A Shooter" Award.
  • Free Throw Percentage (FT%). For those annoying players who just Win The Game. Since all players are supposed to be able to shoot free throws reasonably well FT% only counts half as much as the other three.
All stats come from Sports Reference College Basketball, except for team adjusted tempo, which is pulled from the front page at kenpom. Who is the most annoying player in the Big Ten? Find out after the jump!

Saturday, February 09, 2013

Aaron Craft and the Four Factors of Hate

While thinking about Tuesday's game against Ohio State, I was struck like I walked through a plate-glass window by the observation that, although Deshaun Thomas is clearly OSU's most valuable player, Michigan fans didn't experience massive schadenfreude in seeing him lose. Instead, we were filled with glee to see Aaron Craft lying on the floor in defeat. Part of the reason I find Craft so annoying is that he's the beneficiary and victim of Ecksteinism, or "scrappy white guy media affection." Another part of the reason is that his aggressive defense always makes you wonder, "How on earth was that not a foul?"

I'm not going to try and quantify media overexposure in this post. What I'm going to try to do here is use nothing but freely-avaiable statistics to try and predict which players in Big Ten men's basketball inspire the most hatred in opposing fanbases solely by the way they play. I downloaded data for all Big Ten men's players this season, including conference and non-conference games through February 7, and then eliminated the players who haven't seen the court for at least 100 minutes. This left a dataset of 113 players for which I attempted to determine "The Four Factors of Hate."

The first factor I came up, inspired by Craft, is steals per personal foul. There are two kinds of players who can rack up the steals and not the fouls: the player who never gets whistled for overaggressive defense and the player who is actually really good at stealing the ball. Both of those players will drive you crazy when there's on the other team. Here's the leaderboard for ST/PF:

RankPlayerTeamST/PF
1Tim FrazierPSU1.125
2Austin HollinsMINN1.023
3Branden DawsonMSU1.000
4Victor OlapidoIND0.931
5Aaron CraftOSU0.860
6Shannon ScottOSU0.857
7Julian WelchMINN0.818
8D.J. RichardsonILL0.809
9TJosh OglesbyIOWA0.800
9TJoe ColemanMINN0.800

The second factor is the ability to draw fouls. Sports Reference College Basketball doesn't have this listed as a stat, so I estimated it with the formula ADF = Free Throw Attempts/(Minutes Played * Usage %). This stat favors the frontcourt, with centers and forwards occupying eight of the top nine spots. Two factors in and it's clear Penn State really misses Tim Frazier.

RankPlayerTeamADF
1Amir WilliamsOSU1.268
2Aaron WhiteIOWA1.080
3Tim FrazierPSU1.020
4Cody ZellerIND1.006
5Trevor MbakweMINN0.972
6Andre IngramMINN0.894
7Abodunrin Gabriel OlaseniIOWA0.861
8Maurice WalkerMINN0.852
9Melsahn BasabeIOWA0.801
10Pat IngramIOWA0.793

The third factor measures three-point specialization: it's the fraction of made field goals that are three-pointers, of 3FG/FG. A whopping 92% of Penn State's Nick Colella's made shots are from outside the arc, almost 14% more that #2 Josh Oglesby.

RankPlayerTeam3FG/FG
1Nick ColellaPSU0.920
2Josh OglesbyIOWA0.784
3TKale AbrahamsonNU0.733
3TTravis TriceMSU0.733
5Maurice CreekIND0.727
6D.J. ByrdPUR0.712
7George MarshallWISC0.700
8Jordan HullsIND0.667
9Nik StauskasMICH0.624
10Maverick AhamnisiMINN0.600

After the jump, read about the fourth factor and see the leaderboards of hate.

Thursday, November 29, 2012

A golden flash of stupidity

(Post has been edited and updated in response to Sam Ed Feng's comments. Unnecessary profanity has been removed and/or replaced with red text. Also see below. Whether the title of this post refers to me, Ed, or Wesley Colley is for you to decide.)

So I woke up this morning and got on the Internet, looking for the outcome of the ohio-Duke game  -- I was, like all good-hearted people, rooting for both to lose so that Michigan could be ranked #2 -- when I was blindsided by an act of reading comprehension and statistical innumeracy so massive that I completely forgot what I was doing and said, "I must write a blog post to address this folly!"

I am not familiar with Ed Feng's work at thepowerrank.com, so I do not know if his reputation is good or bad. However, in science as in life, reputation should be irrelevant: if you're spouting B.S., you should expect to get called on your B.S. no matter what your track record is. Feng's attack on the Colley Matrix is so incorrect that it ranks as a sub-Bleacher Report level trolling of Matt Sussman, the state of Oklahoma, and statisticians everywhere. It convinced Stewart Mandel, of course.

In his article, Feng writes:
However, the Colley Matrix, the one fully transparent computer poll, does not use this game-specific information. The system considers a team's win-loss record and strength of schedule; yet, the results of each individual game are not counted as an input. The method doesn't care whether Kent State's loss came against Kentucky or against Rutgers.
This is incorrect. Competely and utterly incorrect. The Colley Matrix does use game-specific information: it takes as its input solely the record of who won or who lost each game. It doesn't take into account whether that game was home, away, or at a neutral site. It doesn't take into account margin of victory and wouldn't even if it were allowed. It doesn't take into account team reputation, hence Colley's referring to the method as "bias-free." All of this information is freely available in the PDF document Wesley Colley provides explaining his method, which Feng either didn't read or didn't understand (Edit: uncalled-for.) For example, the input to the Colley Matrix for the Big Ten conference play would be:


A 1 in your row means you won the game, a -1 means you lost, and a 0 means you didn't play this year. If Illinois has beaten Indiana instead of vice versa, then the -1 in Row 1, Column 2 would become a 1 and the 1 in Row 2, Column 1 would become a -1. Encoded slightly differently, this is the input the Colley Matrix uses. It takes into account the outcome of each game; what Feng wrote was 100%, absolutely, positively, wrong, and SI.com should issue a retraction or correction.

The source of Feng's outrage is the Colley Matrix's "play god" feature. If you edit the rankings by assuming that Kent State lost to Rutgers and beat Kentucky instead of the other way around, Kent State ends up ranked #17 instead of #16. Let's go to the chart:

Seriously, Dr. Colley, hire someone to redesign your web page.

If we change Kent State's loss to Kentucky to a loss to Rutgers, Kent State drops a spot in the rankings because Rutgers didn't lose to Kent State and is thus ranked higher! The only other change is the Top 25 is that South Carolina and LSU flip, which happens because Skarlina's win over Kentucky would count for less if Kentucky hadn't beaten Kent State.

Feng was full of outrage because he couldn't even be fucking bothered to look at the rightmost column of the chart. The actual raw rating for Kent State is 0.766. In the hypothetical situation, Kent State's raw rating INCREASES to 0.768. This is exactly in line with common sense. If you take away both a good win and a bad loss from a team's record, their rating doesn't change much.

The switch of the outcome of the Kent State-Kentucky game is nothing more than a distraction, sort of the college football equivalent of Bertrand's box paradox. If the only change you make is that Rutgers beats Kent State, then Rutgers is ranked #16 and Kent State is ranked #25. That is, they switch positions as if the outcome of their match-up actually meant something.

(Edit: Mr. Feng's intentions are not in evidence in his article and it was inappropriate for me to cast aspersions on them. I apologize to Mr. Feng.)
Sam Feng's article is a perfect example of anti-science. He started with the conclusion he wanted -- Kent State shouldn't make the BCS -- and cherry-picked data in order to make his point. He ignored all the data that demonstrated he was full of shit, and owes Dr. Colley an apology for misrepresenting his work.

However, this is not to say that I am a fan of the Colley Matrix. While the statistical methodology is sound, the underlying non-mathematical assumptions about football are inane. Colley is proud of the fact that, in his rankings, "score margin does not matter at all" and writes:
Ignoring margin of victory eliminates the need for ad hoc score deflation methods and home/away adjustments. If you have to go to great lengths to deflate scores, why use scores?
You should use scores because they provide more information about the quality of a team! Our post-season opinion of Michigan is based heavily on the fact that Alabama beat Michigan 41-14 and not 24-23. Based on that game, the Colley Matrix concludes only that Alabama was better than Michigan on that day, while the margin of victory tells us that Alabama was far better than Michigan that day. Colley's presentation of his rankings is anti-scientific: he is proud of the fact that he throws away useful information because he doesn't know how to incorporate it into his system.

In contrast, consider Nate Silver's acclaimed electoral prediction system. Silver knows that certain pollsters skew toward either Republicans or Democrats. Does he throw out their polls? No! He calculates, in a rational (not ad hoc) fashion the "house effect" of each poll and adjusts its margins accordingly. With access to full play-by-play data, there is no reason that a rational adjustment of margin of victory could not be applied for use in football rankings. With a little thought, a rational adjustment could not only not reward rolling up the score, but actually punish it as unsportsmanlike.

In summary, if you throw our data for no good reason, you're bad at statistics. I disapprove of Colley because I don't agree with his assumptions, but at least he puts them out for all the world to see. I disapprove of Feng because I don't know what the fuck he was doing, and I don't think he knows what the fuck he was doing either.

UPDATE (1:52 PM):

Ed Feng graciously replied in the comments and noted that the matrix shown above is not the Colley Matrix. This is correct but not germane to my point. The Colley Matrix C for the Big Ten regular season is:

The number 10 appears along the diagonal because the it is equal to the number of games played plus two. The -1 values off-diagonal indicate that the two opponents played.

The record for each team is converted into a vector, b, where, for each team, its corresponding element in b is equal to the 1 plus the 1/2 times (the number of wins - the number of losses).

Colley's ratings are the solution r to the matrix equation Cr = b. For this example, the solution is:

You should agree that Ohio State at #1 and Illinois at #12 makes a lot of sense.

Colley's method does not explicitly include the output of every game as individual wins and losses are collapsed into the vector b. This makes the method invariant to "circles of death," e.g., three teams that are 1-1 against each other. In the Big Ten this season, Iowa defeated MSU, MSU defeated Indiana, and Indiana defeated Iowa. If you change the outcome of all three of these games so that MSU beat Iowa, Indiana beat MSU, and Iowa defeated Indiana, then the vector b does not change and thus Colley's rankings do not change. This is not a bad feature for a ranking system based solely on wins and losses to have!

I stand by my statement that Feng's assertion that "[Colley's] method doesn't care whether Kent State's loss came against Kentucky or against Rutgers" is, in isolation, incorrect. I will add the following qualification though. There is a chain between the SEC, Big East and the MAC where:
  • Kent State lost to Kentucky
  • Kentucky lost to Louisville
  • Louisville lost to Connecticut
  • Connecticut lost to Rutgers
  • Rutgers lost to Kent State
If you were to reverse the outcome of all five of these games, Colley's method would produce the exact same ratings. In that sense, Colley's method does not "care" whether Kent State lost to Kentucky or Rutgers as part of a larger set of events that the method doesn't care about. It cares that either: a) Kent State lost to Kentucky but has a four-level win chain over Kentucky, or b) Kent State lost to Rutgers but has a four-level win chain over Rutgers, and treats the two situations equivalently. If you switch the outcomes of all five of the above games in Colley's what-if machine, then you get back the exact same ratings.

Feng's attack on the Colley Ratings, as posted on SI.com, is still very misleading because switching only KSU-Kentucky and Rutgers-KSU results in a perfectly reasonable change to the rankings, namely, Rutgers jumps ahead of KSU. A correction or clarification is still in order.

Wednesday, January 11, 2012

Fair-enheit 27-9

Warning: nuclear-grade nerddom follows.

People in 49 of the 50 United States, as well as the District of Columbia and Puerto Rico, seem to be grousing about the "unfairness" of the BCS system this week. Fortunately for everyone, my multiple graduate level courses in probability & statistics at Michigan taught me how to design a perfectly fair college football season. It's really easy! First, you make an infinite number of clones of all the players, and then have each set of clones play a 120-team round robin. Once everyone's done, we figure out which team had the largest average number of wins, and there ya go, there's your national champion! If two teams end up with the exact same average number of wins (an event that can occur, but with probability zero - that's the kind of silliness you deal with in graduate courses in probability), we can whip up two new batches of clones and have them play a championship game.

Of course this can't happen. If I could produce an infinite army of clones, they'd be divided between securing my benevolent dictatorship and playing far deadlier games than football for my amusement. But this is how probability works. Axiomatic probability theory is based on the understanding that if we play the same game multiple times, we'll end up with different outcomes, so we should figure out what would happen if we played the game an infinite number of times. The fact that this is the basic approach to the subject is why explaining probability and statistics to the Paul Finebaums and Michael Weinrebs of the world is a fool's errand. Don't even bother trying to explain it to people who can't even count to 85.

In theoretical computer science, there is a formal definition of fairness. Roughly, it says that if you visit a state x infinitely often, and an action a can occur from the state x, then a will occur infinitely often. In real life, we don't get to work with infinite amounts of time and space, so we can't design a system that's formally fair. Since we only get 12-14 games to work with, we'll have to make some compromises to be reasonably fair, like Tony Hoare suggested back in 1978.

Tony Hoare. Sounds like he should be a wide receiver for the Steelers.
Looks like the old British dude he is.