Advertise here with Carbon Ads

This site is made possible by member support. 💞

Big thanks to Arcustech for hosting the site and offering amazing tech support.

When you buy through links on kottke.org, I may earn an affiliate commission. Thanks for supporting the site!

kottke.org. home of fine hypertext products since 1998.

Beloved by 86.47% of the web.

🍔  💀  📸  😭  🕳️  🤠  🎬  🥔

kottke.org posts about statistics

Hacking the lottery

Jerry and Marge Selbee were a semi-retired couple in rural Michigan who ran a convenience store. Among their biggest sellers were lottery tickets. One day, Jerry realized that if you only played on certain “roll-down” days (when a four-out-of-six winner would get part of a five-out-of-six prize, and so on), the odds weren’t just better for players; they were positive. You just had to buy a lot of tickets.

Lottery terminals in convenience stores could print only 10 slips of paper at a time, with up to 10 lines of numbers on each slip (at $1 per line), which meant that if you wanted to bet $100,000 on Winfall, you had to stand at a machine for hours upon hours, waiting for the machine to print 10,000 tickets. Code in the purchase. Push the “Print” button. Wait at least a full minute for the 10 slips to emerge. Code in the next purchase. Hit “Print.” Wait again. Jerry and Marge knew all the convenience store owners in town, so no one gave them a hard time when they showed up in the morning to print tickets literally all day. If customers wondered why the unassuming couple had suddenly developed an obsession with gambling, they didn’t ask. Sometimes the tickets jammed, or the cartridges ran out of ink. “You just have to set there,” Jerry said.

The Selbees stacked their tickets in piles of $5,000, rubber-banded them into bundles and then, after a drawing, convened in their living room in front of the TV, sorting through tens or even hundreds of thousands of tickets, separating them into piles according to their value (zero correct numbers, two, three, four, five). Once they counted all the tickets, they counted them again, just to make sure they hadn’t missed anything. If Jerry had the remote, they’d watch golf or the History Channel, and if Marge had it, “House Hunters” on HGTV. “It looked extremely tedious and boring, but they didn’t view it that way,” recalled their daughter Dawn. “They trained their minds. Literally, they’d pick one up, look at it, put it down. Pick one up, put it down.” Dawn tried to help but couldn’t keep pace; for each ticket she completed, Jerry or Marge did 10.

Naturally, of course, the couple hits trouble when they shift their game to Massachusetts and bumps up against a group of MIT students who have the same idea. Hijinks ensue.

Fave · 0

New NBA stat: points per miss

A couple nights ago against the Oklahoma City Thunder, Dirk Nowitzki scored 48 points and only missed three shots, prompting Bill Simmons to wonder if that was some sort of record. Jerod from Midwest Sports Fans dug into how useful a stat like points per miss would be as a measure of efficiency.

What is interesting about the table above is that Dirk comes in ahead of Bird, Jordan, and so many others. Does this mean Dirk is a better player than Jordan or Bird? Of course not. But it does mean that he is as efficient a scorer as those two were, if not better. Scoring efficiency only tells one part of the story on one side of the floor, which is why PPM can only be considered a small piece of the puzzle when comparing players, but it is a good way to give one of the most unique scoring talents in NBA history his due.

Fave · 0

Bill Simmons on sabermetrics

Bill Simmons has finally accepted the gospel of sabermetrics as scripture and in a recent column, preaches the benefits of all these newfangled statistics to his followers. The list explaining his seven favorite statistics in down-to-earth language is really helpful to the stats newbie.

Measure BABIP to determine whether a pitcher or hitter had good luck or bad luck. In 2009, the major league BABIP average was .299. If a pitcher’s BABIP dipped well below that number, he might have had good luck. If it rose well above that number, he likely had terrible luck. The reverse goes for hitters.

(via djacobs, who has an extremely high VORF)

Fave · 0

Rating the pundits: 2009 NFL preseason predictions

How accurate are all those preseason predictions about how the coming NFL season will unfold?

ESPN Ranking OffsetsIn an effort to find out, I collected a number of preseason “team power rankings” two days before the 2009 NFL regular season started in September. These ranking lists are compiled by columnists and pundits from media outlets like Sports Illustrated, Fox Sports, The Sporting News, and ESPN. In addition, I collected a fan-voted ranking from Yahoo Sports and the preseason Vegas odds to win the Super Bowl. As a baseline of sorts, I’ve also included the ranking for how the teams finished in the 2008 season.

