top of page

Assignment 1: Batting Statistics

For assignment one, we worked on understanding basic batting metrics. We were required to be able to calculate the batting average, on base percentage, and slugging average. We also presented how to calculate the at bats by algebraically using the formula for the slugging average.​ Finally, we worked on seeing relations between winning percentage and the slugging average by using a scatterplot. 

Download

Assignment 1 in Practice

Note: Code is connected to Lahman's batting database

Example data:

bondsba01................ 2001

ohtansh01................. 2023

ruthba01.................... 1921

pellean01.................. 1988

aardsda01................. 2013

stoneli01................... 1926

Anastashia Pelletier

©2022 by Anastashia Pelletier. Proudly created with Wix.com

bottom of page