ABSTRACT
CONTENTS 10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
10.1.1 Computational Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 10.2 Sean Lahman’s Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
10.2.1 Connecting to the Baseball Database from within R . . . . . . . . . . . . . . . . . 401 10.3 Aggregating Salaries into Payroll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 10.4 Merging Payroll Data with Information in Other Tables . . . . . . . . . . . . . . . . . . . . . . 408
10.4.1 Adding Team Names to the Payroll Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 10.4.2 Adding World Series Records to the Payroll Data . . . . . . . . . . . . . . . . . . . . 411
10.5 Exploring the Extreme Salaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 10.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
10.1 Introduction Baseball fascinates many Americans and others, and many statisticians share this fascination with the sport. Nate Silver, who gained wide acclaim for the accuracy of his novel statistical methods to predict election outcomes, has also used statistics to study issues in baseball, such as the trade-offs in scheduling cold-weather games, home-field advantage, and effects of steroid use (see https://www.baseballprospectus.com/news/?author= 59). This search for new baseball knowledge through statistical measures of in-game activity has been coined “sabermetrics” after the Society of American Baseball Research (SABR). In Moneyball [6], John Henry, former owner of the Florida Marlins, compared the baseball industry to the financial industry: “People in both fields [finance and baseball] operate with beliefs and biases. To the extent you can eliminate both and replace them with data, you gain a clear advantage.”