Each team ranking from each list was compared to the final 2009 regular season standings (taken from this tentative 2010 draft order) by calculating the offset between the estimated rank to the team’s actual finish. For instance, ESPN put the Steelers in the #1 slot but they actually finished 15th in the league…so ESPN’s offset for the Steelers is 14. For each list, the offsets for all 32 teams were added up and divided by 32 to get the average number of places that the list was off by. See ESPN’s list at right for example; you can see that each team ranking in the list was off by an average of about 6.3 places.

Here are the offset averages for each list (from best to worst):

Media outletOffset ave. (# of places)
CBS Sports5.6
The Sporting News5.6
USA Today5.6
Vegas odds5.8
Yahoo Sports5.9
Sports Illustrated5.9
ESPN6.3
Fox Sports6.4
2008 finish7.3

The good news is that all of the pundits beat the baseline ranking of last season’s final standings. But they didn’t beat it by that much…only 1.7 places in the best case. A few other observations:

- All the lists were pretty much the same. Last place Fox Sports and first place CBS Sports differ by less than one place in their rankings. The Steelers and Patriots were one and two on every list and the bottom five were pretty consistent as well. All the pundits said basically the same thing; no one had an edge or angle the others didn’t.

- Nearly everyone was very wrong about the Steelers, Giants, Titans, Jets, Bengals, and Saints…and to a lesser extent, the Redskins, Bears, Vikings, and Packers. CBS Sports made the fewest big mistakes; their offset for the Bengals was only 4 places. The biggest mistakes were Fox Sports’ choice and the Vegas ranking of the Bengals to finish 28th (offset: 19).

- Among the top teams, the Colts, Eagles, and Patriots more or less fulfilled the hopes of the pundits; only Fox Sports and Sports Illustrated missed the mark on one of these teams (the Colts by 9 places).

- The two “wisdom of the crowds” lists, Yahoo Sports and the Vegas list, ended up in the middle, better than some but not as good as some others. I suspect that there was not enough independent information out there for the crowd to make a good collective choice; those two lists looked pretty much like the pundits’ lists.

- The teams who turned out to be bad were easier to pick than the good teams. The bottom five picks on each list were typically off by 3-5 places while the top five were off by more like 8-12 places (esp the Steelers and the Giants). Not sure why this is. Perhaps badness is easier to see than goodness. Or it’s easier for a good-looking team to go bad than it is for bad-looking team to do better.

For the curious, here’s the full Google Docs spreadsheet of numbers for all of the lists.

Methodology and notes: 1) I made an assumption about all these power ranking lists: that what the pundits were really picking is the final regular season ranking. That isn’t precisely true but close enough for our purposes. 2) I have no idea what the statistical error is here. 3) The 2010 draft order list isn’t a perfect ranking of how the teams finished, but it is close enough. 4) Using the final regular season records as the determining factor of rank is problematic because of the playoffs. By the end of the season, some teams aren’t trying to win every game because they’ve either made the playoffs or haven’t. So some teams might be a little bit better or worse than their records indicate. 5) The Vegas odds list was a rankng of the odds of each team making the Super Bowl, not the odds for the teams’ final records. But close enough. 6) The Sports Illustrated list was from before the 2009 pre-season started; I couldn’t find an SI list from right before the regular season. Still, it looked a lot like the other lists and did middlingly well.

Fave · 0

Statistical evidence of election fraud in Iran?

I was kinda waiting for FiveThirtyEight to weigh in on this: using Benford’s Law to check for fraud in the Iranian election results (here as well).

Benford’s law is sometimes useful in these cases, because human beings intuitively tend to distribute the first digits about evenly when they’re making up “random” strings of numbers, when in fact many real-world distributions will be skewed toward the smaller digits.

Both 538 pieces are skeptical that Benford’s Law is applicable in this case. (thx, nick)

Update: Voting fraud expert Walter Mebane has produced a paper on the Iranian election that uses Benford’s Law to check the results. He’s updated the paper several times since it was first published and now writes that “the results give moderately strong support for a diagnosis that the 2009 election was affected by significant fraud”. (thx,scott)

Update: Done just after the election, this analysis shows that the returns released by Iran’s Interior Ministry during the course of the day of the election shows an unnaturally high steadiness of voting percentages. (thx, cliff)

Update: Regarding the previous link, Nate Silver doesn’t think much of that analysis. (thx, cliff)

Fave · 0

