mlb11

Baseball Player Statistics


Overview

Data from all 30 Major League Baseball teams from the 2011 season. This data set is useful for examining the relationships between wins, runs scored in a season, and a number of other player statistics.


Variables

  • team: Team name.
  • runs: Number of runs.
  • at_bats: Number of at bats.
  • hits: Number of hits.
  • homerun: Number of home runs.
  • bat_avg: Batting average.
  • strikeouts: Number of strikeouts.
  • stolen_bases: Number of stolen bases.
  • wins: Number of wins.
  • new_onbase: On base percentage, measure of how often a batter reaches base for any reason other than a fielding error, fielder's choice, dropped/uncaught third strike, fielder's obstruction, or catcher's interference.
  • new_slug: Slugging percentage, popular measure of the power of a hitter calculated as the total bases divided by at bats.
  • new_obs: On base plus slugging, calculated as the sum of these two variables


Data Source

MLB.com.


Loading Data

CSV Download

To access the data in R, type

download.file("http://www.openintro.org/books/statdata/mlb11.RData",
              destfile = "mlb11.RData")
load("mlb11.RData")

To access the data in SAS, type

filename mlb11 url 'http://www.openintro.org/books/statdata/mlb11.csv'