A Markov Approach to Modeling Baseball At-Bats and Evaluating Pitcher Decision-Making and Performance
Total Page:16
File Type:pdf, Size:1020Kb
A Markov Approach to Modeling Baseball At-Bats and Evaluating Pitcher Decision-Making and Performance The Harvard community has made this article openly available. Please share how this access benefits you. Your story matters Citable link http://nrs.harvard.edu/urn-3:HUL.InstRepos:38811463 Terms of Use This article was downloaded from Harvard University’s DASH repository, and is made available under the terms and conditions applicable to Other Posted Material, as set forth at http:// nrs.harvard.edu/urn-3:HUL.InstRepos:dash.current.terms-of- use#LAA Acknowledgements I thank first and foremost my thesis advisor, Chris Rycroft, for being an encouraging mentor and an insightful guide. Without his time, effort and wisdom in all stages of the process, this thesis would not have been possible. I thank Avi Shapiro and Zhiming Kuang for their enthusiasm in helping me understand and implement the Markov model. I thank Thomas Fai for his assistance with the nuances of MATLAB. Lastly, I thank my family and friends for their supportiveness and helpful feedback. 1 Introduction Unlike hockey or basketball, baseball is inherently a game of shifting states. Due to its stop-and-go nature, baseball lends itself as an application of statistics and probability, and for decades statisticians have analyzed and modeled the game. In the first academic, statistical analysis of baseball, Mosteller(1952) used the binomial distribution to estimate how often the better team won the World Series, the championship for Major League Baseball (MLB). Although baseball is played by teams, it is really a series of one-on-one batter vs. pitcher match-ups, so detailed statistics can be calculated for each individual. This statistical analysis is valuable: with the MLB payroll reaching $3.74 billion in 2016 (Pay, 2016), and a cost per marginal win of at least $5{7 million (Pollis, 2013), there are huge incentives for MLB front offices to develop an edge in scouting and coaching players. Baseball scouting is traditionally a combination of visual analysis, gut reactions, and statistical evaluation. As explained by the hit film Moneyball, some advanced statistics, such as Wins Above Replacement (WAR), On-base Plus Slugging percentage (OPS), and Fielding Independent Pitching (xFIP) have become more popular and are replacing outdated \headline" statistics such as home runs, batting average, and pitching wins. These innovative statistics capture more precisely the normalized performance and value of a given player. For instance, batting average misses some of the offensive value of a player because it does not account for walks. Although walks are not as glamorous as hits, they result in the same outcome of reaching base safely, so they are included in OPS. WAR improves on traditional statistics by including terms for defensive value and baserunning value. Lastly, xFIP normalizes a pitcher's performance to adjust for circumstances beyond his control, such as team defensive ability, luck, and stadium size (Weinberg, 2016). 1 Once a team has signed a player to a contract, the next steps in maximizing win probability are to coach the player and to manage in-game strategy. Lindsey (1963) and Cook(1966) provided two of the early probabilistic analyses of traditional baseball strategies, including the sacrifice bunt, the hit-and-run play, and the use of relief pitchers. Baseball traditionalists generally met this work with condemnation (Hooke, 1967). Scholars quickly began to improve upon these analyses using models. One of the most frequently used models, dating back to Howard(1960), employs the mathematical tool of a Markov chain to model the various states of a half-inning. Each half-inning can be in one of twenty-four different states: there can be either zero, one, or two outs, and there can be runners on any, all, or none of the three bases. The game moves from one state to another with some probability, and a half-inning can be simulated by sampling these probabilities. Research using Markov chains to model a half-inning of baseball is extensive. With one of the first rigorous applications of the Markov model, Freeze(1974) used Monte Carlo sampling to determine that changes in batting lineup | the order in which players for a team bat | make minimal differences in a team's offensive output. Next, Cover and Keilers(1977) used the half-inning Markov model to generate an offensive productivity statistic representing the expected number of runs that a player would score if he were the only batter in the lineup. Lastly, Bukiet et al.(1997) used the model to optimize batting lineups, to evaluate potential trades between teams, and to predict the number of runs a team would score per game and, therefore, the number of games a team would win each season. Despite all of the work using Markov chains to model a half-inning, there has been minimal work using Markov chains to model each individual at-bat of a baseball game. The at-bat is baseball at its most fundamental level: the battle between a batter, who wants to reach base, and a pitcher, who wants to keep him off base by getting him out. 2 Every at-bat begins with zero balls and zero strikes and progresses one pitch at a time until the at-bat ends with the batter either reaching base safely or getting out. Each pitch within an at-bat advances the \count" | the number of balls and strikes. There can be any combination of zero, one, or two strikes, and zero, one, two, or three balls. The at-bat ends when the batter hits into an out, strikes out (three strikes), gets hit by a pitch, walks (four balls), or reaches base via an error or a hit (including singles, doubles, triples, and home runs). In the context of the Markov model, the at-bat has twelve transient states representing the possible counts and nine absorbing states representing the nine outcomes of the at-bat. Each state moves to another state with a certain probability. For notation, a count of (2,1) denotes two balls and one strike.1 Katz(1986) used this model to understand, on a general level, how the expected outcome of an at-bat changes as the at-bat progresses and the count changes. Using a sample of over 11,000 pitches from the 1986 season, he calculated how actual strikeout, walk, and on-base percentages changed as the count changed. He also generated a Markov transition matrix to compute the expected values of these statistics. Katz suggested that this model could be used in the future to evaluate pitcher strategies, to determine a pitcher's effectiveness, and to indicate whether a starting pitcher should be pulled out of the game in favor of a relief pitcher. Hopkins and Magel(2008) followed up on this study by examining how actual slugging percentage (the average amount of bases reached per at-bat) changed with the count for at-bats in a sample of 1,260 MLB games. I believe the at-bat Markov model can be used to evaluate a pitcher's effectiveness and to analyze the impacts of various at-bat strategies. I build on Katz' work by validating the accuracy of the at-bat Markov chain model and then applying it to 1It is unfortunate that the (i; j) notation for a count is the same as the notation for location in a Markov matrix. I try to be clear about when I am referring to matrix indices and when I am referring to a count. 3 examine trends in pitcher decision-making and performance. First I visually juxtapose the matrices for two specific pitchers | Koji Uehara, a closer for the Boston Red Sox, and Bartolo Colon, a starter for the New York Mets. I highlight intuitive evidence of the noticeably different styles and levels of effectiveness for these pitchers. Next, in order to validate the at-bat Markov model, I use it to reverse-predict the outcomes of at-bats for ninety starting pitchers and compare them to actual outcomes. After showing that the Markov strategy provides a reasonable model for an at-bat, I use it to determine how players change the expected outcomes of an at-bat by employing two traditional baseball strategies | a batter taking, or not swinging at, the first pitch of an at-bat, and a pitcher intentionally throwing a ball on (0,2) counts. More generally, I examine how sensitive a given pitcher's performance is to decisions made on a given count, both in terms of pitch location and pitch type decisions. The results show that taking the first pitch appears to be more effective against weaker pitchers, while the (0,2) waste pitch is slightly, but not significantly, more effective for strikeout pitchers than contact pitchers. Furthermore, I find a clear trend that many pitchers should be increasing waste pitch usage on (0,2) and (1,2), but pitch selection trends are more muddled. Lastly, I show that the manner in which a pitcher progresses though an average at-bat is largely indicative of his overall performance. 2 Model Description 2.1 The Markov Matrix As previously mentioned, an at-bat has twelve transient states, representing the twelve possible counts, or the combinations of balls and strikes, and nine final states. Therefore, a 21 by 21 matrix M can represent the Markov chain, where the (i; j) entry 4 of M is the probability that the at-bat is in state i at pitch k plus one, given that it was in state j at pitch k. Figure 1 displays the structure of matrix M. Figure 1: Markov Matrix M.