The overtime spike in NBA basketball

The distribution of point differentials at the end of NBA basketball games shows that a tie is more than twice as likely as either team winning by one point. A possible simple explanation from the comments:

1. Teams down by 2 late are most likely to take a 2 point shot, while teams down by 3 will most often take a 3 point shot. The team’s choices make ties a likely outcome.

2. A Tie is a stable equilibrium, while other scores aren’t. If a team leads with the ball, they will be fouled, preventing the game from ending on that score. IF a team has the ball with a tie, they’ll usually be allowed to wait and take the last shot, either winning the game or leaving it as a tie.

Update: This study about golf putting seems to have something in common with the overtime finding.

Even the world’s best pros are so consumed with avoiding bogeys that they make putts for birdie discernibly less often than identical-length putts for par, according to a coming paper by two professors at the University of Pennsylvania’s Wharton School. After analyzing laser-precise data on more than 1.6 million Tour putts, they estimated that this preference for avoiding a negative (bogey) more than gaining an equal positive (birdie) — known in economics as loss aversion — costs the average pro about one stroke per 72-hole tournament, and the top 20 golfers about $1.2 million in prize money a year.

Fave · 0

More biking = safer biking

The “safety in numbers” effect is proving true in NYC: the number of bicycles on the streets has more than doubled since 2001 while casualties have fallen. The increased prevalence of bike lanes in the city has to be helping too. (thx, david)

Fave · 0

Nate Silver predicts the Oscars

Nate Silver, who used polling statistics to predict a clear Obama win in the Presidential election in November, turns his analytical tools loose on the Oscars.

For example, is someone more likely to win Best Actress if her film has also been nominated for Best Picture? (Yes!) But the greatest predictor (80 percent of what you need to know) is other awards earned that year, particularly from peers (the Directors Guild Awards, for instance, reliably foretells Best Picture). Genre matters a lot (the Academy has an aversion to comedy); MPAA and release date don’t at all. A film’s average user rating on IMDb (the Internet Movie Database) is sometimes a predictor of success; box grosses rarely are.

Silver’s “Gamble-Tron 2000 Lock of the Oscars” is that Danny Boyle wins Best Director for Slumdog Millionaire with a whopping 99.7% certainty. I suspect that the Oscars will prove more difficult to predict than the election and that Silver will be wrong in at least two categories. I will report back on Oscar night. (via fimoculous)

Fave · 0

Search correlations with StateStats

StateStats is hours of fun. It tracks the popularity of Google searches per state and then correlates the results to a variety of metrics. For instance:

Mittens - big in Vermont, Maine, and Minnesota, moderate positive correlation with life expectancy, and moderate negative correlation with violent crime. (Difficult to commit crimes while wearing mittens?)

Nascar - popular in North and South Carolinas, strong positive correlation with obesity, and and moderate negative correlation with same sex couples and income.

Sushi - big in NY and CA, moderate positive correlation with votes for Obama, and moderate negative correlation with votes for Bush.

Gun - moderate positive correlation with suicide and moderate negative correlation with votes for Obama. (Obama is gonna take away your guns but, hey, you’ll live.)

Calender (misspelled) - moderate positive correlation with illiteracy and rainfall and moderate negative correlation with suicide.

Diet - moderate positive correlation with obesity and infant mortality and moderate negative correlation with high school graduation rates.

Kottke - popular in WI and MN, moderate positive correlation with votes for Obama, and moderate negative correlation with votes for Bush.

Cuisine - This was my best attempt at a word with strong correlations but wasn’t overly clustered in an obvious way (e.g. blue/red states, urban/rural, etc.). Strong positive correlation with same sex couples and votes for Obama and strong negative correlation with energy consumption and votes for Bush.

I could do this all day. A note on the site about correlation vs. causality:

Be careful drawing conclusions from this data. For example, the fact that walmart shows a moderate correlation with “Obesity” does not imply that people who search for “walmart” are obese! It only means that states with a high obesity rate tend to have a high rate of users searching for walmart, and vice versa. You should not infer causality from this tool: In the walmart example, the high correlation is driven partly by the fact that both obesity and Walmart stores are prevalent in the southeastern U.S., and these two facts may have independent explanations.

Can you find any searches that show some interesting results? Strong correlations are not that easy to find (although foie gras is a good one). (thx, ben)

Fave · 0

The Netflix Prize and the Case of the Napoleon Dynamite Problem

