Following Baseball with Mathematica
No sport places more importance on its statistics than does baseball. The late sportswriter Leonard Koppett wrote in his standout 1967 book The Thinking Fan’s Guide to Baseball that “statistics are the lifeblood” of the game.
In fact, statistics are so important to baseball that they have inspired their own field: sabermetrics. Derived from SABR, the abbreviation for the Society for American Baseball Research, sabermetrics were popularized by Bill James with the publication of his first Bill James Baseball Abstract in 1977.
Led by James’s charge, sabermetricians began to advance the argument that traditional baseball stats such as batting average (BA), home runs (HR), and runs batted in (RBI) did not accurately describe a player’s on-field performance. Instead, they created new stats like value over replacement player (VORP), win shares, and OPS, which is on-base percentage (OBP) plus slugging percentage (SLG).
Mathematica is, of course, the perfect tool for sabermetricians. By inputting game statistics, you can calculate formulas and graph players’ or teams’ progress over an entire season. Watching baseball is fun, but imagine how much better it will be when you use Mathematica to get more involved!
Using Carol Goodell and S.M. Blinder’s Baseball Batting Metrics Demonstration from the Wolfram Demonstrations Project, you can calculate your favorite players’ statistics—not just day by day, but inning by inning! Move the sliders in real time according to a player’s on-field accomplishments, and the Demonstration instantly calculates the player’s batting average (hits divided by at-bats), on-base percentage (hits + bases on balls + hit by pitch, divided by plate appearances), slugging percentage (total bases divided by at-bats), and OPS.
When I adjust the sliders to plug in Votto’s at-bats, hits, doubles, triples, home runs, bases on balls, hit-by-pitches, and sacrifice flies from last season, the Demonstration instantly calculates his 2009 BA, OBP, SLG, and OPS. (There’s also a slider for RBIs, which has nothing to do with calculating Votto’s averages but is nice to have available.)
What’s really fun about the Baseball Batting Metrics Demonstration is that you can calculate the averages of any players at any time—even in real time during a game. Your favorite player comes to bat, add one at-bat. He gets a hit or a base on balls, add that too. You’ll know his BA, OBP, SLG, and OPS even before he makes it to first base!
With the Major League Baseball season getting underway, you can chart your favorite players’ progress from now to the World Series. You can even keep track of entire teams’ statistics; all the pertinent information is provided in each day’s box scores.
Better yet, you can use Mathematica to create your own baseball Demonstration. You’ll find out that Mathematica goes just as well with baseball as do hot dogs and peanuts.