The final standings in Group C of the 2010 World Cup were as follows: USA 5, England 5, Slovenia 4, Algeria 1.
Question: given this information, can we reconstruct the results of the individual games? Each team plays each other team once; they get three points for a win, one for a draw, zero for a loss.
First we can tell that USA and England must have had a win and two draws, each; Slovenia, a win, a draw, and a loss; Algeria, a draw and two losses. (In fact you can always reconstruct the number of wins, draws, and losses from the number of points, except in the case of three points, which can be a win and two losses, or three draws.)
Since neither USA nor England have a loss, they must have drawn. Similarly, Slovenia's win must have been against Algeria.
But now there are two possibilities; we have to break the symmetry between USA and England. Let's say, arbitrarily, that USA drew against Slovenia and defeated Algeria, instead of the other way around. (This is, in fact, what happened.) Then Algeria's draw must have been against England, and England's win against Slovenia.
In an alternate universe where USA and England switch roles (does this mean that England was a USA colony in this universe?) USA defeated Slovenia and drew against Algeria, and England draws against Slovenia and defeats Algeria.
Of course, the next question is: given the goal differentials (+1 for USA and England, 0 for Slovenia, -2 for Algeria), can we figure out the margins in the various games? (Assume we know which of the two universes above we're in; for the sake of avoiding cognitive dissonance, say we're in the first one.) Since Algeria was only defeated by a total of two goals, the margin in each of their losses must have been 1. And the margin in the Slovenian win (to Algeria) and loss (to England) must have been the same, namely 1.
If you in addition are given the total number of goals scored (USA 4, Slovenia 3, England 2, Algeria 0) you can reconstruct the scores of each match. I leave this as an exercise for the reader. Hint: start with Algeria.
Another question: is it the "usual case" that individual match results can be recovered from the final standings, or is this unusual? The table of standings in a group in the World Cup has something like thirteen degrees of freedom. Given the number of wins and draws, goals scored, and goals against for three of the teams, we can find the number of losses and goal differential for each team, the number of wins, draws and losses for the fourth team, and the goal differential of the fourth team. We need one more piece of information - say, the number of goals scored by that fourth team - to reconstruct the whole table. We're trying to derive twelve numbers from this (the number of goals scored by each team in each match). It will be close.
In an n-team round robin, the number of degrees of freedom in the table of standings grows linearly with n, but the number of games grows quadratically with n. For large n it would be impossible to do this reconstruction; for n=1 it would be trivial.
Showing posts with label sports. Show all posts
Showing posts with label sports. Show all posts
23 June 2010
17 May 2010
Innumeracy and the NBA draft lottery
I don't really know much about basketball. But this New York Times article suggests that the first pick in the NBA lottery might not be worth much this year, and then goes on to say:
Here's how the NBA draft lottery works. In short: there are thirty teams in the NBA. Sixteen makes the playoff. The other fourteen are entered in the draft lottery. Fourteen ping-pong balls (it's a coincidence that the numbers are the same) are placed in a tumbler. There are 1001 ways to pick four balls from fourteen. Of these, 1000 are assigned to the various teams; the worse teams are assigned more combinations. 250 are assigned to the worst team, 199 to the second-worst team, "and so on". (It's not clear to me where the numbers come from.)
Then four balls are picked. The team that this set corresponds to gets the first pick in the draft. Those balls are replaced; another set is picked, and this team (assuming it's not the team already picked) gets the second pick. This process is repeated to determine the team with the third pick. At this point there's an arbitrary cutoff; the 4th through 14th picks are assigned to the eleven unassigned teams, from worst to best. The reason for this method seems to be so that all the lottery teams have some chance of getting one of the first three picks, but no team does much worse than would be expected from its record; if the worst team got the 14th pick they wouldn't be happy.
So the probability that the team with the worst record wins the lottery is one in four, by construction; this "history suggests" is meaningless. (And the article even mentions the 25 percent probability!) This isn't like situations within the game itself where the probabilities can't be derived from first principles and have to be worked out from observation.
Also, let's say we continued iterating this process to pick the order of all the lottery teams. How would one expect the order of draft picks to compare to the order of finish in the league? I don't know off the top of my head.
But history suggests that he [Rod Thorn, president of the New Jersey Nets] will not have that decision to make. Since 1994, the team with the worst record has won the lottery only once — Orlando in 2004.
Here's how the NBA draft lottery works. In short: there are thirty teams in the NBA. Sixteen makes the playoff. The other fourteen are entered in the draft lottery. Fourteen ping-pong balls (it's a coincidence that the numbers are the same) are placed in a tumbler. There are 1001 ways to pick four balls from fourteen. Of these, 1000 are assigned to the various teams; the worse teams are assigned more combinations. 250 are assigned to the worst team, 199 to the second-worst team, "and so on". (It's not clear to me where the numbers come from.)
Then four balls are picked. The team that this set corresponds to gets the first pick in the draft. Those balls are replaced; another set is picked, and this team (assuming it's not the team already picked) gets the second pick. This process is repeated to determine the team with the third pick. At this point there's an arbitrary cutoff; the 4th through 14th picks are assigned to the eleven unassigned teams, from worst to best. The reason for this method seems to be so that all the lottery teams have some chance of getting one of the first three picks, but no team does much worse than would be expected from its record; if the worst team got the 14th pick they wouldn't be happy.
So the probability that the team with the worst record wins the lottery is one in four, by construction; this "history suggests" is meaningless. (And the article even mentions the 25 percent probability!) This isn't like situations within the game itself where the probabilities can't be derived from first principles and have to be worked out from observation.
Also, let's say we continued iterating this process to pick the order of all the lottery teams. How would one expect the order of draft picks to compare to the order of finish in the league? I don't know off the top of my head.
18 March 2010
March Math Madness
From quomodocumque: what would the NCAA tournament look like if every game were won by the college or university with the better math department? (Berkeley -- excuse me, "California", as they're usually called in athletic contexts -- wins.)
Rather interestingly, 20 out of 32 first-round "games", and 37 out of 63 "games" overall -- more than half -- are won by the team that actually has the better seed in the basketball tournament. I suspect this is because quality of math departments and basketball teams are both correlated with the size of the school. This is especially true because ties were broken by asking how many people they could name at the school., which clearly has a bias towards larger departments.
Rather interestingly, 20 out of 32 first-round "games", and 37 out of 63 "games" overall -- more than half -- are won by the team that actually has the better seed in the basketball tournament. I suspect this is because quality of math departments and basketball teams are both correlated with the size of the school. This is especially true because ties were broken by asking how many people they could name at the school., which clearly has a bias towards larger departments.
02 September 2008
Randomness in football
California high school's offensive scheme adds randomness to football. I know very little about football (I think we've established pretty well here that I'm a baseball fan) but it's an interesting idea. Basically, this team runs a wider variety of plays than many teams, making them less predictable.
I'm not sure if they mean "randomness" in the sense that I would hope, though. First a team would determine a mixed strategy for what plays it should run, based on how they expect the opponents would be able to defend against those plays. Then they should just let a random number generator programmed with that strategy call the plays. If it works for diplomats and terrorists, why not football?
(And why not baseball, for that matter. In fact, there are less plays possible at any given juncture of a baseball game than at any given juncture of a football game, I think, so it would probably be easier to do this in baseball.)
I'm not sure if they mean "randomness" in the sense that I would hope, though. First a team would determine a mixed strategy for what plays it should run, based on how they expect the opponents would be able to defend against those plays. Then they should just let a random number generator programmed with that strategy call the plays. If it works for diplomats and terrorists, why not football?
(And why not baseball, for that matter. In fact, there are less plays possible at any given juncture of a baseball game than at any given juncture of a football game, I think, so it would probably be easier to do this in baseball.)
19 August 2008
Trying to explain the Olympic gymnastics tiebreaker
Nastia Liukin of the USA wins silver on the uneven bars; He Kexin of China wins gold. This is news because the two of them had the same score. I've seen a lot of bad explanations of how the tiebreaker works, and implications that it involves some Big Scary Mathematics.
The way gymnastics scoring currently works is that each contestant receives a score for the difficulty of their routine (I think this is open-ended), called the "A score", which is essentially the sum of the difficulties of the various things they attempted to do. Then six judges give a score out of 10, in multiples of 0.1, for how well they did it; the lowest and highest scores are thrown out and the other four are averaged, and this is the "B score". The two scores are added to give the score for that routine.
Both Liukin and He received 16.725 points -- so they're tied, right? Wrong. The first tiebreaker, in this case, is that the contestant who had the higher A score wins -- which rewards the contestant that attempts a more difficult routine. But both had A score 7.700, B score 9.025.
The impression I got (watching NBC's broadcast last night) is that if there's still a tie, then the B scores given by the four middle judges are looked at individually. In this case, for He the six judges gave 9.3, 9.1, 9.1, 9.0, 8.9, 8.9; for Liukin they were 9.3, 9.1, 9.0, 9.0, 9.0, 8.8. In both cases the middle four scores add up to 36.1. The lowest of these scores (so the second-lowest of the original scores) is thrown out. This leaves 27.2 for He, 27.1 for Liukin, so He wins. See the tiebreaker page at the official Beijing Olympics site; there's no explanation here, but he various numbers shown there seem to bear it out. Note that instead of reporting a score of x, they sometimes use 10-x, which is the number of points deducted from the highest possible B score, which is 10.0. This explains the phrasing in some sources that refers to an "average of deductions".
I'm not sure what the logic behind this is. At first I thought that it rewarded inconsistency -- the competitor who has their scores more tightly clustered will probably have a higher second-lowest score. But this isn't the right interpretation, because the scores weren't received on different routines, but on different people's measurements of the same routine -- so does the tiebreaker reward having a routine which is hard to score? Also, it was stated many times that there are no ties in the current scoring system, but what would have happened had He and Liukin received identical scores from each judge?
The math here isn't that hard; I think the big flaw was that nobody seemed to know what the rules were.
The way gymnastics scoring currently works is that each contestant receives a score for the difficulty of their routine (I think this is open-ended), called the "A score", which is essentially the sum of the difficulties of the various things they attempted to do. Then six judges give a score out of 10, in multiples of 0.1, for how well they did it; the lowest and highest scores are thrown out and the other four are averaged, and this is the "B score". The two scores are added to give the score for that routine.
Both Liukin and He received 16.725 points -- so they're tied, right? Wrong. The first tiebreaker, in this case, is that the contestant who had the higher A score wins -- which rewards the contestant that attempts a more difficult routine. But both had A score 7.700, B score 9.025.
The impression I got (watching NBC's broadcast last night) is that if there's still a tie, then the B scores given by the four middle judges are looked at individually. In this case, for He the six judges gave 9.3, 9.1, 9.1, 9.0, 8.9, 8.9; for Liukin they were 9.3, 9.1, 9.0, 9.0, 9.0, 8.8. In both cases the middle four scores add up to 36.1. The lowest of these scores (so the second-lowest of the original scores) is thrown out. This leaves 27.2 for He, 27.1 for Liukin, so He wins. See the tiebreaker page at the official Beijing Olympics site; there's no explanation here, but he various numbers shown there seem to bear it out. Note that instead of reporting a score of x, they sometimes use 10-x, which is the number of points deducted from the highest possible B score, which is 10.0. This explains the phrasing in some sources that refers to an "average of deductions".
I'm not sure what the logic behind this is. At first I thought that it rewarded inconsistency -- the competitor who has their scores more tightly clustered will probably have a higher second-lowest score. But this isn't the right interpretation, because the scores weren't received on different routines, but on different people's measurements of the same routine -- so does the tiebreaker reward having a routine which is hard to score? Also, it was stated many times that there are no ties in the current scoring system, but what would have happened had He and Liukin received identical scores from each judge?
The math here isn't that hard; I think the big flaw was that nobody seemed to know what the rules were.
18 June 2008
The probability of making a putt
I don't know much about golf. Basically I know the following things:
Anyway, Tiger Woods won the U. S. Open, and Ian Ayres, guest-blogging at Freakonomics asks why golf commentators don't give the probability that a putt from distance x will go in. Commentators in just about every other sport do; Ayres' example is free-throw percentage in basketball, mine would have been batting average in baseball.
Ayres then gives a plot showing the success rate of golf putts as a function of difference from the hole, taken from this paper. Not all that surprisingly, the probability of making a putt from distance x scales like 1/x; essentially you can assume that the angular error in putting doesn't change as the distance of the putt increases. But the apparent size of the target is smaller at longer distances. Basically, from twice as far away the hole looks half as big.
It turns out that's what Andrew Gelman and Deborah Nolan thought, too. (Andrew Gelman and Deborah Nolan, "A Probability Model For Golf Putting", Teaching Statistics, Volume 24, Number 3, Autumn 2002. (This is the source for Ayres' figure.)) Their actual model is a bit more complicated, because they actually do the trigonometry correctly, and they assume that errors in putting are normally distributed while I'm assuming they're uniform. Read it, it's two and a half pages.) This fixes the problem that my crude model would have. At five feet, pros make 59 percent of their putts; thus it would predict that at two and a half feet, they make 118 percent!
The result of Gelman and Nolan is that the probability of the success of a putt from distance x is
where R, r are the radii of the ball and the hole; 2R = 4.25 inches and 2r = 1.68 inches. σ is the standard deviation of the angular error of a shot (in radians), which can be found from empirical data to be 0.026 (about 1.5 degrees). Φ is the standard normal distribution.
If you assume that x is large enough that (R-r)/x is small enough that we can make the small angle approximation arcsin x ≈ x, then this becomes 2Φ((R-r)/(σ x)) - 1. But Φ(z) is linear near z = 0, with Φ(0) = 1/2 and Φ'(0) = 1/(2π)1/2. So the probability of succeeding from distance x, for large x, is approximately

R-r is 1.285 inches, or .10708 feet.
So we get that the probability of making a putt from distance x, in the limit of large x, is about (3.29 feet)/x, although this is really only a good approximation above x = 6 feet or so. This has the advantage of being easy to remember -- well, somewhat easy, because you still have to remember the constant. But if you measure in meters, there are 3.28 feet in a meter, so the constant is basically 1; clearly golf should be done in metric.
Incidentally, I think it's a good idea to put citations that at least include the author and title in blog posts, even though strictly speaking they're not necessary as pointers if a link is provided. Why? Because that makes it more likely that people who Google the paper's title or authors find the people talking about it. (Occasionally I've recieved comments from self-Googling authors.)
- you try to get the ball in the hole;
- scoring works by counting the number of times you hit the ball with the club; lower scores are better;
- "par" is really good, not average.
Anyway, Tiger Woods won the U. S. Open, and Ian Ayres, guest-blogging at Freakonomics asks why golf commentators don't give the probability that a putt from distance x will go in. Commentators in just about every other sport do; Ayres' example is free-throw percentage in basketball, mine would have been batting average in baseball.
Ayres then gives a plot showing the success rate of golf putts as a function of difference from the hole, taken from this paper. Not all that surprisingly, the probability of making a putt from distance x scales like 1/x; essentially you can assume that the angular error in putting doesn't change as the distance of the putt increases. But the apparent size of the target is smaller at longer distances. Basically, from twice as far away the hole looks half as big.
It turns out that's what Andrew Gelman and Deborah Nolan thought, too. (Andrew Gelman and Deborah Nolan, "A Probability Model For Golf Putting", Teaching Statistics, Volume 24, Number 3, Autumn 2002. (This is the source for Ayres' figure.)) Their actual model is a bit more complicated, because they actually do the trigonometry correctly, and they assume that errors in putting are normally distributed while I'm assuming they're uniform. Read it, it's two and a half pages.) This fixes the problem that my crude model would have. At five feet, pros make 59 percent of their putts; thus it would predict that at two and a half feet, they make 118 percent!
The result of Gelman and Nolan is that the probability of the success of a putt from distance x is
where R, r are the radii of the ball and the hole; 2R = 4.25 inches and 2r = 1.68 inches. σ is the standard deviation of the angular error of a shot (in radians), which can be found from empirical data to be 0.026 (about 1.5 degrees). Φ is the standard normal distribution.
If you assume that x is large enough that (R-r)/x is small enough that we can make the small angle approximation arcsin x ≈ x, then this becomes 2Φ((R-r)/(σ x)) - 1. But Φ(z) is linear near z = 0, with Φ(0) = 1/2 and Φ'(0) = 1/(2π)1/2. So the probability of succeeding from distance x, for large x, is approximately
R-r is 1.285 inches, or .10708 feet.
So we get that the probability of making a putt from distance x, in the limit of large x, is about (3.29 feet)/x, although this is really only a good approximation above x = 6 feet or so. This has the advantage of being easy to remember -- well, somewhat easy, because you still have to remember the constant. But if you measure in meters, there are 3.28 feet in a meter, so the constant is basically 1; clearly golf should be done in metric.
Incidentally, I think it's a good idea to put citations that at least include the author and title in blog posts, even though strictly speaking they're not necessary as pointers if a link is provided. Why? Because that makes it more likely that people who Google the paper's title or authors find the people talking about it. (Occasionally I've recieved comments from self-Googling authors.)
25 March 2008
March Madness upsets
So it's that time of year when March Madness, the NCAA's 65-team college basketball tournament, happens. Lots of betting on this tournament takes place; this usually takes the form of filling out a bracket, and then entering a pool with one's friends where the person who has the "most correct" bracket is the winner. (I suspect most of my US readers are aware of this, but I have lots of non-US readers.) "Most correct" is usually judged by who named the winners of the most games correctly, with some sort of weighting that counts naming the correct winners of later games in the tournament more heavily.
The teams are divided into four groups of sixteen (there are 65 teams, because the two weakest teams in the field play a single game to get things started), and the teams in each group of sixteen are "seeded" 1, 2, ..., 16, with 1 being the perceived best team and 16 being the worst. In the first round of the tournament the #1 team plays the #16 team, the #2 team plays the #15 team, ..., the #8 team plays the #9 team in each group of 16.
One often hears that, say, teams seeded 10 or 11 routinely beat teams seeded 7 or 6, respectively. Fair enough. But therefore it's often claimed that in filling out a bracket one should pick one of those #10 or #11 seeds to win. Not so! Sure, in the average tournament one #10 seed (out of four) might win. But which one?
This is an example of the more general principle that given large enough samples, some rare event will happen... but which one? That's not at all obvious.
Also, Bill James (of baseball analysis fame) wrote an article on when the lead in a college basketball game is safe. Basically, a lead of N points is "safe" if the time in the game remaining is less than kN2 for some constant k; this is what one would expect if scoring can be modeled as a random walk, which seems reasonable.
And you've got to love this quote:
As you may have guessed from this post, and the somewhaht desultory nature of the sports content, I'm not really a big basketball fan. But the Red Sox and the A's played a regular-season game this morning in Tokyo. And I've got Phillies tickets for next week.
The teams are divided into four groups of sixteen (there are 65 teams, because the two weakest teams in the field play a single game to get things started), and the teams in each group of sixteen are "seeded" 1, 2, ..., 16, with 1 being the perceived best team and 16 being the worst. In the first round of the tournament the #1 team plays the #16 team, the #2 team plays the #15 team, ..., the #8 team plays the #9 team in each group of 16.
One often hears that, say, teams seeded 10 or 11 routinely beat teams seeded 7 or 6, respectively. Fair enough. But therefore it's often claimed that in filling out a bracket one should pick one of those #10 or #11 seeds to win. Not so! Sure, in the average tournament one #10 seed (out of four) might win. But which one?
This is an example of the more general principle that given large enough samples, some rare event will happen... but which one? That's not at all obvious.
Also, Bill James (of baseball analysis fame) wrote an article on when the lead in a college basketball game is safe. Basically, a lead of N points is "safe" if the time in the game remaining is less than kN2 for some constant k; this is what one would expect if scoring can be modeled as a random walk, which seems reasonable.
And you've got to love this quote:
A heuristic could be loosely defined as a mathematical rule that works even though no licensed mathematician would be caught dead associating with it.
As you may have guessed from this post, and the somewhaht desultory nature of the sports content, I'm not really a big basketball fan. But the Red Sox and the A's played a regular-season game this morning in Tokyo. And I've got Phillies tickets for next week.
01 February 2008
Sometimes crowds are stupid.
Chad Orzel of uncertain principles reminds us that "The 'point spread' for a football game is set at the level required to get equal numbers of bets on the two teams." Furthermore this is not the consensus of "experts". And since gambling serves as a form of entertainment for a lot of people, there are probably a lot of people that bet on the team they like, not the team they think will beat the spread. So you can't even say that the "wisdom of crowds" applies in situations like this. Sometimes crowds are stupid, especially when they have an emotional stake in the matter. (And not just in sports betting! Consider the current housing bubble, or the dot-com bubble.)
And it's not entirely clear that bookies even always act in the way Orzel says they do; they act to maximize their expected profits, which turns out to not be the same. (See Steve Levitt's paper for more detail.) Not surprisingly, this means there's a winning strategy for betting on football, or at least it looks like there is -- bet on home underdogs, or so Levitt says. (They tend to be undervalued.) I'd do it, but I'm pretty risk-averse when it comes to my own actual money, as opposed to other people's expected-value money.
And it's not entirely clear that bookies even always act in the way Orzel says they do; they act to maximize their expected profits, which turns out to not be the same. (See Steve Levitt's paper for more detail.) Not surprisingly, this means there's a winning strategy for betting on football, or at least it looks like there is -- bet on home underdogs, or so Levitt says. (They tend to be undervalued.) I'd do it, but I'm pretty risk-averse when it comes to my own actual money, as opposed to other people's expected-value money.
11 December 2007
Why don't sports teams use randomization?
Why don't sports teams use randomization?, a guest post by Ian Ayres at Freakonomics. It's well-known that the best strategy in a lot of game-theoretic situations is to choose at random what you'll do at each encounter, where the appropriate probabilities can be calculated. (A sports example would be a pitcher choosing what sort of pitch to make, and a batter deciding whether to swing or not.) So why doesn't anybody (so far as we know) use a random number generator to call pitches?
Although this doesn't seem to be brought up in the comments there (at least not yet), I suspect that the reason for this is that sports people are for the most part resistant to change. But more importantly, they have to answer to the media. And when your closer throws a pitch down the middle of the plate and it gets hit out of the park, and you lose, do you really want to explain to the news people that a random number generator told you to do that? There is no other line of work I can think of where it would be quite so obvious which decision led to the bad outcome; more importantly, there is no other line of work with call-in radio shows devoted to dissecting everything that happens.
Although this doesn't seem to be brought up in the comments there (at least not yet), I suspect that the reason for this is that sports people are for the most part resistant to change. But more importantly, they have to answer to the media. And when your closer throws a pitch down the middle of the plate and it gets hit out of the park, and you lose, do you really want to explain to the news people that a random number generator told you to do that? There is no other line of work I can think of where it would be quite so obvious which decision led to the bad outcome; more importantly, there is no other line of work with call-in radio shows devoted to dissecting everything that happens.
Subscribe to:
Posts (Atom)