Clive Thompson writes up the Netflix Prize — which offers $1 million to the first team to improve upon Netflix’s default recommendation algorithm by 10% — and the vexing Napoleon Dynamite problem that is thwarting all comers.

Bertoni says it’s partly because of “Napoleon Dynamite,” an indie comedy from 2004 that achieved cult status and went on to become extremely popular on Netflix. It is, Bertoni and others have discovered, maddeningly hard to determine how much people will like it. When Bertoni runs his algorithms on regular hits like “Lethal Weapon” or “Miss Congeniality” and tries to predict how any given Netflix user will rate them, he’s usually within eight-tenths of a star. But with films like “Napoleon Dynamite,” he’s off by an average of 1.2 stars.

The reason, Bertoni says, is that “Napoleon Dynamite” is very weird and very polarizing. It contains a lot of arch, ironic humor, including a famously kooky dance performed by the titular teenage character to help his hapless friend win a student-council election. It’s the type of quirky entertainment that tends to be either loved or despised. The movie has been rated more than two million times in the Netflix database, and the ratings are disproportionately one or five stars.

This behavior was flagged as an issue by denizens of the Netflix Prize message board soon after the contest was announced two years ago.

Those are the movies you either loved loved loved or hated hated hated. These are the movies you can argue with your friends about. And good old ‘Miss Congeniality’ is right up there in the #4 spot. Also not surprising to see up here are: ‘Napoleon Dynamite’ (I hated it), ‘Fahrenheit 9/11’ (I loved it), and ‘The Passion of the Christ’ (didn’t see it, but odds are, I’d hate it).

After finding that post, I wrote a little bit about why these movies are so contentious.

The thing that all those kinds of movies have in common is that if you’re outside of the intended audience for a particular movie, you probably won’t get it. That means that if you hear about a movie that’s highly recommended within a certain group and you’re not in that group, you’re likely to hate it. In some ways, these are movies intended for a narrow audience, were highly regarded within that audience, tried to cross over into wider appeal, and really didn’t make it.

Fave · 0

How many coins?

Earlier this evening, I needed to take some coins that had been piling up to the Coinstar machine. Before I left, I uploaded a photo of the coin bags to Flickr and queried the masses: how much money in the bags?

How did the crowd do? Certainly not as well as the villagers at the 1906 livestock fair visited by Francis Galton.

In 1906 Galton visited a livestock fair and stumbled upon an intriguing contest. An ox was on display, and the villagers were invited to guess the animal’s weight after it was slaughtered and dressed. Nearly 800 gave it a go and, not surprisingly, not one hit the exact mark: 1,198 pounds. Astonishingly, however, the median of those 800 guesses came close — very close indeed. It was 1,208 pounds.

Nate Silver I am not, but after some rudimentary statistical analysis on the coin guesses, it was clear that the mean ($193.88) and median ($171.73) were both way off from the actual value ($426.55). That scatterplot is brutal…there are only a handful of guesses in the right area. But the best guess by a single individual was just 76 cents off.

To be fair, the crowd was likely misinformed. It’s difficult to tell from that photo how fat those bags were — they were bulging — and how many quarters there were.

Fave · 0

What are the Japanese up to right now?

As part of the Japanese census, people were asked to keep a record of what they were doing in 15 minute intervals. The data was publicly released and Jonathan Soma took it and graphed the results so that you can see what many Japanese are up to during the course of a normal day.

Sports: Women like swimming, but men eschew the water for productive sports, which is the most important Japanese invention.

Early to bed and early to rise… and early to bed: People start waking up at 5 AM, but are taking naps by 7:30 AM.

Fascinating.

Fave · 0

Statistics in a Nutshell book

New book from O’Reilly: Statistics in a Nutshell.

Need to learn statistics as part of your job, or want some help passing a statistics course? Statistics in a Nutshell is a clear and concise introduction and reference that’s perfect for anyone with no previous background in the subject. This book gives you a solid understanding of statistics without being too simple, yet without the numbing complexity of most college texts.

Fave · 0

Extensive Olympic stats

The folks behind the excellent Baseball Reference have launched a statistics site for the Olympics. Every athlete that’s ever competed in the Games has his/her own page. Announcement here.

Fave · 0

Ben Fry has updated his salary vs. performance chart for the 2008 MLB season that compares team payrolls with winning percentage. The entire payroll of the Florida Marlins appears to be less than what Jason Giambi and A-Rod *each* made last year.

Fave · 0