2024-03-21

Introduction

Out of the Park Baseball is a baseball simulator that simplifies players down to “ratings” which determine their productivity. As such, in order to understand what makes a player effective, it is critical to understand how ratings translate to the performance they are responsible for. This study will model player statistics against ratings to determine the effect of ratings on their respective outcomes. The following ratings translate to their respective statistic:

  • Contact (composed of power, BABIP, and Avoid K’s) > Batting Average
  • Gap Power (or gap) > Doubles/Triples
  • Power > Home Runs
  • Eye > Walks

.

## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout

Order of Operations

Within the simulation engine, rather than calculating the odds that each event occurs in a plate appearance at the same time, events are calculated in “buckets”, where the odds of a walk are calculated before the odds of a home run, double, triple, or strikeout, which are calculated before the odds of a single. As such, the probability of a home run is dependent on the occurrence of a walk, where the “true” odds a player hitting a home run are equivalent to: HR% = \(P(HR \mid BB)\). As such, players with a lower walk rate will have a greater home run rate relative to their plate appearance total without actually having more skill. As such, it is important in this study that the odds of a home run and double/triple be calculated independent of plate appearances that result in a walk to reduce error and get a more accurate model.

Scatterplots

The first step in preliminary analysis is to simply plot the data points to observe the general shape and determine what type of regression would yield the best fit to the shape, how steep the slope generally looks, observe any potential breakpoints, and analyze any other general trends of the data. While I will exclusively use linear regression here for the sake of project relevance and simplicity, practical analysis of the data would utilize polynomial regressions in some situations as well. As such, each of the ratings analyzed here will be plotted against their respective statistic.

Contact Plot

conPlot

Gap Plot

Power Plot

Eye Plot

Linear Modeling

Regressions are essential to building a model, as they allow for prediction of player performance given a certain rating combination. Since the ultimate goal of building a team is to acquire the players who will perform best in the future, not those who have performed well in the past, this is essential to making roster building decisions and strategies.

Linear Regressions (Part 1)

con = lm(combine$ba ~ combine$CON, combine)
con
## 
## Call:
## lm(formula = combine$ba ~ combine$CON, data = combine)
## 
## Coefficients:
## (Intercept)  combine$CON  
##     0.09918      0.00298

Linear Regressions (Part 2)

gap = lm(combine$xbh ~ combine$GAP, combine)
gap
## 
## Call:
## lm(formula = combine$xbh ~ combine$GAP, data = combine)
## 
## Coefficients:
## (Intercept)  combine$GAP  
##   0.0025107    0.0009627

Linear Regressions (Part 3)

pow = lm(combine$hr ~ combine$POW, combine)
pow
## 
## Call:
## lm(formula = combine$hr ~ combine$POW, data = combine)
## 
## Coefficients:
## (Intercept)  combine$POW  
##   -0.047280     0.001586

Linear Regressions (Part 4)

eye = lm(combine$bbp ~ combine$EYE, combine)
eye
## 
## Call:
## lm(formula = combine$bbp ~ combine$EYE, data = combine)
## 
## Coefficients:
## (Intercept)  combine$EYE  
##   -0.028490     0.002221

Importance of Finding Slope

In addition to the value of having a linear model to predict player performance and determine where “luck” may have caused a player to over or underperform, finding the slope of each regression is critical to understanding how changes in player ratings can affect a player’s performance directly and against other players. This is especially important when considering how a player will develop as a prospect or age as a veteran, and how ratings changes will affect their production. The slope along the curve can be calculated as \(f(x)\frac{d}{x}\), or taking the derivative of the predictive function. While I am using linear regressions for simplicity in this project, there are cases where a polynomial fit is better, so taking the derivative is often the simplest way to understand the marginal effect of rating shifts.

Top Player Analysis

Last, it is helpful to look at the best players in the league to see what an elite performer would look like. In this case, we will use the sample of MVP winner Robert Hawkins for this study. The following slide will show how effective Hawkins was at producing each statistical outcome.

Robert Hawkins Stats

Conclusion and Disclaimer

Note that none of the conclusions here should be used to make actual decisions. This was purely an exercise to demonstrate specific skills for a class, and the actual analysis is incredibly rough and unpolished, with issues such as weighting data by playing time and better fitting models completely excluded. Furthermore, the lack of analysis of contact’s individual parts makes for a model with extremely high variance and low reliability.