<<

A Markov Approach to Modeling At-Bats and Evaluating 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 , the championship for (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 (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 . 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 , 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 should be pulled out of the game in favor of a . 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 for the 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. Entries with letters represent possible transitions within an at-bat. Green shading represents transitions from one count to another, orange shading represents transitions from each count to an at-bat outcome, and blue shading represents absorption. For notation, HIO, K, HBP, BB, E, 1B, 2B, 3B, and 4B stand for hit into out, strikeout, , walk, error, single, double, triple and home run, respectively.

For example, the probability of moving from (0,0) to (0,1) is the probability that the first pitch of an at-bat results in a strike. This is the probability that the first pitch is a called strike (in the strike zone but the batter does not swing), plus the probability that the first pitch is swung at and missed (whiff), plus the probability that the first pitch is swung at and fouled off: A = P (strike | (0, 0)) = P (called strike | (0, 0)) + P (whiff | (0, 0)) + P (foul | (0, 0)). In order to be Markovian, M must satisfy

0 ≤ M(i, j) ≤ 1 (1)

5 for all i and j, and 21 X M(i, j) = 1 (2) i=1 for all j. These conditions apply to all probability distributions; the probability of a specific event occurring must be between zero and one, and the total probability of something happening given an initial state j must be equal to one. Furthermore, Markov chains take a step beyond normal probability conditions; the

central property for a Markov chain is as follows: If uk is a probability vector in a

Markov system with uk,j = P (Sj) equal to the probability of being in state j at time k, and if M is a Markov matrix,

uk+1 = Muk. (3)

This equation means that the probability vector uk+1 is dependent only on uk and

M; in other words, nothing that occurred before the position vector uk matters. In baseball terms, the result of the pitch on count k does not depend on what happened earlier in the at-bat. Past research has shown that this is likely a strong assumption. For example, Baxamusa(2006) found a “memory effect” in MLB batters: The result of the first pitch of an at-bat had a statistically significant, albeit minor, effect on the average outcome of the (1,1) pitch for the sample tested: when the first pitch was a ball and the second pitch was a strike, batters had an on-base percentage of 31.2% with a slugging percentage of 37.8%, but when the order was reversed, batters had an on-base percentage of 31.4% and a slugging percentage of 40.2%. This memory effect makes sense from a psychological perspective; if a batter facing a (1,1) count was previously ahead (1,0), then he may be less confident than if he had started behind in the count.

6 Because this memory effect is small for on-base percentage, I assume the Markov model is realistic.

2.2 Building the Matrix

After determining the structure of the matrix, I used baseballsavant.com to gather spreadsheets containing pitch-by-pitch data for each season for each pitcher studied (Willman, 2016). This website allows the user to search the MLB PITCHf/x database for pitches that meet certain specifications, such as year, pitcher name, batter name, count, pitch outcome, etc. The only inputs I used were pitcher name and year. For each pitcher, the website outputs a comma-separated values file containing a row for each pitch that meets the specifications and a column for each variable. There are 40 variables for each pitch, including release speed, pitch type, umpire name, pitch location, etc. I trimmed this data to only include pitch result, at-bat result, pitch location, pitch type, game date, and balls, strikes, outs and inning at the time of the pitch. I also scrubbed the data to remove intentional walks, automatic strikes and balls, interference plays, and pitches with incomplete data. These events are infrequent and can be neglected. I fed this data into a MATLAB script that calculates the Markov transition probabilities.

2.3 Manipulating the Matrix

This Markov system is unique because it is absorbing — once the at-bat reaches one of the nine final states, the at-bat ends. Therefore, matrix M can be written in the in the form of block matrices,   Q 0   M =   , (4) RI

7 where Q is the 12 by 12 matrix representing transitions from transient states to transient states (shaded green in Figure 1), R is the 9 by 12 matrix representing transitions from transient states to absorbing states (shaded orange), and I is the 9 by 9 identity matrix (shaded blue). For absorbing Markov chains, we are interested in the R block of M ∞, or the probability distribution among the nine absorbing states after a number of iterations given an initial state. In baseball terms, I am interested in the probability that a batter hits into an out (HIO), strikes out (K), is hit by a pitch (HBP), walks (BB), reaches base via a fielding error (E), or hits a single (1B), double (2B), triple (3B), or home run (HR) starting at any of the twelve counts. Looking at certain powers of M, or how the system changes after several iterations (pitches), we see

    Q2 0 Q3 0 2   3   M =   ,M =   , (5) R(I + Q) I R(I + Q + Q2) I

and in general,   Qn 0 M n =   . (6)  Pn−1 i  R( i=0 Q ) I

Because I am primarily interested in the final probability distribution among the absorbing states, I take the limit as n goes to infinity to see what the final distributions are given certain initial states.

Pn−1 i Initially, it may seem like solving for the block matrix R( i=0 Q ) could prove to be difficult, but it actually simplifies nicely. If

n−1 X F = Qi = I + Q + Q2 + ··· + Qn−1 (7) i=0

8 then

n−1 X QF = Q Qi = Q + Q2 + Q3 + ··· + Qn i=0 = (I + Q + Q2 + Q3 + ··· + Qn) − I = F − I. (8)

So, QF = F − I, (9)

I = F − QF, (10)

I = (I − Q)F, (11)

and (I − Q)−1 = F. (12)

Therefore, the lower left block matrix equals RF = R(I − Q)−1, which is easily solved for in MATLAB by trimming M down for R and Q. Table 1 displays the resulting block matrix for Bartolo Colon, labeled in terms of the baseball meaning, with a final row for on-base percentage (OBP)2 added. Multiplying the first column by the number of batters faced in the season reverse-predicts the number of , walks, hits, etc. in that season. The matrix F = (I − Q)−1 is known as the Fundamental Matrix of an absorbing Markov chain, and in addition to helping find the probability distribution among the various absorbing states given an initial starting point, the Fundamental Matrix has other useful applications. Most importantly, the (i, j) entry of F represents the

2 hits+BB+HBP+E In this thesis, I compute OBP as plate appearances . Generally, OBP does not include instances where the batter reached base via a fielding error because he should not get credit for defensive mistakes. I include these instances because the batter reaches base safely, and this has the same negative outcome for a pitcher as a walk or a hit.

9 Count (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) HIO% 52.4 46.5 35.7 53.8 48.6 41.2 48.1 44.0 38.0 26.5 44.1 30.8 K% 16.7 24.9 40.9 11.9 20.7 34.0 10.2 20.0 37.0 7.5 12.5 32.7 HBP% 0.491 0.315 0.349 0.256 0.477 0.839 0.164 0.382 0.826 0 0 0 BB% 2.95 1.94 1.27 5.89 4.07 3.05 15.4 9.45 8.06 54.6 24.3 25.0 E% 0.981 0.712 1.22 1.49 0.52 0.313 1.96 1.33 0.826 0 0 0 1B% 18.2 17.5 12.4 18.8 18.6 12.8 17.6 17.3 7.44 8.82 14.7 7.69 2B% 5.03 4.61 3.94 4.71 4.98 4.22 5.27 5.58 5.58 0.441 0.735 1.92 3B% 0.246 0.141 0.13 0.154 0.247 0.313 0.164 0.382 0.826 0 0 0 4B% 3.07 3.35 4.05 2.95 1.83 3.18 1.12 1.54 1.45 2.21 3.68 1.92 OBP 30.9 28.6 23.4 34.3 30.7 24.7 41.7 35.9 25.0 66.0 43.4 36.5

Table 1: Absorbing at-bat outcomes (%) given initial count for Bartolo Colon

expected number of times the system goes to state i before it gets absorbed, given that it starts in state j. To show this mathematically, assume that there is some matrix E, where the (i, j) entry of E is the expected number of times that the system goes to state i before it gets absorbed, given that it starts in state j. Starting with the diagonals of E,

X E(j, j) = 1 + E(k, j)Q(j, k). (13) k

In words, starting at state j, the expected number of visits to state j before getting absorbed is 1 (the system starts there) plus the expected number of times the system returns to state j after leaving. For each of the E(k, j) times that the system visits the non-absorbing state k, the system transitions back to state j with probability Q(j, k). By linearity of expectation, summing over all k gives the expected number of visits to state j after leaving state j, which we can add to 1 to determine E(j, j). Next, for the non-diagonal entries of E:

X E(i, j) = E(k, j)Q(i, k). (14) k

This equation is similar to the equation for E(j, j), without the 1 because the system

10 does not start at state j. This system of equations can be rewritten in matrix form:

E = I + EQ, (15)

so E − EQ = I, (16)

and E = (I − Q)−1 = F. (17)

Thus the (i, j) entry of the Fundamental Matrix represents the expected number of times the system goes to state i before it gets absorbed, given that it starts in state j.3 In baseball terms, the (i, j) entry of F represents the expected number of times that the count is at state i, given that it starts at state j. Table 2 displays Bartolo Colon’s Fundamental Matrix. This matrix is interesting because it is triangular, and only four entries have values greater than one. The matrix is triangular because it is impossible to go backwards in a baseball count. For instance, once there are two balls and one strike, the expected number of times the count reaches zero balls and one strike is zero, so the (2, 8) entry is zero. The four values greater than one represent counts with two strikes because a foul ball on those counts does not cause the count to change. This matrix is particularly useful in calculating the expected number of pitches per at-bat. The first column of F contains the expected number of times that the at-bat reaches a certain count, given that that it starts at the beginning of the at-bat, (0,0). Summing all twelve of these expected values in the column gives the expected total amount of pitches for the at-bat, given that the at-bat starts at the beginning.

3The mathematical concept and proof of the Fundamental Matrix is well known in statistics. I used the Colgate University source to understand and reproduce this proof (Weckesser, 2005).

11 (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) (0,0) 1.0 0 0 0 0 0 0 0 0 0 0 0 (0,1) 0.512 1.0 0 0 0 0 0 0 0 0 0 0 (0,2) 0.279 0.545 1.25 0 0 0 0 0 0 0 0 0 (1,0) 0.333 0 0 1.0 0 0 0 0 0 0 0 0 (1,1) 0.322 0.34 0 0.445 1.0 0 0 0 0 0 0 0 (1,2) 0.31 0.438 0.551 0.258 0.58 1.33 0 0 0 0 0 0 (2,0) 0.0881 0 0 0.265 0 0 1.0 0 0 0 0 0 (2,1) 0.131 0.0982 0 0.243 0.289 0 0.431 1.0 0 0 0 0 (2,2) 0.192 0.22 0.203 0.24 0.386 0.489 0.257 0.596 1.29 0 0 0 (3,0) 0.0184 0 0 0.0551 0 0 0.208 0 0 1.0 0 0 (3,1) 0.0419 0.0232 0 0.0903 0.0682 0 0.227 0.236 0 0.6 1.0 0 (3,2) 0.09 0.0896 0.0712 0.133 0.172 0.171 0.212 0.336 0.452 0.322 0.537 1.4 Total 3.32 2.75 2.07 2.73 2.49 1.99 2.33 2.17 1.74 1.92 1.54 1.4

Table 2: Fundamental Matrix for Bartolo Colon with total expected pitches given initial count. At-bats against Bartolo Colon are expected to last 3.32 pitches on average.

Next, I use the number of expected pitches per at-bat to determine an expected number of pitches per inning. We have already found an expected value for OBP, and because a batter either gets out or gets on base, the probability of an at-bat resulting in an out is 1 − OBP. Therefore, the expected number of at-bats per out is

1 , (18) 1 − OBP which comes from the expected value of a geometric distribution.4 Multiplying the expected number of at-bats per out by the expected number of pitches per at-bat gives the expected number of pitches per out. Finally, multiplying that number by three outs per half-inning gives the expected number of pitches per inning, an important efficiency metric for pitchers. Pitchers get tired and possibly injured if overworked, so by limiting his number of pitches per inning, a pitcher can pitch more innings and remain healthy.

4Because this model only focuses on an individual at-bats, it does not account for double and triple plays — instances when multiple outs are recorded in one play — and baserunning outs. For example, hitting into an out (HIO) includes both grounding into a double play and hitting a pop fly out.

12 3 Validating the Model

3.1 Visual Analysis

Figure 2 displays a heat map of the Markov transition matrix calculated for Bartolo Colon for the 2015 season. The matrix is quite sparse and is only populated in transitions that are possible; for example, it is not possible to jump from a count of (0,0) to a count of (0,2) in only one pitch, so the corresponding entry is white (zero). The only loops in the model — states that can possibly repeat — are the counts with two strikes and the absorbing states. Two-strike counts can loop to themselves if the batter hits a foul ball.

Figure 2: Color coded Markov transition matrix for Bartolo Colon based on 2015 data

Figure 3 displays the matrix of differences in probabilities for Koji Uehara and Bartolo Colon for 2015, calculated as Uehara minus Colon. Uehara has a much higher

13 probability of throwing a first-pitch strike, as displayed by the orange shading in the top left cell. More generally, for every count without three balls, a pitch from Uehara is more likely to result in a strike than a pitch from Colon. This is indicated by the yellow and orange shading of the entries along the diagonal line starting in the top-left corner and running through the (2,1) to (2,2) entry, in addition to the orange shadings found in the strikeout row labeled K. Also, for almost every count, Uehara is less likely than Colon to have the pitch result in the batter hitting the ball in play, as indicated by the generally blue shading in the HIO, E, and hit (1B, 2B, 3B, HR) rows.

Figure 3: Color coded difference matrix: Koji Uehara 2015 minus Bartolo Colon 2015

These results are largely in line with expectations. Figure 3 depicts the known differences in each pitcher’s style and overall effectiveness. Colon has the reputation of being a pitcher who “pitches to contact,” meaning that his goal is for the batter to make contact and hit into an out; on the other hand, Uehara is a strikeout pitcher,

14 meaning that he intends to strike the batter out. Figure 3 illustrates the difference in style because the strikeout (K) row favors Uehara, while the hit into out (HIO) row favors Colon. Moreover, per FanGraphs MLB data, Uehara has a lower average number of baserunners per inning, and this higher level of effectiveness is portrayed by the general trend that he is better than Colon at advancing the number of strikes in the count, especially at the very beginning of the at-bat (Sor, 2016). Lastly, at any given count, Uehara is less likely to give up a single. Next, Figure 4 displays the difference in transition matrices across years for Koji Uehara, calculated using 2015 values minus 2013 values. Using this figure, it is relatively straightforward to diagnose the factors that caused Uehara’s decline in performance (increases in baserunners and runs allowed per inning) from 2013 to 2015. For instance, the E and hit rows are generally shaded orange, meaning that at most counts, the probability of the batter reaching base via a hit or a fielding error increased. These increases are most marked in the (1,2) and (3,2) counts. Another general trend is that the probability of Uehara throwing a strike decreased while the probability of him throwing a ball increased for most counts, illustrated by the blue diagonal line running above the orange diagonal line in the quadrant representing transient state transitions. The batter gains the upper hand as the number of balls increases because the pitcher must throw pitches in the strike zone in order to prevent a walk, and these pitches are easier to hit. In addition, examining the K row, we see that Uehara, a strikeout pitcher, failed to convert two-strike counts immediately into strikeouts more often in 2015. Lastly, Uehara especially struggled with the (3,1) count; in 2013, (3,1) almost always led to (3,2), whereas in 2015, Uehara often threw a ball on (3,1) resulting in a walk.

15 Figure 4: Color coded difference matrix: Koji Uehara 2015 minus Koji Uehara 2013

3.2 Reverse-prediction of At-bat Results

After a visual inspection, the next step in validating the at-bat Markov model is to reverse-predict at-bat outcome statistics for a sample of pitchers and then compare them to actual values. As explained in equations (6), (7) and (12), the R(I − Q)−1 block matrix contains the probability distribution among the absorbing states for each initial count. Therefore, the entries of the first column are the average expected outcomes for at-bats starting at the beginning, (0,0). Using data from baseballsavant.com, I generated matrices based on probabilities from the 2015 season for 90 starting pitchers. The pitchers included in the sample are the first three pitchers from each of the 30 MLB teams listed in a 2015 preseason ranking of pitching staffs (Svrluga, 2015). If a pitcher did not have at least 1,600 pitches in the 2015 season, I replaced him with the next pitcher on the list.

16 Table 3 compares the expected and actual5 values for three statistics — pitches per inning, strikeout percentage, and walk plus hit percentage. Walk plus hit percentage was used instead of OBP because FanGraphs does not track pitcher OBP.6 The second column of Table 3 lists the sample size of pitches included in the matrix generation for each pitcher. The average number of pitches sampled per pitcher was 2,740. Absolute errors in predicted number of pitches per inning, strikeout rate, and walk plus hit rate ranged from 0.3% to 6.6%, 0.0% to 12.0%, and 0.0% to 7.7%, with means of 3.9%, 0.9%, and 1.0%, respectively. These generally low errors prove that this model is reasonable, and that baseball at-bats are approximately Markovian. Furthermore, outputs of the model can be considered to be reliable. One potential reason that the predicted number of pitches per inning is slightly higher than the actual number is that this model does not account for double or triple plays or baserunning outs, plays in which one at-bat can result in more than one out or an at-bat that technically results in a hit actually leads to an out. Therefore, the expected numbers of batters per out and pitches per out are too high.

5Actual statistics as per FanGraphs’ sortable player stats. 6OBP is an offensive statistic for batters and is generally not calculated for pitchers.

17 Pitches Per Inning Strikeout% Hit+Walk% Name Pitches Pred. Actual Error% Pred. Actual Error% Pred. Actual Error% Max Scherzer 3,348 14.76 14.72 0.26 30.77 30.70 0.23 22.92 23.14 -0.95 Stephen Strasburg 2,041 16.44 16.07 2.29 29.73 29.64 0.32 26.80 26.96 -0.58 Jordan Zimmermann 3,087 16.07 15.42 4.23 19.88 19.74 0.73 28.77 28.88 -0.37 Felix Hernandez 3,036 15.82 15.11 4.70 23.22 23.12 0.40 28.70 28.81 -0.39 1,848 14.88 14.46 2.93 21.40 21.51 -0.54 26.80 26.55 0.92 J.A. Happ 2,821 17.06 16.51 3.30 21.25 20.87 1.85 29.36 29.97 -2.03 3,029 18.07 17.44 3.61 22.42 22.24 0.81 31.28 31.29 -0.05 3,097 15.10 14.34 5.27 19.60 19.53 0.36 28.96 28.91 0.19 Michael Wacha 2,912 16.57 16.22 2.18 20.17 20.08 0.45 28.57 28.35 0.78 3,383 14.99 14.61 2.64 34.03 33.82 0.63 22.69 22.92 -1.01 3,234 15.02 14.58 3.07 23.72 23.72 -0.03 22.16 22.18 -0.12 Brett Anderson 2,700 16.07 15.08 6.56 15.62 15.47 1.00 31.15 31.73 -1.85 James Shields 3,313 17.24 16.51 4.47 25.28 25.12 0.64 30.76 30.81 -0.18 Andrew Cashner 3,170 17.85 16.88 5.77 21.14 20.52 2.99 32.55 32.84 -0.88 Tyson Ross 3,207 17.35 16.47 5.30 25.99 25.76 0.88 30.66 30.74 -0.27 Jeff Samardzija 3,334 16.25 15.60 4.16 17.97 17.91 0.31 30.37 30.44 -0.23 Chris Sale 3,319 16.36 15.96 2.47 32.04 32.08 -0.15 26.40 26.58 -0.67 Jose Quintana 3,351 17.07 16.37 4.28 20.71 20.53 0.86 28.88 29.93 -3.49 Julio Teheran 3,257 17.20 16.36 5.12 20.54 20.28 1.24 30.35 30.72 -1.23 Alex Wood 2,894 16.19 15.38 5.29 17.44 17.35 0.48 31.41 31.59 -0.57 Shelby Miller 3,216 16.30 15.83 2.94 20.08 19.88 0.97 29.05 28.84 0.75 Francisco Liriano 3,013 16.75 16.02 4.54 26.67 26.52 0.55 28.63 28.98 -1.19 Gerrit Cole 3,222 16.42 15.57 5.46 24.44 24.28 0.68 26.82 27.16 -1.26 Charlie Morton 1,970 16.09 15.47 4.02 17.27 17.05 1.27 30.10 30.55 -1.48 Chris Tillman 2,938 17.73 17.01 4.20 16.24 16.19 0.26 31.67 32.25 -1.80 Wei-Yin Chen 3,008 16.25 15.75 3.19 19.34 19.32 0.14 28.83 29.42 -2.02 Miguel Gonzalez 2,433 17.60 16.91 4.06 17.54 17.52 0.09 31.86 32.15 -0.91 Bartolo Colon 2,683 14.31 13.95 2.55 16.83 16.46 2.26 29.05 29.08 -0.12 Jacob deGrom 2,966 15.94 15.58 2.30 27.37 27.30 0.28 24.19 24.63 -1.82 Matt Harvey 2,699 15.15 14.80 2.37 24.72 24.90 -0.74 25.65 25.30 1.40 David Price 3,378 15.78 15.39 2.52 25.40 25.34 0.25 26.52 26.46 0.22 2,147 16.85 16.15 4.34 21.14 21.12 0.10 26.98 26.92 0.25 Anibal Sanchez 2,522 16.58 16.13 2.79 20.97 20.91 0.31 29.88 30.30 -1.41 Chris Archer 3,448 16.74 16.27 2.90 29.08 29.03 0.17 27.75 27.76 -0.06 Nate Karns 2,407 17.24 16.53 4.24 23.66 23.19 2.04 29.99 29.93 0.20 Jake Odorizzi 2,752 16.76 16.29 2.88 21.51 21.43 0.39 27.81 27.86 -0.17 Corey Kluber 3,262 15.34 14.74 4.05 27.73 27.65 0.29 26.19 26.07 0.47 Carlos Carrasco 2,764 15.83 15.16 4.43 29.72 29.59 0.44 26.35 26.71 -1.34 Trevor Bauer 2,862 16.98 16.30 4.15 22.97 22.70 1.19 30.93 30.95 -0.06 Mat Latos 1,787 16.00 15.64 2.28 20.18 20.04 0.66 30.92 30.59 1.06 Dan Haren 2,895 15.99 15.53 2.97 17.35 17.19 0.92 27.02 27.34 -1.19 Tom Koehler 2,965 16.76 15.96 5.00 17.22 16.84 2.28 31.74 31.90 -0.49 Yordano Ventura 2,641 16.89 16.25 3.91 22.54 22.51 0.14 30.13 30.45 -1.04 Danny Duffy 2,358 18.25 17.31 5.42 17.24 16.16 6.70 32.01 33.03 -3.10 Edinson Volquez 3,294 17.34 16.46 5.31 18.24 18.05 1.07 30.77 30.76 0.03

Table 3.A: Predicted and actual pitches per inning, strikeout percentage, and walk plus hit percentage for 90 MLB starting pitchers (1 of 2)

18 Pitches Per Inning Strikeout% Hit+Walk% Name Pitches Pred. Actual Error% Pred. Actual Error% Pred. Actual Error% 3,205 16.29 15.54 4.84 25.33 25.00 1.32 27.42 27.78 -1.28 3,427 15.65 15.01 4.25 27.18 27.13 0.19 22.54 22.53 0.05 Jason Hammel 2,670 16.52 16.16 2.23 24.63 24.23 1.69 26.95 27.32 -1.35 3,259 15.96 15.42 3.56 20.31 20.32 -0.08 27.17 27.60 -1.54 Mike Leake 2,733 14.92 14.34 4.04 15.42 15.30 0.84 28.12 28.02 0.35 Anthony Desclafani 2,879 16.44 15.81 3.95 19.41 19.24 0.90 31.05 31.08 -0.11 3,064 15.47 14.80 4.57 20.19 20.34 -0.74 26.97 27.08 -0.39 Scott Kazmir 2,940 16.67 16.07 3.75 20.32 20.31 0.03 28.56 28.96 -1.38 Kendall Graveman 1,895 17.34 16.48 5.22 15.34 15.34 0.02 32.65 32.67 -0.07 Jered Weaver 2,398 15.93 15.40 3.45 13.51 13.45 0.43 28.07 28.85 -2.69 Garrett Richards 3,239 16.33 15.69 4.04 20.37 20.35 0.09 29.32 29.48 -0.53 C.J. Wilson 2,101 16.96 16.04 5.78 19.93 19.89 0.19 29.45 29.29 0.53 Madison Bumgarner 3,297 15.49 15.19 2.01 27.10 26.93 0.65 24.63 25.09 -1.83 Tim Hudson 1,825 15.99 15.08 6.02 12.39 11.99 3.31 32.24 32.50 -0.78 1,738 16.27 15.80 2.99 17.50 17.41 0.53 27.36 27.46 -0.35 1,713 15.93 15.17 4.97 22.75 22.81 -0.27 29.06 29.21 -0.52 Rick Porcello 2,731 16.94 15.95 6.20 20.22 20.22 0.01 31.50 31.75 -0.80 Joe Kelly 2,373 18.56 17.73 4.68 18.76 18.77 -0.06 32.46 33.11 -1.95 Kyle Lohse 2,523 17.36 16.91 2.66 16.36 15.78 3.68 32.89 33.03 -0.41 2,378 16.71 16.33 2.28 15.64 15.94 -1.92 34.79 35.14 -1.00 Wily Peralta 1,748 17.13 16.21 5.70 12.54 12.55 -0.06 33.89 34.52 -1.84 2,289 15.22 14.87 2.35 22.87 22.82 0.18 24.67 25.12 -1.79 CC Sabathia 2,687 17.08 16.18 5.57 18.95 18.87 0.40 32.23 32.37 -0.43 Michael Pineda 2,548 16.36 15.91 2.86 23.43 23.35 0.32 29.18 29.49 -1.04 3,478 15.65 15.05 4.00 23.70 23.71 -0.04 25.44 25.91 -1.78 Scott Feldman 1,762 17.33 16.38 5.81 13.56 13.53 0.26 31.12 31.26 -0.47 Collin McHugh 3,226 16.44 15.95 3.09 20.06 19.91 0.79 29.61 30.03 -1.40 3,325 16.33 15.76 3.61 24.53 24.43 0.39 28.33 28.30 0.13 2,827 17.13 16.53 3.65 14.51 14.44 0.51 31.67 31.68 -0.06 Jerome Williams 1,955 16.92 16.50 2.54 13.39 13.29 0.71 34.47 35.38 -2.57 Drew Hutchison 2,504 17.58 16.59 5.95 19.51 19.63 -0.61 33.18 33.28 -0.31 R.A. Dickey 3,258 15.87 15.25 4.12 14.33 14.25 0.52 28.49 28.85 -1.23 2,815 15.00 14.27 5.12 10.96 11.00 -0.37 29.10 29.38 -0.95 3,217 18.51 17.52 5.64 15.05 15.26 -1.34 32.90 32.91 -0.04 3,164 16.06 15.57 3.12 16.68 16.49 1.12 28.81 29.15 -1.19 Nick Martinez 2,112 17.93 16.95 5.79 13.89 13.52 2.74 32.07 32.04 0.11 Phil Hughes 2,253 15.07 14.61 3.19 14.49 14.53 -0.30 30.22 30.94 -2.31 Ervin Santana 1,668 15.96 15.54 2.75 18.08 17.94 0.78 29.67 30.20 -1.73 3,211 17.36 16.66 4.24 17.82 17.66 0.89 29.82 29.84 -0.06 Josh Collmenter 1,916 16.54 16.03 3.21 12.70 11.34 11.96 29.80 32.30 -7.74 Jeremy Hellickson 2,449 17.16 16.97 1.13 19.09 19.03 0.35 30.12 30.03 0.30 Rubby de la Rosa 3,000 16.53 16.01 3.24 18.62 18.54 0.40 31.01 31.27 -0.85 2,441 17.25 16.50 4.51 21.35 21.10 1.16 30.76 31.34 -1.83 Kyle Kendrick 2,205 16.47 15.64 5.35 12.71 12.72 -0.08 34.14 34.18 -0.12 Chris Rusin 2,129 17.16 16.38 4.80 14.63 14.66 -0.24 34.70 34.98 -0.81 Average 2,740 16.47 15.84 3.93 20.32 20.18 0.75 29.32 29.57 -0.82

Table 3.B: Predicted and actual pitches per inning, strikeout percentage, and walk plus hit percentage for 90 MLB starting pitchers (2 of 2)

19 4 Checking Output with Past Literature

As mentioned in the introduction, Katz(1986) and Hopkins and Magel(2008) cal- culated actual batting averages and slugging percentages given initial counts. These researchers found that batters have higher batting averages and slugging percentages when they are ahead in the count, or when there are more balls than strikes. Using the R(I − Q)−1 matrix, I calculate expected on-base percentage and bases per plate appearance, which are comparable to batting average and slugging percentage, for each initial count.7 Figure 5 plots how the averages for all 90 pitchers of the expected values of these statistics, in addition to strikeout percentage, change as the count progresses.

Figure 5: Average expected on-base percentage, bases per at-bat, and strikeout percentage for 90 MLB pitchers for all initial counts

7On-base percentage and bases per plate appearance differ from batting average and slugging percentage by accounting for times the batter reached base in a manner other than a hit.

20 Agreeing with prior research, these probabilities change as the count progresses. Holding the number of balls constant, the probability of a strikeout increases, and the probability of reaching base decreases, as the number of strikes increases. In addition, the probability of a strikeout decreases with an increase in the number of balls, and the probability of reaching base increases with an increase in the number of balls. These results are displayed by the opposite and cyclical trends in Figure 5. The intuition behind the increased probability of a walk as the number of balls increases and the increased probability of a strikeout as the number of strikes increases is simple: the closer the at-bat gets to a strikeout or a walk, the more likely it is to happen.

5 Evaluation of Traditional Baseball Strategies

Up to this point, the statistics I have reverse-predicted are means for verifying that Markov chains make a reasonable, strikingly accurate, model for real life baseball at-bats. Now comes the more interesting part of my thesis: examining how the Markov chain and resulting metrics can change with certain variables. Rather than taking the values in M as given based on 2015 data, I would like to understand how the batter or pitcher can manipulate M to his advantage and to test whether certain traditional strategies in baseball actually work. I will attempt to answer two questions:

1. Is a batter better off — can he raise his on-base percentage and raise the pitcher’s number of pitches per inning — “taking,” or automatically not swinging at, the first pitch of each at-bat?

2. Is a pitcher better off — can he lower his opponent’s on-base percentage and lower his own pitches per inning — throwing a ball on the (0,2) count?

21 I choose to examine on-base percentage because winning baseball games requires scoring runs (or preventing the other team from scoring runs) and therefore requires getting as many runners on base as possible. Houser(2005) found that OBP is the most powerful statistic in predicting the number of wins for an MLB team. A pitcher wants to prevent the batter from reaching base, and the batter wants to reach base. The second statistic I take into account is pitches per inning. As explained earlier, a pitcher wishes to keep his pitch count low so that he can pitch deeper into the game and stay healthy. On the other hand, the team batting wants to elevate the pitch count. Because baseball is played in series of three or four games, batters know that forcing the starting pitcher to leave the game early will cause the opposing team to use more relief pitchers, so the opposing team will be left with fewer relief pitchers for the remaining games in the series. Usually relief pitchers are not as skilled as starting pitchers, so a starting pitcher leaving early translates to a higher win percentage for the batting team.

5.1 Taking the First Pitch

One common habit among batters in baseball is to “take,” or not swing at, the first pitch, no matter how appealing the pitch is. Batters claim that this allows them to get comfortable in the batter’s box and to “calibrate” their timing to the pitcher’s windup and release. By taking the first pitch, the batter cannot get a hit or hit into an out, so all entries in the first column of his transition matrix except for A, D, and AL are changed to zero. One might think that in this case the probability of the pitch being called a strike will simply be the probability that the pitch is in the strike zone; however, this assumes that umpires — the judges of the strike zone — are perfect. In reality, umpires call a few pitches in the strike zone as balls and surprisingly many

22 pitches outside the strike zone as strikes. Conditioning on the location of the pitch, and given that the batter does not swing, if we let K = called strike, L = called ball, Z = pitch in strike zone, and B = pitch not in strike zone,

A = P (K) = P (K | Z)P (Z) + P (K | B)P (B), (19)

D = P (L) = P (L | Z)P (Z) + P (L | B)P (B), (20) and AL remains unchanged.8 In addition to these changes to the first column of M, the argument for taking the first pitch claims that, especially in the first at-bat of a game, the batter can improve his swing and timing for the rest of the at-bat by carefully watching the first pitch. Mets first baseman Lucas Duda states, “Chances are I won’t swing first pitch of my first at-bat. Just get timing down, maybe the movement of the ball, just go from there” (Lemire, 2014). Similarly, first baseman Joey Votto claims, “I think that as often as you can get information from the pitcher, I think you’re going to be better in the long run. . . I just think your brain and your body — the connection between the two — needs the feedback from the pitcher” (Lemire, 2014). These players claim that the probability of making contact, putting the ball in play, or getting a hit on a given count after (0,0) depends on whether or not the batter took the first pitch. However, because Markov systems must satisfy equation (3), this history-dependent calibration is outside the scope of this model. Using the Markov at-bat model, I explore how the expected outcomes of at-bats against each of the 90 MLB pitchers sampled change depending on whether or not batters take the first pitch. Table 4 displays the output of this model.

8Entry AL, the probability of the batter being hit by the first pitch, should not change with his strategy to take the first pitch or not because he would not swing at a pitch that is going to hit him, no matter his strategy.

23 Name ∆A (%) OBPnormal ∆OBP (%) ∆PPI Max Scherzer 1.56 24.04 -2.20 1.39 Stephen Strasburg 3.50 28.72 -6.42 1.16 Jordan Zimmermann 12.03 30.46 -2.65 1.74 Felix Hernandez 4.64 30.28 0.91 1.95 Hisashi Iwakuma 4.46 27.19 -3.94 1.15 J.A. Happ 9.36 30.49 -3.58 1.44 Lance Lynn 1.89 32.48 -1.41 1.36 John Lackey 13.89 30.54 -1.16 2.08 Michael Wacha 5.04 30.28 -0.13 1.70 Clayton Kershaw -2.76 23.81 -1.48 1.67 Zack Greinke 1.70 23.46 -2.47 1.44 Brett Anderson 2.09 32.49 0.32 1.57 James Shields -1.62 32.63 2.53 1.93 Andrew Cashner 4.26 35.11 0.19 1.76 Tyson Ross -1.84 32.25 4.30 1.80 Jeff Samardzija 9.30 32.35 1.12 1.99 Chris Sale 3.06 28.74 -0.94 1.43 Jose Quintana 4.79 31.45 1.59 1.61 Julio Teheran 2.36 32.37 0.41 1.52 Alex Wood 10.33 32.79 1.02 2.05 Shelby Miller 2.80 30.47 2.31 1.69 Francisco Liriano 0.62 30.69 0.21 1.72 Gerrit Cole -2.67 28.99 2.67 1.56 Charlie Morton 7.48 34.05 -0.93 1.87 Chris Tillman 4.53 32.75 1.84 1.68 Wei-Yin Chen 5.56 29.84 -0.33 1.47 Miguel Gonzalez 0.97 33.15 2.51 1.78 Bartolo Colon 13.23 30.53 0.37 1.85 Jacob deGrom 4.72 25.52 0.45 1.71 Matt Harvey 3.67 27.15 -1.18 1.84 David Price 6.98 27.54 0.10 1.67 Justin Verlander -1.23 28.48 -1.42 1.26 Anibal Sanchez 8.41 30.79 5.72 2.34 Chris Archer 2.37 28.90 -0.15 1.65 Nate Karns 1.74 31.63 2.69 1.78 Jake Odorizzi 4.67 29.53 -1.76 1.59 Corey Kluber 2.89 27.78 -2.33 1.73 Carlos Carrasco 1.54 28.14 2.17 1.72 Trevor Bauer 3.22 31.87 3.96 1.85 Mat Latos 7.98 31.53 0.63 1.72 Dan Haren 11.37 28.98 -2.21 1.81 Tom Koehler 9.54 33.50 -0.53 1.78 Yordano Ventura 0.38 32.15 1.77 1.72 Danny Duffy -1.67 34.05 5.05 1.91 Edinson Volquez 0.35 32.89 1.76 1.47

Table 4.A: Should batters take the first pitch against a given pitcher? Letting take be the indicator variable that equals 1 if batters always take the first pitch, column 2 displays ∆A = Atake=1−Anormal , the relative increase in the likelihood that the first pitch results in a Anormal strike, given that the batter always employs the take strategy. Column 3 displays OBPnormal, expected OBP using all data from the 2015 season, for each pitcher. Column 4 displays ∆OBP = OBPtake=1−OBPnormal , the expected increase in OBP given that the batter always OBPnormal takes the first pitch, relative to normal 2015 OBP. Column 5 displays the absolute increase in the expected number of pitches thrown per inning if batters always take the first pitch, compared to normal: ∆PPI = PPItake=1 − PPInormal. (1 of 2)

24 Name ∆A (%) OBPnormal ∆OBP (%) ∆PPI Jon Lester 5.23 29.10 -0.53 1.51 Jake Arrieta -1.84 24.27 2.07 1.64 Jason Hammel 1.76 29.71 -4.04 1.23 Johnny Cueto 2.08 29.14 3.10 2.14 Mike Leake 9.02 28.90 -1.05 1.66 Anthony Desclafani 3.82 32.47 0.02 1.52 Sonny Gray 4.54 28.18 -0.92 1.34 Scott Kazmir 3.50 30.66 1.78 1.84 Kendall Graveman 5.77 34.64 0.07 1.81 Jered Weaver 6.57 31.27 -1.89 1.12 Garrett Richards 1.99 31.06 2.57 1.72 C.J. Wilson 0.52 32.37 1.33 1.48 Madison Bumgarner 3.25 26.24 -2.76 1.36 Tim Hudson 7.63 33.97 2.07 1.87 Jake Peavy 4.64 28.25 -3.63 1.47 Clay Buchholz 4.56 31.19 -0.18 1.56 Rick Porcello 3.54 34.09 1.90 1.70 Joe Kelly 4.28 34.68 -1.94 1.36 Kyle Lohse 2.02 34.10 1.00 1.66 Matt Garza 13.49 35.69 -0.22 2.36 Wily Peralta 11.00 35.78 1.38 2.17 Masahiro Tanaka -1.00 25.83 4.14 1.71 CC Sabathia -0.09 34.72 -0.11 1.52 Michael Pineda 2.65 30.23 -2.62 1.09 Dallas Keuchel 6.07 26.65 -1.23 1.42 Scott Feldman 7.55 32.23 -3.59 1.20 Collin McHugh 2.93 31.14 2.03 1.53 Cole Hamels -2.59 30.27 4.49 1.94 Aaron Harang 1.43 33.41 -0.54 1.70 Jerome Williams 7.86 36.84 0.19 2.15 Drew Hutchison 3.35 35.74 0.03 2.02 R.A. Dickey 3.94 30.19 0.88 1.47 Mark Buehrle 6.07 31.66 -0.56 1.65 Yovani Gallardo 2.81 34.16 2.20 1.66 Colby Lewis 7.59 30.91 -2.68 1.48 Nick Martinez 0.84 36.38 2.86 1.79 Phil Hughes 12.66 31.14 1.45 2.18 Ervin Santana 3.71 31.22 3.44 2.43 Kyle Gibson 1.88 31.91 0.37 1.75 Josh Collmenter 6.81 30.20 -2.50 1.27 Jeremy Hellickson 1.77 31.87 -0.02 1.60 Rubby de la Rosa 5.80 32.49 0.59 1.89 Jorge de la Rosa -5.07 32.51 2.01 1.80 Kyle Kendrick 19.64 35.74 -2.78 2.18 Chris Rusin 5.91 36.74 2.15 2.08

Table 4.B: Should batters take the first pitch against a given pitcher? (2 of 2)

25 The results in Table 4 are worthy of discussion.9 From a high level, 50 of the 90 pitchers (56%) have ∆OBP > 0. Against these 50 pitchers, the model reports that batters should take the first pitch, even if they do not get a calibration boost for the remainder of the at-bat. Against the other 40 pitchers, there needs to be some sort of calibration effect later in the at-bat to offset the drop in expected OBP in order for taking the first pitch to pay off. Examining the list of pitchers with a ∆OBP < 0, it appears that this list includes several of the most dominant pitchers in the MLB, including Zack Greinke, Clayton Kershaw, and Max Scherzer, who have the 1st, 3rd, and 4th lowest amounts of walks and hits allowed per inning pitched (WHIP), respectively. Table 5 addresses this theme numerically.

WHIP Median < 0 28 12 ∆OBP > 0 16 34

Table 5: Pitchers sorted by WHIP category and ∆OBP category. The proportions of pitchers with ∆OBP < 0 are statistically significantly different between pitchers with WHIP values above the median and pitchers with WHIP values below the median (p < 0.001).

As displayed in Table 5, 64%, or 28 of the 44 pitchers with a WHIP less than the median of the group have ∆OBP values less than zero. Meanwhile, 74%, or 34 of the 46 pitchers with a WHIP greater than the median of the group have ∆OBP greater than zero. Generally speaking, according to the model, batters should take

9 Note that because STATISTICnormal is calculated using probabilities derived from a sample including every pitch in 2015, it necessarily includes cases where the batter took the first pitch. It is impossible to distinguish between times that the batter intentionally took the first pitch, and times he simply did not swing because the first pitch was not appealing. One might argue that STATISTICswing=1, the expected STATISTIC given that the batter swings at the first pitch, would be a good proxy of STATISTICtake=0, the expected STATISTIC given that the batter did not take the first pitch. However, STATISTICswing=1 is a biased measure: Many batters are more selective on the first pitch, so a swing indicates that the pitch is particularly appealing and potentially easier to hit. Therefore STATISTICswing=1 is likely different than STATISTICtake=0.

26 the first pitch against weaker pitchers, even if they do not gain a calibration; however, the effectiveness of taking the first pitch against stronger pitchers depends on the calibration gained. Relating the second and fourth columns of Table 4, as ∆A increases, the probability the batter will face a (0,1) count if he takes the first pitch increases and the probability he will face a (1,0) count decreases. As shown in Figure5, in a sample combining all 90 pitchers, expected on-base percentage beginning from (0,1) is lower than that of (1,0). Intuitively, this implies the general pattern that as ∆A increases, ∆OBP should decrease, so a batter must gain more from taking the first pitch in order for it to be worth it. However, this is nowhere near a strict law for the sample studied, as shown in Figure 6.

Figure 6: Scatter plot of ∆OBP vs. ∆A for all 90 pitchers. ∆A is the relative increase in the likelihood that the first pitch results in a strike, given that the batter always employs the take strategy. The R2 of the trend line is 10.6%.

27 In the sample studied for each pitcher, the drop in expected OBP from (0,0) to (0,1) may be significantly greater than the jump in expected OBP from (0,0) to (1,0). In this case, the risk-reward of taking the first pitch, even if ∆A is very low or negative, is too high, so the batter should take advantage the pitcher’s relative weakness on the first pitch of the at-bat, unless he is compensated with a high calibration. For example, for Justin Verlander, expected opponent OBP starting from (0,0) is 28.5%. At (1,0) it bumps up an absolute 2.2%, but on (0,1) it drops 2.9%. Therefore, the potential penalty of landing at (0,1) is strong enough to overcome the fact that ∆A is negative. The changes in expected OBP and pitches per inning resulting from batters always taking the first pitch may seem minor; however, some are relatively large. For instance, according to this model, taking the first pitch against Anibal Sanchez results in a relative increase in OBP of 5.72%. Similarly, taking the first pitch against Ervin Santana increases his expected number of pitches per inning by 2.43, decreasing his efficiency by 15.2%. That is roughly the difference between Santana being able to pitch eight innings and having to come out near the end of the sixth inning. This model and its output face several limitations, in addition to those already mentioned. Firstly, I assume that taking the first pitch is a binary strategy: either the batter decides ahead of time that he will not offer at the first pitch, or he does not. In reality, even if a batter approaches the plate leaning towards taking the pitch, he would probably swing if the pitch was right in his wheelhouse. Secondly, this model is general and is based on data for every batter that a given pitcher faced in 2015. Future research using this model should focus on specific batter–pitcher match-ups in order to gain more actionable output. Another limitation is that I assume the batter’s goal in every at-bat is to maximize expected OBP. However, depending on circumstances such as the score, inning, and numbers of outs and runners on base, the

28 goal may be to advance a baserunner or to make the pitcher throw as many pitches as possible. Lastly, and most importantly, this model does not account for the crucial element of game theory involved in an at-bat. For example, if all batters looked at this output and started taking the first pitch every at-bat against Tyson Ross (∆OBP = 4.3%), Ross would adjust his strategy and throw more strikes on the first pitch. This would increase ∆A, likely decreasing ∆OBP until a steady state was reached. For this reason, these results mainly show directionality and probably do not apply to the border case of taking the first pitch 100% of the time.10

5.2 “Wasting” the (0,2) Pitch

Another common teaching, almost accepted as a truism in baseball leagues for younger players, is that a pitcher should throw a “waste” pitch, a pitch outside the strike zone, on (0,2) counts. Coaches claim that throwing a ball outside the strike zone on (0,2) has two main advantages: First, because the batter has two strikes, he will have to “protect the plate,” or swing at pitches that are anywhere close to the strike zone so that the umpire does not call him out. Therefore, he is more likely to swing at a bad pitch and strike out. Secondly, by throwing a ball low in the dirt or up near the batter’s chest, the pitcher can change the eye-level of the batter, thus setting himself up to strike the batter out on the (1,2) pitch. This second effect, which makes the “waste” label a misnomer, is the opposite of the calibration effect mentioned for the strategy of taking the first pitch. Similar to before, if the probability of making contact, putting the ball in play, or getting a hit on the (1,2) pitch depends on the location of the (0,2) pitch, then the Markov equality of equation (3) is broken. Therefore, this

10Although it is not practical for batters to take the first pitch 100% of the time, some players get very close. J.J. Hardy of the and Brett Gardner of the lead the MLB, taking 91.6% of first pitches (Gentile, 2013).

29 potential “uncalibration” effect of the waste pitch is outside the scope of this model. Implementing the first effect into the model, if we let B = pitch outside strike zone and Z = pitch inside strike zone, then

M(i, 3) = MB(i, 3)P (B) + MZ (i, 3)P (Z), (21)

for all i, where MB(i, 3) and MZ (i, 3) can be calculated by only including pitches that were thrown outside or inside of the strike zone on (0,2) counts, respectively. By intentionally throwing a ball on the (0,2) count, the pitcher sets P (Z) = 0 and

P (B) = 1, so entries in the third column of M will simply be the values of MB(i, 3). The opposite is true if the pitcher always throws a strike on (0,2). Using the Markov at-bat model, I explore how the expected outcomes of at-bats against each of the 90 MLB pitchers sampled change depending on whether or not pitchers throw the (0,2) pitch outside the strike zone. Table 6 displays the output of this model.

From a high level, 51 of the 90 pitchers (57%) have ∆OBP(0,2),norm. < 0. The model reports that these 51 pitchers should always throw a waste pitch on (0,2) instead of a strike, even if this has no impact on the result of the (1,2) pitch. For the other 39 pitchers, throwing a ball on the (0,2) pitch is only worthwhile if this helps reduce OBP on the (1,2) pitch, possibly by increasing the chances of the batter swinging and missing or making weak contact. To investigate if the skill level of the pitcher is correlated with the directionality

of his ∆OBP(0,2),norm., as it was with ∆OBPtake=1, I recreate the table from the prior section. Table 7 shows that 59% or 26 of the 44 pitchers with a WHIP less than

the median of the group have ∆OBP(0,2),norm. < 0. Meanwhile, 54% or 25 of the 46

pitchers with a WHIP greater than the median of the group have ∆OBP(0,2),norm. < 0.

30 Name ∆AH (%) ∆OBP(0,2),norm. (%) ∆OBP(0,2),act. (%) P (waste = 1) (%) Max Scherzer -45.45 3.29 17.87 73.33 Stephen Strasburg 47.54 -5.40 -28.39 77.22 Jordan Zimmermann 2.31 -7.31 -26.37 73.85 Felix Hernandez -36.40 0.73 3.77 77.03 Hisashi Iwakuma -3.54 -4.09 -21.69 77.30 J.A. Happ 4.35 -5.78 -22.92 74.19 Lance Lynn -22.81 -10.11 -36.18 75.47 John Lackey 3.63 -7.55 -27.45 73.38 Michael Wacha -43.72 0.65 3.87 76.04 Clayton Kershaw -48.96 4.26 22.16 73.74 Zack Greinke -35.63 4.74 76.87 86.14 Brett Anderson -2.26 7.39 75.97 76.88 James Shields -22.00 -18.72 -58.97 83.24 Andrew Cashner -32.95 8.77 40.49 66.82 Tyson Ross -14.22 1.04 4.43 74.16 Jeff Samardzija 8.25 -3.12 -15.04 75.65 Chris Sale -22.64 -8.05 -32.00 74.65 Jose Quintana -34.76 -0.70 -6.14 86.46 Julio Teheran 1.11 5.55 33.65 72.00 Alex Wood -10.70 -1.18 -3.99 68.13 Shelby Miller -19.48 9.64 42.33 64.71 Francisco Liriano -2.88 -21.90 -66.43 82.01 Gerrit Cole 5.64 -7.22 -30.07 74.58 Charlie Morton -37.94 1.73 5.42 66.18 Chris Tillman -41.67 14.94 170.16 73.58 Wei-Yin Chen -40.73 -13.92 -42.75 74.31 Miguel Gonzalez -47.67 6.26 23.11 81.13 Bartolo Colon -36.51 -0.51 -1.64 64.04 Jacob deGrom 3.02 5.92 35.18 70.82 Matt Harvey -41.60 8.78 44.27 67.76 David Price -36.19 2.28 9.50 67.21 Justin Verlander 2.70 -9.18 -36.02 74.50 Anibal Sanchez -28.89 -2.30 -11.91 80.84 Chris Archer -26.74 -0.49 -3.45 80.37 Nate Karns 7.21 -4.96 -18.29 69.38 Jake Odorizzi -17.81 -3.64 -19.24 76.44 Corey Kluber -11.20 0.87 4.27 73.58 Carlos Carrasco 49.76 -21.40 -57.25 73.25 Trevor Bauer 36.44 -12.48 -55.04 82.08 Mat Latos -13.85 0.78 2.81 65.00 Dan Haren -62.07 -14.15 -62.24 86.83 Tom Koehler -16.06 8.36 63.52 79.65 Yordano Ventura -13.39 -1.43 -7.60 75.48 Danny Duffy -34.62 2.82 9.72 60.47 Edinson Volquez -42.54 6.88 32.36 66.19

Table 6.A: Should a given pitcher throw a waste pitch on (0,2)? Letting waste be the indicator variable that equals one if the pitcher always uses the waste pitch and zero if the pitcher never uses the waste pitch, column 2 displays ∆AH = AHwaste=1−AHwaste=0 , the AHwaste=0 increase in the likelihood that the (0,2) pitch results in a strikeout, given that the pitcher always throws the pitch outside the strike zone on (0,2), relative to that probability given that he always throws the pitch inside the strike zone. Column 3 contains ∆OBP(0,2),norm., the relative increase in expected OBP starting from (0,2), given that the pitcher throws a waste pitch, compared to OBP(0,2),normal, the expected OBP for a batter with two strikes given all 2015 data for each pitcher. Column 4 lists ∆OBP(0,2),act., the relative increase in expected OBP starting from (0,2), given that the pitcher always throws a waste pitch, compared to the expected OBP given that the pitcher never throws a waste pitch. Lastly, column 5 displays P (waste = 1), the proportion of time that a given pitcher used a waste pitch on (0,2) counts in 2015. (1 of 2) 31 Name ∆AH (%) ∆OBP(0,2),norm. (%) ∆OBP(0,2),act. (%) P (waste = 1) (%) Jon Lester -17.30 -12.93 -55.35 84.26 Jake Arrieta -3.81 7.93 67.84 75.20 Jason Hammel -17.83 -9.42 -32.09 75.26 Johnny Cueto -16.87 -0.30 -2.16 79.81 Mike Leake 229.77 -12.90 -36.76 80.37 Anthony Desclafani 0.73 -5.20 -19.12 71.73 Sonny Gray 40.03 -6.70 -26.11 72.81 Scott Kazmir -34.93 -6.31 -22.33 71.09 Kendall Graveman -77.19 -0.43 -3.58 85.39 Jered Weaver -52.48 5.67 43.45 75.94 Garrett Richards 202.12 -12.90 -42.95 77.93 C.J. Wilson 43.62 5.94 64.65 83.93 Madison Bumgarner -37.10 2.19 40.71 78.28 Tim Hudson 6.53 7.51 49.26 77.17 Jake Peavy -4.51 10.11 224.52 79.34 Clay Buchholz -32.26 -1.89 -6.88 72.86 Rick Porcello -37.97 5.63 32.47 71.26 Joe Kelly 18.70 -1.29 -6.13 74.68 Kyle Lohse -28.92 0.32 2.31 82.42 Matt Garza 22.33 -5.92 -17.75 67.76 Wily Peralta 106.56 -14.71 -45.96 77.22 Masahiro Tanaka 100.95 17.05 231.28 77.06 CC Sabathia 0.53 -3.32 -14.12 76.83 Michael Pineda 111.19 -13.76 -42.69 70.98 Dallas Keuchel 6.94 -0.28 -3.01 89.11 Scott Feldman 1.45 -1.56 -7.06 76.67 Collin McHugh -25.47 -5.83 -30.47 82.21 Cole Hamels 32.14 -2.47 -8.73 68.29 Aaron Harang -50.23 8.36 87.32 77.50 Jerome Williams 3.70 4.65 24.99 77.14 Drew Hutchison 23.29 -4.27 -26.29 80.22 R.A. Dickey -46.75 2.66 9.45 67.60 Mark Buehrle -5.00 5.47 33.97 75.95 Yovani Gallardo 118.98 1.08 15.32 84.57 Colby Lewis 56.62 -0.80 -3.92 74.87 Nick Martinez -79.61 1.56 11.63 83.06 Phil Hughes -75.91 -2.73 -13.82 77.25 Ervin Santana -23.29 -0.70 -7.80 90.12 Kyle Gibson -2.33 -5.82 -49.41 92.47 Josh Collmenter -37.14 8.41 118.73 81.40 Jeremy Hellickson -9.15 -0.28 -1.46 77.58 Rubby de la Rosa -30.30 5.60 31.22 75.00 Jorge de la Rosa -60.24 -12.54 -41.97 78.42 Kyle Kendrick -65.53 -10.13 -27.68 77.19 Chris Rusin 0.47 0.02 10.73 77.24

Table 6.B: Should a given pitcher throw a waste pitch on (0,2)? (2 of 2)

32 The lack of significant difference between these two ratios implies that the skill level of the pitcher probably does not have an impact on whether or not he should be throwing an (0,2) waste pitch.

WHIP Median < 0 26 25 ∆OBP (0,2),norm > 0 18 21

Table 7: Pitchers sorted by WHIP category and ∆OBP category.

Although skill level does not have a significant impact on the benefit of throwing a waste pitch for a given pitcher, it is possible that another determinant, pitcher style, does have a significant impact. Instead of sorting based on WHIP, Table 8 groups pitchers into categories based on the average number of batters that the pitcher strikes out per nine innings pitched (K/9). Pitchers with a higher K/9 get more of their outs from strikeouts, so they are known as strikeout pitchers; pitchers with lower K/9 get their outs from contact, so they are known as contact pitchers.

K/9 >Median 0 17 22

Table 8: Pitchers sorted by K/9 category and ∆OBP category. The proportions of pitchers with ∆OBP < 0 are not statistically significantly different between strikeout pitchers and contact pitchers.

Table 8 shows that although contact pitchers are almost evenly split between

positive and negative ∆OBP(0,2),norm. values, 62% of strikeout pitchers benefit from throwing a waste pitch. This result makes intuitive sense because by throwing the

33 ball outside the strike zone, strikeout pitchers decrease the batter’s contact rate,

P (contact) , (22) P (swing)

thus increasing that chances that the batter strikes out by swinging and missing and decreasing the chances that the batter hits the ball in play. Relating the second and third columns of Table 6, as ∆AH increases, the probability that the batter will strikeout on the (0,2) pitch when the pitch is a ball increases relative to when the pitch is a strike. This implies the general pattern that as ∆AH

increases, ∆OBP(0,2),norm. should decrease. However, this relationship is far from linear, as shown in Figure 7. In the sample studied for each pitcher, the increase in expected OBP from (0,2) to (1,2) can be quite large, so even if ∆AH is positive, meaning strikeout probability on the (0,2) pitch increases when the waste pitch is used, the risk of the batter not swinging and reaching the (1,2) count is too great. This would especially be the case if the normal probability of the pitcher converting an (0,2) count immediately into a strikeout was very low. For example, C.J. Wilson normally converts only 15.2% of (0,2) counts immediately into strikeouts, compared to, for example, a 26.2% rate for Clayton Kershaw. Therefore, even though his ∆AH is strongly positive, the waste pitch does not increase the absolute probability of an (0,2) strikeout by as much as one might think. Relating the third and fourth columns of Table 6, it is important to note that when deciding which strategy to use, a pitcher should not think about OBPwaste=1 vs. OBPnormal (column 3); instead, he should think about OBPwaste=1 vs. OBPwaste=0 (column 4). Although these are the same directionally, the potential impact on expected OBP starting from (0,2) is much larger when the outcome is framed in terms of one choice vs. the opposite of that choice.

34 2 Figure 7: Scatter plot of ∆OBP(0,2),norm. vs ∆AH for all 90 pitchers. The R of the trend line is 7.2%.

35 For example, for Masahiro Tanaka, Table 6 shows that if he always used a waste pitch, his opponent OBP starting from (0,2) would be 17% higher than normal, relatively. However, in the moment, choosing to throw a waste pitch instead of a strike on an (0,2) pitch would cause his opponent’s expected OBP for that at-bat to increase by 231%! The reason that the 17% is so much lower than 231% is that

Tanaka actually throws a waste pitch 77% of time (n = 170), so OBPnormal is already

quite close to OBPwaste=1. Although batters would likely adjust if Tanaka switched to primarily throwing

strikes on the (0,2) count, thus decreasing ∆OBP(0,2),act., it seems likely that there is plenty of room for him to increase the percentage of the time he throws a strike on

the (0,2) count before ∆OBP(0,2),act. turns negative. Indeed, in terms of optimizing decision-making through the perspective of game theory, the goal of a pitcher should

be to increase P (waste = 1) if ∆OBP(0,2),act. < 0 and vice versa until ∆OBP(0,2),act. crosses zero. In other words, as long as one strategy is better than the other, the pitcher should increasingly pursue that strategy. Therefore, pitchers who currently

optimize their (0,2) decision-making are those who either have ∆OBP(0,2),act. values close to zero, or who have P (waste = 1) ratios that are close to fixation at 0% or 100% in the direction representing their dominant strategy. The output of this model shares many of the limitations that affected the first- pitch take results above, including generality and a lack of game theory feedback. In addition, this model suffers from the assumption that a pitcher has perfect accuracy and can throw a ball or a strike whenever he wants. Moreover, I do not consider the fact that the strike / ball distinction is not a fine line. A strike can be thrown right down the middle of the plate, or it can be thrown on one of the corners. Strikes on the corners are harder to hit than strikes in the middle of the plate, but I treat them the same for simplicity.

36 6 Optimizing Pitcher Decision-Making

The analysis used to determine if the (0,2) waste pitch benefits a given pitcher and to measure how much better off a pitcher is using one strategy instead of another can be generalized to include every count. In this section, I use both gradients and an optimization technique to determine how expected opponent OBP against a given pitcher changes with the probabilities that he throws the ball in the strike zone on each possible count. Next, applying these techniques to examine pitch selection, I model how expected opponent OBP against a given pitcher changes with the probabilities that he throws a fast ball on each possible count. For both of these strategies — ball vs. strike and fast ball vs. off-speed pitch — we can measure how good a given pitcher is at optimizing decisions.

6.1 Pitch Location

This section broadens the analysis of the (0,2) waste pitch to examine the decision of pitch location for every possible count. Although throwing a ball on a non-(0,2) count is not as popular of a strategy as the classic waste pitch, it is possible that throwing balls on other counts, likely those with two strikes, might reduce expected OBP as well. Moreover, it may be that (0,2) pitch location is not even the most important decision for a given pitcher; pitch location on other counts may impact expected OBP in a much stronger way. To explore these questions, a framework for analyzing the effect of pitch location

is needed. Letting MB = M|B, MZ = M|Z, and defining p to be the 1 × 12 vector of probabilities that the pitcher throws a strike on each of the 12 possible counts, then

M is a linear combination of the columns of MZ and MB: Letting Mi represent the ith column of M,

37 Mi = piMZ,i + (1 − pi)MB,i, (23)

for 1 ≤ i ≤ 12. Pitch location decisions change M by adjusting the weights on each

MZ,i away from the corresponding pi. Letting x be the 1 by 12 vector of disturbances, where xi is the additional probability of throwing a strike on count i, by changing his probabilities away from p, a pitcher creates a new transition matrix, N, where

Ni = (pi + xi)MZ,i + (1 − pi − xi)MB,i, (24)

for 1 ≤ i ≤ 12. Because MZ ,MB, and p are constants for a given pitcher based on 2015 data, any statistic rendered by manipulating N is really a function of x.

6.1.1 The Gradient of the Pitch Location Function

Let S(x) be the function representing expected opponent on-base percentage at the beginning of an at-bat, given x. By computing the gradient (slope) of S in the ith

direction at an initial position, x0, we can examine how expected OBP changes with

changes in xi, holding all other location probabilities constant: If ei is the unit vector in the ith dimension,

S(x + e ) − S(x − e ) [∇ S] = 0 i 0 i + O(2), (25) x i 2 with  small, in this case 10−6.

If we let x0 be a 1 × 12 zero vector, [∇xS]i shows how expected OBP for a given pitcher would change if he only increased the probability of throwing a strike on count

i and left all other probabilities as they were in 2015. Table 9 displays [∇xS] for each count for each of the 90 pitchers. Figure 8 visualizes this table in an expression plot.

38 Gradient of S(x0) in Each Direction (%, Multiplied by 100) Name (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) Max Scherzer -3.78 -0.57 -0.66 -1.90 -1.08 1.11 -1.09 -1.39 -2.84 -0.53 -1.07 -3.20 Stephen Strasburg -1.35 -2.77 1.11 -3.39 -0.57 0.67 -2.56 -1.86 -0.38 -0.78 -1.75 -4.71 Jordan Zimmermann -5.17 -2.60 1.71 -2.22 -1.00 0.89 -2.32 -1.41 0.57 -0.46 -1.76 -2.43 Felix Hernandez -2.62 -1.19 -0.15 -3.42 0.20 2.04 -1.63 -1.10 -0.95 -0.33 -2.38 -4.02 Hisashi Iwakuma -5.92 -0.10 0.62 -2.13 0.95 -2.69 -0.77 -0.19 -0.54 -0.50 -1.35 -2.37 J.A. Happ -3.32 -1.71 0.73 -3.73 -0.67 -1.57 -1.75 -4.30 -3.77 -0.87 -2.83 -4.58 Lance Lynn -5.83 -3.77 1.26 -1.44 -1.23 -0.56 -2.77 -3.70 -1.03 -1.30 -5.34 -3.61 John Lackey -2.27 -1.78 1.49 -0.93 -0.50 -0.48 -1.92 -2.22 -1.64 -0.29 -1.64 -4.21 Michael Wacha -4.81 -2.67 -0.14 -4.32 -0.12 0.78 -1.19 -2.59 -4.59 -0.74 -1.73 -2.71 Clayton Kershaw -4.00 -1.83 -0.57 -1.65 -0.47 2.14 -1.55 -1.83 -2.86 -0.61 -2.12 -2.42 Zack Greinke -1.61 -0.76 -0.89 -1.64 -2.10 0.11 -0.45 -2.07 -2.06 -0.89 -0.96 -2.69 Brett Anderson -2.21 1.10 -1.46 -5.39 -3.69 -0.92 -2.79 -1.77 2.24 -1.19 -2.99 -1.41 James Shields -4.38 0.42 4.20 -3.83 -1.45 -0.54 -2.82 -4.51 -0.70 -1.62 -3.43 -5.43 Andrew Cashner -4.18 -0.99 -1.37 -1.50 -2.11 2.21 -2.39 -3.47 -1.32 -1.31 -1.52 -3.74 Tyson Ross -8.97 -1.53 -0.14 -1.18 -0.78 0.84 -1.75 -3.72 -2.13 -1.05 -2.50 -4.94 Jeff Samardzija -4.30 -0.76 0.58 -2.49 -0.01 -0.09 -1.46 -2.19 -1.91 -0.94 -1.06 -5.05 Chris Sale -4.37 -1.28 1.56 -4.78 -0.83 2.36 -1.10 -3.01 -0.83 -0.47 -3.03 -4.02 Jose Quintana -4.49 -1.58 0.31 -0.95 -3.07 1.38 -1.42 -1.45 -2.02 -0.55 -1.28 -4.38 Julio Teheran -5.90 -2.89 -0.82 -5.27 -1.57 1.07 -2.22 -0.90 0.18 -1.35 -3.26 -4.41 Alex Wood -5.76 -1.31 0.13 -3.04 -2.22 0.13 -2.03 -1.59 -1.48 -1.51 -3.46 -2.55 Shelby Miller -7.86 -2.67 -1.45 -3.06 -1.88 -0.09 -2.14 -2.02 -3.55 -1.32 -1.50 -3.27 Francisco Liriano -3.52 -3.31 2.60 -2.49 -3.66 -1.27 -2.44 -2.32 -5.03 -0.66 -3.02 -4.03 Gerrit Cole -4.59 1.15 1.16 -5.29 -1.32 -0.66 -1.10 -1.00 0.00 -0.69 -2.42 -4.66 Charlie Morton -5.93 -3.82 -0.20 -0.14 0.21 -2.67 -1.87 0.00 -0.74 -1.10 -1.57 -2.90 Chris Tillman -5.77 -0.91 -2.33 -4.22 -4.00 -2.27 -3.37 -2.38 -3.73 -1.23 -3.35 -2.95 Wei-Yin Chen -3.78 0.18 3.10 -2.58 -0.87 -0.61 -2.54 -0.41 0.18 -0.74 -2.24 -3.27 Miguel Gonzalez -3.98 2.22 -0.92 -3.86 -5.15 0.63 -1.37 -3.71 -4.43 -0.32 -1.25 -4.06 Bartolo Colon -1.98 -0.69 0.08 -1.00 -0.51 1.02 -0.27 0.08 -0.13 -0.23 -0.43 -2.63 Jacob deGrom -6.79 -1.69 -0.95 -2.21 -2.46 -0.18 -2.27 -1.70 -1.71 -0.67 -1.39 -5.56 Matt Harvey -3.51 -3.08 -1.06 -2.54 -0.28 2.32 -1.65 0.00 -2.69 -0.81 -1.16 -3.89 David Price -3.51 -0.66 -0.38 -2.78 -1.46 -0.06 -1.77 -0.93 -0.53 -0.64 -1.92 -3.73 Justin Verlander -2.04 -2.60 1.89 -1.19 -3.38 -0.86 -1.26 -1.16 1.02 -1.06 -1.88 -5.37 Anibal Sanchez -9.79 -2.81 0.48 -3.04 -3.45 -3.41 -1.98 -1.95 -2.91 -0.74 -2.46 -3.29 Chris Archer -5.15 -2.66 0.09 -4.73 0.37 2.02 -1.41 -4.14 -3.12 -0.61 -3.32 -4.54 Nate Karns -6.98 -0.71 0.89 -4.49 -3.82 -1.57 -2.54 -4.19 -3.80 -1.34 -2.61 -3.21 Jake Odorizzi -2.70 -1.07 0.70 -2.75 1.14 -1.39 -2.33 -3.12 -0.58 -0.99 -2.43 -6.19 Corey Kluber -2.71 1.35 -0.12 -3.01 -0.76 1.24 -1.87 -1.46 -1.83 -1.12 -1.38 -1.51 Carlos Carrasco -4.44 0.18 3.78 -1.04 -1.54 2.79 -1.61 -1.90 -1.36 -0.75 -2.20 -2.33 Trevor Bauer -6.67 -1.78 3.20 -3.60 -3.40 2.26 -2.95 -2.50 -2.82 -1.52 -3.39 -5.94 Mat Latos -4.49 2.22 -0.08 -2.78 -1.79 0.55 -1.60 -2.55 -1.36 -0.73 -1.65 -4.93 Dan Haren -2.40 -0.36 3.84 -0.66 -0.65 -1.76 -1.49 -0.92 -1.31 -1.35 -2.35 -4.72 Tom Koehler -7.08 -2.16 -1.38 -3.97 -4.51 1.19 -4.04 -2.43 -1.08 -1.93 -2.63 -3.84 Yordano Ventura -4.07 -1.38 0.23 -3.24 -3.12 1.99 -3.48 -1.00 -2.99 -1.59 -3.59 -4.74 Danny Duffy -11.03 -1.50 -0.40 -6.19 -4.32 1.23 -2.37 -3.14 -4.55 -0.67 -3.21 -4.37 Edinson Volquez -8.08 -1.64 -0.94 -3.60 0.10 0.04 -2.26 -3.50 -0.65 -1.02 -3.44 -3.97

Table 9.A: Gradients of S at x0: How expected OBP changes as the proportion of strikes thrown at any count increases. Example: For an absolute increase of 1% in the probability that Max Scherzer throws the ball in the strike zone on the (0,0) count, his expected OBP decreases absolutely by 0.0378%. (1 of 2)

39 Gradient of S(x0) in Each Direction (%, Multiplied by 100) Name (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) Jon Lester -3.01 -0.40 3.10 0.79 0.36 -1.60 -1.46 -2.44 -1.68 -0.99 -1.95 -2.80 Jake Arrieta -5.19 -2.74 -1.08 -2.95 -0.11 -1.32 -1.87 -0.58 -1.72 -1.12 -1.16 -1.68 Jason Hammel -2.17 0.63 2.03 -0.88 1.23 -0.96 -2.79 -2.82 -0.53 -1.18 -0.53 -2.69 Johnny Cueto -4.90 -0.47 0.07 -0.43 -1.47 -0.84 -1.83 -0.61 -0.85 -0.87 -1.39 -2.92 Mike Leake -1.33 -3.43 1.62 -0.96 -2.61 2.95 -2.32 -2.20 -1.12 -1.23 -3.16 -4.57 Anthony Desclafani -3.32 0.01 0.91 -4.69 -4.13 0.96 -1.60 -2.74 -1.00 -0.64 -2.21 -4.22 Sonny Gray -5.32 -2.22 1.04 -1.62 -0.47 -0.84 -2.63 -3.31 -1.49 -1.26 -2.98 -5.36 Scott Kazmir -6.75 -1.68 1.01 -4.66 -1.80 0.67 -2.80 -1.72 -3.36 -0.89 -1.75 -3.83 Kendall Graveman -3.59 -3.71 0.12 -1.09 -3.41 -0.63 -1.48 -0.69 -3.06 -1.80 -3.45 -3.22 Jered Weaver -1.87 -0.91 -0.96 -3.61 -1.32 -5.06 -1.56 -1.48 0.80 -0.47 -1.25 -2.80 Garrett Richards -5.57 -0.41 2.85 -5.09 -2.91 1.80 -2.48 -2.98 -2.67 -1.11 -2.81 -1.47 C.J. Wilson -5.66 -1.71 -1.51 -6.17 -4.62 -3.43 -2.04 -3.64 -1.62 -0.91 -3.03 -4.77 Madison Bumgarner -1.03 0.90 -1.09 -3.29 -1.36 1.72 -1.26 -1.22 2.83 -0.45 -1.25 -1.55 Tim Hudson -5.80 -1.89 -1.29 -4.84 -2.97 1.48 -1.36 -3.10 0.97 -1.01 -2.02 -2.58 Jake Peavy 0.10 -0.05 -2.66 -0.89 -2.94 -0.90 -0.95 -1.97 -0.92 -0.80 -2.97 -2.74 Clay Buchholz -3.60 1.03 0.29 0.20 -2.34 -0.05 -0.46 -3.78 2.80 0.00 -2.49 -3.76 Rick Porcello -6.50 -1.43 -0.89 -3.15 0.19 0.72 -2.72 -2.67 -1.97 -0.77 -0.84 -4.64 Joe Kelly -2.21 -2.73 0.28 -3.44 -1.11 0.82 -2.31 -0.94 0.10 -1.30 -3.64 -5.97 Kyle Lohse -5.51 -2.17 -0.09 -1.51 -1.62 -0.87 -1.69 -1.92 1.25 -1.00 -2.89 -3.86 Matt Garza -8.28 1.31 0.71 -4.33 -2.18 -3.94 -0.82 -1.26 -0.70 -1.07 -4.40 -1.63 Wily Peralta -5.64 -1.30 2.61 -1.17 0.26 -2.23 -1.29 -0.98 -4.49 -1.49 -3.55 -2.52 Masahiro Tanaka -7.32 -1.16 -2.79 -0.58 -0.36 1.12 -1.13 0.16 1.04 -0.67 -0.53 -3.75 CC Sabathia -2.69 1.68 0.72 -2.26 1.56 -1.34 -2.03 -2.35 -2.56 -0.94 -1.37 -3.07 Michael Pineda -1.16 0.67 2.69 -0.67 -1.86 2.35 -0.94 -1.56 -0.74 0.00 -1.80 -1.79 Dallas Keuchel -3.41 -1.46 0.06 -1.06 -0.05 2.79 -2.01 -2.15 1.41 -0.98 -2.25 -2.64 Scott Feldman 0.99 -1.27 0.28 -3.01 -1.54 -1.48 -1.77 -3.59 0.51 -0.70 -2.42 -3.28 Collin McHugh -3.44 0.65 1.47 -3.24 -1.98 -1.17 -0.90 -0.57 -2.90 -1.22 -2.07 -4.31 Cole Hamels -5.42 1.72 0.32 -4.42 -1.68 -0.99 -1.97 -3.53 -1.69 -0.87 -1.89 -2.30 Aaron Harang -5.33 -0.86 -1.85 -1.58 -2.29 1.93 -2.57 -1.99 -3.06 -1.02 -2.09 -3.88 Jerome Williams -4.29 0.56 -0.82 -3.63 -1.11 -1.98 -1.29 -2.42 -3.79 -0.96 -2.09 -2.16 Drew Hutchison -2.11 -1.58 1.20 -0.85 -3.26 -0.92 -1.69 -3.47 -2.87 -0.81 -3.61 -4.67 R.A. Dickey -6.18 -1.64 -0.36 -3.28 -1.86 -1.42 -2.79 -4.23 -3.33 -1.03 -2.82 -1.73 Mark Buehrle 0.35 -0.70 -0.99 -1.61 -0.82 2.66 -1.64 -1.94 -1.47 -1.07 -2.50 -2.45 Yovani Gallardo -4.42 -0.92 -0.35 -1.94 -1.27 2.33 -2.01 -1.54 -3.15 -0.86 -1.10 -5.89 Colby Lewis -0.45 -0.11 0.15 -2.26 -0.55 0.69 -2.06 -0.61 -1.96 -0.89 -1.10 -2.72 Nick Martinez -4.18 -1.80 -0.55 -2.55 -0.94 0.25 -2.77 -0.42 -1.59 -1.44 -2.55 -3.13 Phil Hughes -2.56 1.01 0.92 1.58 2.20 2.94 -0.83 -1.24 0.07 -0.15 -0.85 -2.16 Ervin Santana -6.55 -0.88 0.21 -5.09 -4.61 -1.08 -2.52 -3.08 -2.01 -0.99 -2.52 -2.87 Kyle Gibson -2.49 2.96 3.25 -0.58 -0.30 3.78 -3.34 -1.03 -0.99 -1.76 -2.23 -4.76 Josh Collmenter -3.96 -1.02 -1.35 -1.23 -1.83 -2.86 -1.61 0.29 -1.00 -1.07 -0.99 -3.42 Jeremy Hellickson -7.13 -3.83 0.05 -2.41 -2.32 -2.09 -1.17 -1.66 1.03 -0.69 -1.41 -1.42 Rubby de la Rosa -5.55 -2.75 -0.91 -3.66 -1.73 -0.10 -2.72 -2.66 -2.44 -1.16 -2.73 -3.56 Jorge de la Rosa -6.99 -3.15 1.95 -4.12 -1.36 0.51 -3.12 -2.10 -2.35 -1.10 -2.67 -5.07 Kyle Kendrick -1.51 -0.42 1.24 -2.53 -2.65 0.14 -1.55 -0.31 -3.68 -1.38 -1.06 -3.03 Chris Rusin -5.88 0.84 -0.36 -2.15 0.47 -1.15 -2.13 -1.70 0.83 -1.13 -1.59 -2.53 Average -4.37 -1.04 0.34 -2.63 -1.54 0.03 -1.91 -2.00 -1.48 -0.94 -2.20 -3.54 Average Absolute Value 4.40 1.55 1.15 2.69 1.74 1.43 1.91 2.02 1.87 0.94 2.20 3.54 Number <0 87 69 39 87 77 45 90 75 73 88 90 90

Table 9.B: Gradients of S including summary statistics. Note that Clay Buchholz did not throw any balls on (3,0) counts in 2015. Because there is no data for what happens when he throws a ball on (3,0), this entry is a constant, unaffected by x. This will be the case for several players in the upcoming gradient analysis based on pitch type. (2 of 2)

40 Figure 8: Expression plot of the gradients of S for each player, evaluated at x0. Each line represents a different player.

41 There are four categories of results in Table 9. First, each entry in the first 90 rows shows how an absolute increase of 1% in the probability that a given pitcher throws a strike on a given count impacts his expected opponent OBP. I have multiplied these entries by 100 for the sake of the reader, so effects are magnified by a factor of 100. Therefore, a value of -3.78 relates to an absolute decrease in expected OBP of 0.0378%. Although many of these values appear to be negligible, combined and multiplied by increases or decreases of several percent in P (Z), they could have a noticeable effect on a pitcher’s performance. However, it is important to note that due to game theory feedback, these entries are only realistic for relatively small disturbances in x. The “Average” row displays the mean value of each count’s gradient for all 90 pitchers. The fact that most entries in this row — all counts except for (0,2) and (1,2) — are negative is intuitive. Successful pitchers are those who throw many strikes. This column shows that, on average for all 90 pitchers, the only counts worthy of waste pitches are (0,2) and (1,2). The third result of interest is the “Average Absolute Value” row. Intuitively, this row shows, for all 90 pitchers sampled, a relative ranking of how sensitive OBP is to pitch location decisions for each count, based on 2015 data. For example, the average impact on overall OBP of a 1% move in strike percentage for the (0,2) count is smaller than that of any other count except (3,0). In fact, the count that throwing more strikes on would have the largest impact is (0,0), the first pitch. These results make sense because every at-bat starts with a decision on the (0,0) count, while few at-bats reach the (0,2) count, and even fewer (3,0). Lastly, the final row lists for how many pitchers a given count’s gradient is negative. A negative gradient means that an increase in the probability of the pitcher throwing a strike on that count decreases expected OBP. Checking the entry in the (0,2) column, the gradient is negative for 39 pitchers; it is no coincidence that these are the same 39

42 pitchers whom my prior analysis suggested should not throw waste pitches on (0,2). If the (0,2) waste pitch increases expected OBP starting from (0,2), then it also increases expected OBP starting from (0,0).

6.1.2 Pitch Location Optimization

The question of how x affects N can also be framed as an optimization problem: If a baseball operations team or pitching coach could only make a pitcher change his total location decision vector x by a certain amount, by how much would the pitcher change each entry of x in order to minimize expected opponent on-base percentage? Furthermore, with all of these changes, by how much could he reduce his opponents’ OBP? I constrain the magnitude of x to be less than 0.5:

||x|| < 0.5. (26)

In addition, because

0 ≤ pi ≤ 1, (27)

it follows that

− pi ≤ xi ≤ 1 − pi, (28)

for i from 1 to 12.11

I implemented and solved this optimization problem using the fminunc function in the problem environment in MATLAB. Table 10 displays the output of the optimiza- tion problem for all 90 pitchers. Column 2 computes the relative difference between

11 These bounds on xi imply that a pitcher could throw a strike or a ball 100% of the time if he wanted to, and this assumption is unlikely to be true.

43 expected OBP using optimal x and expected OBP where x is a 1 × 12 zero vector:

OBPoptimal − OBPnormal ∆OBPopt.,norm. = . (29) OBPnormal

The next twelve columns display the normalized entries of x. The actual values in this

optimal x are more interesting when related to p. For example, an optimal xi of 8%

may not seem noteworthy, but if the corresponding pi is 92%, then this xi is maxed

out in the optimal output. In order to capture the size of xi relative to pi, Table 10 displays

xi xi,rel = (30) 1 − pi

if xi > 0 and xi xi,rel = (31) pi

if xi < 0. By normalizing xi to pi, we can compare values of xi across counts and across players. Examining the “Average” row of Table 10, the normalized entries of optimal x,

averaged across all 90 pitchers, agree directionally with the gradients of S(x0) in each of the 12 dimensions as shown above; under these constraints, only two counts — (0,2)

and (1,2) — have average optimal xi less than zero. It makes sense that if the slope of the OBP function is positive in the direction of strike percentage on a given count then minimizing OBP would reduce the percentage of strikes thrown on these counts.

Although the average optimal xi values agree directionally with the gradient analysis, the magnitudes between the two tests do not perfectly align. For example, in the gradient analysis, the average slope was strongest in the (0,0) count direction, while in the optimization, average absolute x(3,2) is greater than average absolute x(0,0).

44 ∆OBP Optimal xi,rel (%) Name (%) (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) Max Scherzer -11.5 58.3 -2.1 2.3 16.3 9.3 -55.9 9.6 15.0 41.6 5.4 12.5 54.9 Strasburg -13.2 -3.0 20.2 -38.2 31.7 -4.3 -37.8 26.0 18.8 -29.4 10.1 16.6 86.6 Zimmermann -12.0 71.6 40.5 -68.1 10.1 5.8 -32.5 12.5 8.7 -16.0 1.9 9.6 42.3 Felix Hernandez -10.7 7.0 6.5 -13.1 37.6 -16.9 -90.2 11.8 8.0 -11.8 3.0 22.5 59.1 Hisashi Iwakuma -13.2 78.4 -6.2 -33.9 9.6 -17.5 33.0 3.0 -0.1 2.2 2.4 11.8 19.4 J.A. Happ -13.4 8.2 6.0 -28.2 37.9 -25.3 8.2 18.3 50.1 41.0 6.2 41.1 52.2 Lance Lynn -14.6 48.2 37.2 -49.7 1.2 1.2 2.7 13.2 16.1 3.8 7.1 37.4 35.6 John Lackey -9.6 16.8 15.9 -63.3 -2.4 -8.5 -10.9 22.4 27.2 -8.4 6.3 20.3 78.6 Michael Wacha -14.0 39.3 23.4 -13.4 31.8 -10.5 -42.4 7.0 28.7 62.5 4.8 12.1 17.1 Kershaw -13.3 56.1 22.6 1.9 12.5 -0.6 -68.6 12.2 18.4 38.9 4.6 20.5 39.5 Zack Greinke -9.4 15.3 5.4 13.9 28.0 27.7 -46.8 3.9 34.8 28.0 17.1 14.8 57.6 Brett Anderson -12.4 -15.3 -32.8 10.5 63.5 43.2 6.9 16.2 11.2 -27.9 7.3 20.1 20.8 James Shields -15.4 22.8 -24.3 -100 18.8 -1.0 -9.5 14.1 29.7 -17.5 10.6 23.8 56.2 Cashner -10.2 35.9 2.3 14.2 4.1 11.4 -60.8 20.3 32.7 4.3 16.4 16.3 55.3 Tyson Ross -16.4 67.4 10.4 -2.2 1.9 -1.0 -21.4 5.7 19.5 8.9 4.0 14.0 37.5 Jeff Samardzija -10.8 39.3 -0.9 -34.8 16.4 -14.3 -29.3 10.9 25.1 -12.6 11.4 12.7 100 Chris Sale -13.9 20.8 6.8 -52.9 39.8 -3.2 -53.0 8.0 21.9 -6.6 5.0 31.4 61.8 Jose Quintana -11.8 53.3 10.2 -48.7 4.5 24.3 -87.9 10.3 9.0 2.7 3.5 12.5 74.4 Julio Teheran -13.9 41.6 30.0 8.0 29.1 6.3 -33.7 9.0 0.1 -17.1 7.8 27.2 57.7 Alex Wood -10.6 72.7 14.2 -9.1 12.3 20.6 -10.9 8.2 8.4 14.7 11.9 27.7 27.6 Shelby Miller -16.2 73.5 31.8 15.7 11.3 9.3 -7.2 7.7 11.5 25.5 4.0 7.0 21.1 Liriano -15.4 28.2 25.7 -100 13.7 18.1 4.2 16.6 11.8 33.9 4.1 18.3 26.9 Gerrit Cole -13.9 27.5 -32.0 -35.5 42.5 4.3 -4.7 4.4 3.5 -22.5 8.9 26.4 84.9 Charlie Morton -12.5 64.7 42.7 -0.9 -0.3 -2.6 20.7 7.1 -1.4 2.9 7.0 7.2 20.3 Chris Tillman -14.6 46.5 7.1 26.4 24.6 32.8 19.1 15.3 13.8 34.3 6.1 15.9 18.6 Wei-Yin Chen -11.3 48.8 -1.3 -99.9 15.0 4.9 -3.7 17.2 -0.9 -24.0 5.1 24.4 57.2 Gonzalez -15.3 19.8 -53.8 3.0 26.1 40.6 -33.4 8.5 22.4 36.0 2.4 7.4 29.9 Bartolo Colon -6.3 33.6 4.2 -19.1 12.9 1.5 -53.1 3.0 -6.5 -33.5 5.9 12.6 89.2 Jacob deGrom -16.9 69.9 13.8 8.6 7.9 15.2 -13.0 9.2 8.6 1.7 3.6 9.1 63.1 Matt Harvey -12.8 43.5 38.2 9.0 18.9 -0.2 -65.4 13.7 -2.5 22.6 6.2 22.6 49.3 David Price -10.2 31.7 -0.4 -1.3 23.9 10.4 -22.9 16.6 3.2 -26.2 9.4 36.6 100 Verlander -14.1 14.9 18.7 -56.0 6.5 21.4 -14.9 8.9 4.6 -46.0 14.1 18.5 73.0 Anibal Sanchez -19.8 82.0 19.2 -30.6 7.0 17.0 21.7 5.8 7.8 15.0 2.2 14.0 20.6 Chris Archer -15.9 28.7 17.6 -16.8 36.5 -27.5 -49.7 7.9 40.4 24.6 4.1 27.0 47.3 Nate Karns -15.5 52.2 -6.2 -27.5 21.0 28.4 9.7 12.2 30.2 31.1 7.3 11.2 19.7 Jake Odorizzi -14.5 1.3 -0.5 -22.8 11.8 -37.3 2.3 13.4 19.9 -30.0 15.0 25.5 81.2 Corey Kluber -8.9 23.8 -53.6 -4.1 37.8 9.7 -52.4 20.5 24.9 41.4 13.9 20.5 26.1 Carrasco -13.9 58.3 0.8 -99.9 3.8 11.5 -78.3 7.9 12.0 11.0 6.0 17.4 26.4 Trevor Bauer -18.1 47.8 12.2 -99.9 13.4 17.2 -62.9 12.7 9.6 9.6 6.4 18.7 49.6 Mat Latos -13.5 32.9 -57.1 -5.8 17.3 8.5 -30.9 7.6 15.2 -9.0 4.3 17.8 67.6 Dan Haren -12.3 18.9 -1.8 -100 -2.0 -13.0 9.6 11.8 -5.8 -9.7 18.9 61.3 94.8 Tom Koehler -14.7 59.9 18.1 13.7 16.8 31.8 -33.5 16.5 11.1 4.7 7.0 17.2 35.2 Ventura -13.5 22.8 4.5 -17.3 19.6 19.6 -64.8 24.6 -1.2 16.8 12.4 50.0 62.0 Danny Duffy -19.7 68.9 4.8 0.7 18.0 26.2 -24.7 6.5 14.0 31.7 2.4 11.1 27.5 Volquez -14.6 71.7 16.6 12.2 10.2 -11.6 -6.8 7.6 20.5 -0.9 4.8 19.8 31.9

Table 10.A: Optimal x and corresponding relative changes in OBP for each pitcher. (1 of 2)

45 ∆OBP Optimal xi,rel (%) Name (%) (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) Jon Lester -10.6 34.6 0.7 -100 -28.2 -29.7 16.6 15.9 31.3 15.8 20.9 26.9 45.7 Jake Arrieta -14.8 64.2 40.1 16.7 14.8 0.3 12.2 9.1 4.3 13.5 5.0 7.0 12.8 Jason Hammel -10.1 7.2 -28.4 -62.4 -5.9 -45.7 6.7 43.0 63.3 -1.3 10.9 7.7 44.1 Johnny Cueto -10.1 68.8 3.6 -13.0 0.0 14.2 6.8 13.7 3.5 1.8 6.7 23.3 53.2 Mike Leake -14.6 -4.2 20.9 -62.2 -4.8 12.2 -65.3 19.0 10.5 -7.8 20.1 33.4 86.5 Desclafani -12.6 6.1 -18.8 -25.4 43.8 41.6 -34.7 10.2 17.6 -6.5 5.2 15.1 55.9 Sonny Gray -14.9 44.9 18.3 -41.1 0.5 -7.9 -3.8 18.1 27.0 -5.0 12.7 22.7 75.4 Scott Kazmir -14.4 60.8 17.9 -39.5 21.5 11.6 -28.9 14.9 11.3 25.5 6.1 12.4 31.5 Kendall Graveman -10.9 42.8 40.7 -19.8 2.5 21.8 0.7 7.5 0.5 27.6 27.2 33.3 32.6 Jered Weaver -12.1 3.5 3.5 2.0 43.4 22.9 56.4 10.5 12.1 -12.5 2.8 15.1 25.7 Garrett Richards -14.3 43.1 0.1 -99.9 35.5 28.5 -56.7 14.0 21.2 29.6 6.4 17.7 9.9 C.J. Wilson -16.4 29.0 4.0 8.5 45.6 39.2 25.4 8.3 15.5 5.5 5.5 19.4 42.9 Bumgarner -10.8 -12.9 -35.4 6.8 59.1 16.3 -77.1 8.6 17.5 -89.5 4.5 16.9 39.2 Tim Hudson -11.5 57.0 18.9 15.0 28.5 28.6 -39.1 5.4 18.7 -24.8 5.0 11.9 35.3 Jake Peavy -10.3 -14.8 -5.8 32.0 -1.0 30.0 6.0 10.7 14.6 2.7 43.5 78.3 57.4 Clay Buchholz -12.5 27.4 -34.9 -20.2 -6.8 11.2 -23.0 1.8 39.3 -58.3 0.0 17.6 55.9 Rick Porcello -12.3 66.2 13.8 9.5 11.8 -11.2 -34.3 12.8 23.5 11.5 3.9 6.3 51.6 Joe Kelly -12.5 0.0 16.5 -17.4 23.7 0.2 -36.6 16.6 -5.6 -35.2 12.6 40.5 85.0 Kyle Lohse -10.9 59.8 20.8 -5.1 4.3 7.6 4.3 6.9 9.3 -33.1 8.1 22.2 52.7 Matt Garza -14.8 59.6 -31.3 -22.2 13.8 17.4 37.8 1.4 4.9 3.9 4.4 20.3 8.5 Wily Peralta -12.6 50.3 11.0 -96.1 4.3 -8.3 11.8 5.1 5.4 35.5 11.7 27.1 19.0 Masahiro Tanaka -17.7 68.3 12.8 27.1 1.3 1.0 -24.5 5.1 -1.6 -21.0 2.7 3.8 29.4 CC Sabathia -9.5 22.3 -64.1 -28.3 16.5 -54.5 10.0 17.9 32.8 27.5 8.5 20.6 32.2 Michael Pineda -8.4 24.4 -24.1 -90.4 8.2 28.6 -82.7 12.8 16.6 10.0 0.0 39.1 31.8 Dallas Keuchel -11.5 39.2 13.7 -46.9 3.8 -16.5 -100 22.5 21.0 -99.8 9.9 31.7 45.9 Scott Feldman -10.6 -47.8 4.2 -12.4 39.5 4.2 9.3 23.9 36.7 -22.9 15.8 27.5 60.1 Collin McHugh -11.0 31.9 -37.9 -83.0 29.5 22.7 4.2 5.3 0.0 21.0 17.5 25.4 69.4 Cole Hamels -12.7 49.3 -56.4 -10.9 27.6 8.8 10.7 10.1 33.5 16.7 5.4 13.7 27.4 Aaron Harang -12.1 54.9 4.6 19.3 6.3 17.6 -51.4 14.7 16.0 28.7 7.9 13.9 41.6 Jerome Williams -9.4 32.9 -45.1 6.1 28.8 2.0 15.5 9.9 29.5 42.0 7.4 18.6 21.4 Drew Hutchison -10.0 7.0 8.2 -60.2 -4.2 22.6 -4.0 22.7 24.6 22.4 23.5 39.8 56.6 R.A. Dickey -13.4 58.4 17.2 1.8 14.2 7.2 11.3 19.1 35.7 39.0 7.3 15.7 13.1 Mark Buehrle -8.5 -37.1 2.9 7.1 10.9 5.1 -82.3 21.4 20.8 15.9 38.9 52.1 59.0 Yovani Gallardo -12.8 34.0 4.2 -0.5 8.5 4.4 -88.5 11.2 7.3 9.5 8.1 11.1 69.0 Colby Lewis -7.0 -29.7 -8.3 -15.4 35.4 2.7 -53.3 34.9 6.6 35.8 15.0 21.7 56.9 Nick Martinez -8.4 51.8 28.1 7.3 13.7 5.6 -23.7 19.3 -0.5 12.2 18.3 38.6 36.2 Phil Hughes -9.5 41.9 -31.4 -48.1 -15.9 -46.4 -85.2 15.3 26.1 -14.1 2.0 14.4 44.6 Ervin Santana -14.4 45.7 -7.8 -25.0 35.7 40.3 9.3 15.2 21.1 18.8 5.7 14.9 29.0 Kyle Gibson -13.9 21.7 -100 -100 -6.9 -7.3 -100 24.8 0.9 -1.4 20.6 24.9 66.0 Josh Collmenter -10.8 52.6 11.1 15.1 8.2 19.4 36.2 11.2 -7.5 5.6 11.8 10.5 48.2 Jeremy Hellickson -14.9 67.8 35.4 -7.1 7.0 13.6 15.6 3.9 6.8 -11.4 2.7 6.7 10.3 Rubby de la Rosa -12.5 55.5 35.6 11.9 19.3 7.6 -6.5 15.9 15.4 18.8 5.6 19.4 35.0 Jorge de la Rosa -16.0 55.2 29.6 -76.6 16.0 4.1 -19.1 13.8 7.7 11.8 3.4 12.1 34.9 Kyle Kendrick -8.6 0.0 -4.8 -58.1 37.0 32.1 -48.3 13.5 1.8 47.1 17.7 11.9 27.3 Chris Rusin -9.3 75.2 -36.5 2.8 7.3 -19.7 10.5 7.1 17.7 -26.8 6.9 13.3 30.7 Average -12.7 36.4 1.4 -25.0 16.4 6.5 -22.5 12.8 15.2 3.6 9.0 21.1 46.2 Avg. Abs. Value 12.7 40.1 20.1 32.3 18.1 16.4 32.6 12.8 15.9 21.9 9.0 21.1 46.2 Number > 0 0 81 59 30 79 63 32 90 78 55 88 90 90

Table 10.B: Optimal x and corresponding relative changes in OBP for each pitcher. As mentioned above, Clay Buchholz threw strikes 100% of the time in the (3,0) count, so the entry for (3,0) is 0%. (2 of 2)

46 This is partially due to the fact that the xi values in Table 10 are normalized, and

average 1 − p(3,2) is less than average 1 − p(0,0) (0.51 compared to 0.56). Differences in ranking by magnitude of the “Average” values in Table 9 and Table 10 can be

partially reconciled by understanding that Table 10 does not show absolute xi values.

Although the directionality of the averages for each table agree, the optimal xi values for a given pitcher do not necessarily agree with the gradients of S(x0) evaluated

in the direction of each count. For example, for Dan Haren, S(x0) only has a positive slope in the (0,2) direction, but optimal x has negative components in the (0,1), (0,2), (1,0), (1,1), (2,1) and (2,2) directions. In other words, the gradient analysis says that OBP is decreasing in strike percentage for every count except (0,2), but the optimization analysis says OBP would be minimized (given constraints) if Haren threw fewer strikes on several counts. There are many (87) of these contradictions, and they are caused by the fact that S(x) for many players (49 out of 90) is a non-linear

function in the range ||x|| < 0.5: the slope in a particular direction at x0 can change and cross zero as x changes. Under the constraint ||x|| < c, as c goes to 0, the number of contradictions between the gradient analysis and the optimization analysis also goes to 0. For example, reducing c to 0.25 from 0.5 eliminates 62 of the contradictions, and no new contradictions arise. To display an example of the nonlinearity using c = 0.5, Figure 9 plots each of the

twelve gradients for Dan Haren as a function of q = x0 + λxopt., for 0 ≤ λ ≤ 1. Figure

9 shows that the contradictions between S(x0)i and optimal xi can be explained by the

fact that the five corresponding counts began with negative slopes at x0 but actually

ended with positive slopes at x0 + xopt.. Dan Haren had the most nonlinear S in the given range, yet the plot of his gradients shows that the landscape is generally smooth, so we can expect that the optimization results are valid. To further test the

assumption that the fminunc routine actually minimized OBP on the defined range, I

47 Figure 9: Plot of the gradients of S(q) where q = x0 + λxopt., for 0 ≤ λ ≤ 1. Five of the slopes change from negative to positive as q shifts from x0 to x0 + xopt.. These five slopes correspond to (0,1), (1,0), (1,1), (2,1), and (2,2) — all of the counts that have disagreements between Table 9 and Table 10.

checked that S(x) was greater than the minimized OBP for each of 1,000 randomly generated x vectors for each player. Finally, the most thought-provoking output of Table 10 is the second column,

∆OBPopt.,norm.. These values are probably not noteworthy in an absolute sense because they are subject to the constraint that limits x to an arbitrary size; the declines in OBP

under optimal x vary with the allowed size of x. However, a player’s ∆OBPopt.,norm. is important in terms of how it compares to this value for other players. The closer a player’s ∆OBP is to zero, the less that player would improve if he improved his pitch location decisions. We can loosely interpret this to mean that these pitchers currently make close to the best decisions they can regarding pitch location, given their skill set.

48 Similarly, pitchers with large |∆OBP| make poor decisions, relative to other players, regarding pitch location.12

6.2 Pitch Selection

The following subsection repeats the gradient and optimization analyses, focusing now on pitch type selection instead of pitch location decisions. To maintain the binary nature of the problem, I classify pitches as either fast balls (four seam fast balls, two seam fast balls, cutters, sinkers, and split finger fast balls) or off-speed pitches (, sliders, , screwballs, knuckleballs, knuckle curves, forkballs, and eephuses). The following sections determine how expected opponent on-base percentage would change with the probability that a given pitcher throws a fast ball on a given count. To explore these questions, a framework for analyzing the effect of pitch selection is needed. If F is defined to be a fast ball event and O is defined to be an off-speed

event, then letting MF = M|F , MO = M|O, and defining p to be the 1 × 12 vector of probabilities that the pitcher throws a fast ball on each of the 12 possible counts,

then M is a linear combination of the columns of MF and MO: Letting Mi represent the ith column of M,

Mi = piMF,i + (1 − pi)MO,i, (32)

for 1 ≤ i ≤ 12. Pitch location decisions change M by adjusting the weights on each

MF,i away from the corresponding pi. Letting y be the 1 by 12 vector of disturbances,

12This model uses the strong assumption that pitchers can throw a ball or a strike on command; therefore, a ball is the result of an active decision to throw a ball. Because this assumption is not true, a large |∆OBP| does not necessarily reflect a pitcher’s decisions; the pitcher may decide to throw a strike but end up throwing a ball. In this case, |∆OBP| reflects accuracy issues instead of decision issues.

49 where yi is the additional probability of throwing a fast ball on count i, by changing his probabilities away from p, a pitcher creates a new transition matrix, N, where

Ni = (pi + yi)MF,i + (1 − pi − yi)MO,i, (33)

for 1 ≤ i ≤ 12. Because MF ,MO, and p are constants for a given pitcher based on 2015 data, any statistic rendered by manipulating N is really a function of y.

6.2.1 The Gradient of the Pitch Selection Function

Let T (y) be the function representing expected opponent on-base percentage at the beginning of an at-bat, given y. By computing the gradient of T in the ith direction

at an initial position, y0, we can examine how expected OBP changes with changes in

th yi, holding all other location probabilities constant: If ei is the unit vector in the i dimension,

T (y + e ) − T (y − e ) [∇ T ] = 0 i 0 i + O(2), (34) y i 2 with  = 10−6.

If we let y0 be a 1 × 12 zero vector, [∇yT ]i shows how expected OBP for a given pitcher would change if he only increased the probability of throwing a fast ball on

count i and left all other probabilities as they were in 2015. Table 11 displays [∇yT ] for each count for each of the 90 pitchers sampled. Figure 10 visualizes this table in an expression plot. Each entry in the first 90 rows of Table 11 shows how an absolute increase of 1% in the probability that a given pitcher throws a fast ball on a given count impacts his expected opponent OBP. I have again magnified these entries by a factor of 100. Therefore, a value of 0.55 relates to an absolute increase in expected OBP of 0.0055%.

50 Gradient of T (y0) in Each Direction (%, Multiplied by 100) Name (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) Max Scherzer 0.55 0.58 -0.71 -0.59 0.05 0.58 0.74 0.03 1.22 0.00 -0.21 -1.71 Stephen Strasburg 1.20 -0.18 -0.17 -1.27 -1.29 -0.95 0.29 0.15 -1.43 0.00 0.00 0.20 Jordan Zimmermann -0.03 -1.92 0.19 0.97 1.07 3.12 0.22 -0.47 1.60 0.00 0.73 2.25 Felix Hernandez 1.26 0.42 0.90 -0.78 0.04 1.72 1.03 1.79 1.41 -0.40 -0.04 -0.47 Hisashi Iwakuma -0.63 -0.35 -0.34 0.90 0.75 1.39 -0.40 0.30 1.33 0.05 -0.04 1.07 J.A. Happ -1.46 -0.30 0.02 -0.20 -0.99 -1.44 -0.40 0.07 -0.83 -1.02 1.22 1.68 Lance Lynn 0.20 -0.62 0.12 -2.68 -0.36 -1.45 -0.54 0.09 -1.95 -0.53 -2.66 -0.85 John Lackey 0.82 -1.93 -2.64 0.36 0.27 2.58 0.46 -0.37 -3.83 -0.04 0.30 0.73 Michael Wacha -0.92 -0.40 1.15 -1.04 0.76 2.11 0.37 -1.20 0.55 0.20 0.83 -0.49 Clayton Kershaw 0.64 0.22 0.90 -0.10 0.41 -1.73 -0.53 0.37 2.40 0.00 2.08 1.36 Zack Greinke 0.10 0.33 -0.30 -0.85 1.85 0.23 -0.27 0.53 -0.29 0.00 -0.48 0.10 Brett Anderson 1.62 0.29 0.25 0.21 0.18 1.48 -1.04 -0.41 0.26 -0.42 1.08 1.09 James Shields 0.89 0.63 0.39 0.19 0.46 1.01 -0.34 -0.49 0.27 0.23 -0.84 0.53 Andrew Cashner -0.02 0.33 -0.34 -0.89 0.58 0.95 0.77 0.83 0.24 0.39 0.84 -2.72 Tyson Ross 2.82 1.39 1.86 0.73 -0.12 1.88 -0.46 0.54 0.75 0.58 -0.47 0.01 Jeff Samardzija 0.69 -1.17 1.85 -0.08 -0.50 -0.18 -1.46 -0.81 0.15 0.00 0.16 -0.28 Chris Sale 0.29 0.49 0.53 -0.57 0.77 0.28 0.13 0.18 0.12 0.19 1.08 -1.35 Jose Quintana 0.83 -0.02 1.02 1.00 0.00 2.10 -0.38 0.75 -3.12 -0.51 -0.21 1.23 Julio Teheran 1.11 -1.63 -0.04 1.29 0.18 1.92 0.91 0.21 -0.49 0.00 -0.75 -2.31 Alex Wood -1.24 0.19 -1.00 2.33 0.25 0.26 -0.10 0.77 -1.24 -0.20 -1.84 -0.05 Shelby Miller -0.65 -3.31 0.81 1.63 -2.24 0.52 -0.93 1.19 -1.44 0.00 -1.38 2.41 Francisco Liriano -0.21 -0.02 1.49 1.96 2.10 1.74 1.68 -0.47 -1.04 0.00 0.04 2.79 Gerrit Cole -0.85 -1.50 0.63 0.66 1.48 -0.11 -1.13 1.21 -1.48 0.00 -0.23 0.39 Charlie Morton -2.70 1.12 -1.89 1.22 -0.20 3.02 1.56 0.51 1.38 0.00 0.00 -1.04 Chris Tillman 0.06 -1.44 -0.22 -2.27 1.27 -0.94 -0.58 -0.46 -0.53 0.00 0.00 -0.32 Wei-Yin Chen 0.83 -1.17 -1.00 -0.53 -0.87 -0.62 0.03 -1.31 1.27 0.00 -0.42 -2.45 Miguel Gonzalez -0.20 0.90 1.55 -0.47 0.79 0.02 -0.21 -0.36 -2.67 0.00 -0.58 -0.84 Bartolo Colon -1.53 -1.38 -2.99 1.06 -0.94 1.85 1.19 -1.24 -0.38 0.08 0.30 -1.83 Jacob deGrom -1.54 -0.09 -0.45 0.06 -0.21 -2.00 -0.09 -0.08 0.35 -1.09 0.56 2.88 Matt Harvey 0.98 1.63 0.68 -1.87 0.57 0.09 1.21 0.52 -1.13 0.00 -1.06 1.24 David Price 2.15 0.84 1.09 -0.14 -1.66 -0.59 -0.21 0.31 0.87 0.00 0.23 2.59 Justin Verlander -0.36 0.60 -1.89 0.56 2.33 1.59 -1.08 0.16 -1.22 -0.28 1.47 -2.84 Anibal Sanchez -0.33 1.36 -0.54 -0.75 -1.02 -1.43 -0.73 -0.93 -1.37 0.23 -0.83 2.36 Chris Archer 0.00 -1.60 1.73 0.10 -0.13 0.38 0.83 1.05 0.51 -0.77 0.18 3.75 Nate Karns -2.39 1.27 2.67 -0.09 -0.61 -0.39 1.46 0.50 1.61 0.00 -0.77 2.01 Jake Odorizzi -1.07 3.16 -0.15 2.18 -10.01 -1.80 0.00 -2.55 6.22 0.22 -4.04 0.00 Corey Kluber 3.64 0.42 0.20 -0.54 1.58 1.53 0.08 0.91 1.38 0.50 -0.82 0.81 Carlos Carrasco 1.15 -0.12 1.31 0.86 1.58 1.33 -0.78 0.57 2.45 0.00 -0.16 0.08 Trevor Bauer -0.51 2.69 -0.04 -0.57 1.17 1.22 1.03 -0.47 -0.84 0.81 -0.42 -1.36 Mat Latos -0.45 1.21 -0.30 1.14 -2.85 -1.07 1.44 -2.11 -1.80 -0.25 0.16 -4.83 Dan Haren -0.07 -1.44 0.07 -0.27 0.06 2.24 -3.00 -2.29 -0.55 0.00 -4.67 -4.04 Tom Koehler 1.13 0.05 0.82 0.66 -0.88 1.57 -0.31 0.59 -0.21 -1.32 0.21 -0.89 Yordano Ventura -1.38 1.04 0.64 -1.74 -1.34 2.65 -0.64 0.56 3.27 -1.22 -3.84 -1.83 Danny Duffy -4.19 -1.91 -0.53 0.92 2.04 -3.45 1.51 -0.29 1.12 0.00 0.12 -1.57 Edinson Volquez -0.10 0.33 0.37 1.14 0.11 2.64 0.56 0.38 0.85 0.55 -1.99 1.34

Table 11.A: Gradients of T evaluated at y0: How expected OBP changes as the proportion of fast balls thrown at any count increases. Example: For an absolute increase of 1% in the probability that Max Scherzer throws a fast ball on the (0,0) count, his expected opponent OBP increases absolutely by 0.0055%. Note that many pitchers have entries of 0, especially in the (3,0) column. In these cases, pitchers threw fast balls 100% of the time on that count, so data is not available for MO for that column. Therefore, that column is constant, so the slope is zero. Aggregate statistics for this column are greatly diluted by these zeros. (1 of 2)

51 Gradient of T (y0) in Each Direction (%, Multiplied by 100) Name (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) Jon Lester -1.34 0.35 -0.16 1.38 2.14 0.21 -1.78 -0.96 0.82 0.46 -3.45 2.69 Jake Arrieta 0.16 0.88 0.30 0.47 0.68 -0.92 0.10 -0.17 -1.73 0.64 -0.01 0.13 Jason Hammel 2.27 0.17 -0.09 1.00 0.90 1.46 0.09 0.16 0.93 0.00 -0.42 2.93 Johnny Cueto 1.26 -4.12 0.38 0.82 -0.13 -0.20 0.47 -0.16 -0.48 -1.25 -0.25 2.59 Mike Leake 0.57 -0.34 2.43 -0.39 -0.79 -1.22 -0.31 1.19 1.32 0.00 -2.30 -2.38 Anthony Desclafani -0.68 1.15 0.27 0.21 -1.42 -0.44 1.00 -0.96 -0.93 0.32 -0.87 1.51 Sonny Gray 1.91 0.10 -0.03 0.45 0.37 1.03 -0.25 -0.03 2.01 0.00 0.57 2.11 Scott Kazmir -2.63 -0.57 -0.75 -0.80 -0.19 -1.11 -0.37 0.38 -0.11 -1.12 -0.15 -1.20 Kendall Graveman -1.98 0.38 1.50 0.69 -2.24 0.92 -1.79 -1.11 1.60 0.00 1.72 -0.78 Jered Weaver 1.93 -1.78 -0.40 -0.62 0.07 1.40 -0.32 0.05 2.08 0.34 0.34 2.90 Garrett Richards -0.98 -0.05 0.62 -0.30 -0.03 1.90 -0.12 0.45 -1.40 0.00 0.39 2.84 C.J. Wilson 3.16 0.29 0.98 0.41 0.74 0.39 2.14 0.79 -1.66 0.00 -0.07 -0.28 Madison Bumgarner 2.57 0.25 -0.59 -1.31 0.26 -1.03 -0.09 0.12 0.72 0.00 -0.38 0.77 Tim Hudson -0.48 1.09 -1.68 -0.96 2.67 1.61 0.00 4.01 3.35 0.00 0.00 -6.74 Jake Peavy -0.18 -1.97 1.76 0.17 1.99 0.16 -0.42 -0.61 -0.71 0.02 -4.20 -2.01 Clay Buchholz -0.43 1.68 1.66 0.65 1.46 0.67 -0.78 0.28 1.34 0.00 0.00 -0.53 Rick Porcello -2.50 0.59 -0.26 2.41 -0.58 -0.46 -0.15 -1.12 -2.72 0.48 -0.27 1.52 Joe Kelly 0.60 -1.45 0.69 -1.11 0.08 0.98 -0.24 0.52 0.61 0.00 -1.53 -0.79 Kyle Lohse -0.46 3.02 0.19 1.25 -2.53 3.29 0.06 -0.75 2.39 -1.29 1.01 -1.60 Matt Garza 1.15 -1.98 0.72 -2.33 -1.95 1.71 -0.15 -0.55 -2.22 -0.76 1.05 0.71 Wily Peralta 0.73 1.35 0.40 0.63 -0.71 -1.32 0.46 1.49 2.24 -1.71 1.21 2.50 Masahiro Tanaka 1.62 -1.32 1.44 0.43 0.10 3.46 0.32 1.93 -0.98 -0.57 -0.29 -0.59 CC Sabathia -0.63 2.72 0.52 -0.44 1.24 -1.72 -0.47 -1.00 -0.50 0.00 -1.09 -0.71 Michael Pineda -0.81 -0.20 1.55 -2.51 -0.35 2.38 0.30 0.92 1.35 0.00 1.14 0.61 Dallas Keuchel 1.24 -0.11 -0.25 1.21 -0.83 1.76 -0.16 1.38 1.75 0.53 -0.50 -0.02 Scott Feldman 1.98 -0.71 1.15 0.19 -0.42 -2.32 0.35 0.72 -0.40 0.00 1.73 -3.78 Collin McHugh 0.12 -0.26 1.05 -0.40 1.14 -0.14 0.04 1.18 -0.02 0.14 0.71 0.52 Cole Hamels 0.08 -0.08 0.07 1.66 0.48 -1.08 0.48 0.03 1.91 -0.85 0.78 1.33 Aaron Harang -2.77 0.75 -0.23 1.64 0.38 1.57 -0.57 0.37 -1.58 -0.59 -0.91 0.81 Jerome Williams -0.05 -1.51 1.55 -0.29 -1.62 -0.69 -1.17 0.52 0.00 2.42 -2.40 2.51 Drew Hutchison -1.30 -0.35 0.54 0.37 -0.43 -0.06 0.15 -1.09 -0.68 -0.65 -1.21 -1.64 R.A. Dickey 1.99 0.05 -2.22 -0.20 4.21 0.68 0.07 -0.25 1.46 0.09 -0.33 1.34 Mark Buehrle 0.82 0.03 -0.59 0.38 -0.58 0.42 0.57 -0.18 -1.78 -0.16 -0.13 -0.67 Yovani Gallardo 1.29 0.06 0.97 -0.93 2.11 -2.36 -0.59 0.60 -0.47 0.18 -1.35 -2.75 Colby Lewis 0.51 -1.13 1.52 1.50 2.26 1.70 0.03 0.53 -0.01 -0.23 -1.53 -0.75 Nick Martinez 0.03 2.02 0.32 -0.63 -0.71 0.12 0.36 -1.13 -1.19 -1.19 0.47 1.10 Phil Hughes -1.22 -1.43 -0.55 -0.56 2.32 0.28 0.00 -0.62 0.79 0.00 2.13 0.56 Ervin Santana 4.34 0.13 2.42 -0.20 0.02 1.21 -0.04 -2.20 2.05 0.80 0.15 1.69 Kyle Gibson 1.13 -0.48 0.86 0.71 0.20 2.24 -0.69 2.69 3.94 0.89 0.52 0.14 Josh Collmenter -0.71 -1.14 -0.24 1.04 -0.97 1.10 0.02 0.21 -0.41 -1.72 -1.47 2.31 Jeremy Hellickson -1.29 0.72 -0.32 0.38 2.03 3.11 0.47 0.06 1.88 -0.49 0.80 -0.33 Rubby de la Rosa -0.05 0.46 -0.51 -1.03 -0.81 1.26 0.48 0.13 -0.98 0.00 1.35 1.76 Jorge de la Rosa -1.68 0.08 0.13 3.36 7.52 -2.07 0.00 0.00 2.84 0.00 0.00 0.00 Kyle Kendrick -3.48 -1.03 2.05 2.70 0.55 0.23 -0.47 0.25 0.30 0.00 -1.19 0.54 Chris Rusin -0.27 -1.53 -0.52 0.34 0.51 -1.85 -0.31 -2.05 0.71 0.00 -1.66 1.16 Average 0.06 -0.07 0.29 0.17 0.17 0.49 -0.02 0.05 0.24 -0.10 -0.32 0.12 Average Absolute Value 1.15 0.95 0.85 0.91 1.14 1.32 0.58 0.75 1.32 0.36 0.94 1.49 Number <0 46 43 36 40 37 32 45 36 42 27 50 39

Table 11.B: Gradients of T including summary statistics. (2 of 2)

52 Figure 10: Expression plot of the gradients of T at y0 for each player. Each line represents a different player. Unlike the expression plot of the gradients of S, this plot shows no clear trends.

53 These values are quite small, but as with pitch location changes, when combined and multiplied by increases or decreases of several percent in P (F ), these changes could affect a pitcher’s performance. Again, due to game theory feedback, the magnitude and directionality of these slopes is only realistic for small disturbances in y. The relatively small size of the values in Table 11 compared to those in in Table 9 suggests that pitchers are generally closer to their mixed strategy equilibrium in pitch type decisions as opposed to pitch location decisions. Furthermore, Figure 10 is rather muddled, with no clear patterns, compared to the clear trends in Figure 8. The “Average” row displays the mean value of each count’s gradient for all 90 pitchers. The relatively small values in this column imply that there are no strategies that would be effective in general for all 90 pitchers. The majority of entries in this row are positive, with the exceptions of (0,1), (2,0), (3,0), and (3,1). A positive gradient means that throwing more fast balls on that count results in an increase in expected opponent OBP. Therefore, this analysis indicates that on average, pitchers should be increasing the usage of off-speed pitches on eight of the twelve counts. It is not surprising that, on average, increasing the use of fast balls on (2,0), (3,0), and (3,1) would reduce opponent OBP. In these counts, an inaccurate pitch often results in a walk. Because fast balls are generally more accurate than off-speed pitches, pitchers should increase fast ball usage on these counts in order to increase accuracy. The third result of interest is the “Average Absolute Value” row. Similar to Table 9, this row shows, for all 90 pitchers sampled, a relative ranking of the sensitivity of OBP to fast ball percentages for each count. For example, the average impact on overall OBP of a 1% move in fast ball percentage for the (0,2) count is smaller than that of any other count except (3,0), (2,0), and (2,1). Expected OBP is most sensitive to fast ball percentage on (3,2), followed by (2,2) and (1,2). These two-strike counts are intuitively important because a successful pitch can immediately end the at-bat

54 with a strikeout.

6.2.2 Pitch Selection Optimization

Next, I repeat the optimization analysis, substituting pitch selection for pitch location: If a baseball operations team or pitching coach could only make a pitcher change his total pitch type decision vector y by a certain amount, by how much would he change each entry of y, and what would be the resulting reduction in opponent OBP? I use the same constraint on magnitude as before:

||y|| < 0.5. (35)

In addition, because

0 ≤ pi ≤ 1, (36)

it follows that

− pi ≤ yi ≤ 1 − pi (37)

for i from 1 to 12. Table 12 displays the output of the optimization problem for all 90 pitchers. Column 2 computes the relative difference between expected OBP using optimal y and expected OBP where y is a 1 × 12 zero vector:

OBPoptimal − OBPnormal ∆OBPopt.,norm. = . (38) OBPnormal

The next twelve columns display the normalized entries of y. In order to capture the

size of yi relative to pi, Table 12 displays

55 yi yi,rel = (39) 1 − pi if yi > 0 and yi yi,rel = (40) pi

if yi < 0. By normalizing yi to pi, we can compare values of yi across counts and across players. Examining the “Average” row of Table 12, the normalized entries of optimal y, averaged across all 90 pitchers, partially agree with the gradients of T in each of the 12 dimensions as shown in Table 11. On average, the only counts that should optimally have more off-speed pitches, under these constraints, are the (0,2) and (1,2) counts. Meanwhile, the gradient analysis implied that decreased fast ball ratio results in lower OBP for not only (0,2) and (1,2), but also (0,0), (1,0), (1,1), (2,1), (2,2), and (3,2). Unlike in the pitch location analysis, these contradictions in the “Average” row are not frequently mirrored in the entries for each player. Indeed, there are only 17 contradictions between the individual entries of Table 11 and Table 12. For most players (76 out of 90), T is actually linear in the range ||y|| < 0.5. Therefore, the discrepancies in the Average rows between tables arise from issues in averaging, such as biases towards outliers, and the fact that there are no strong trends in pitch selection to begin with among these 90 pitchers.

Figure 11 displays the gradients of T (r) for Jake Odorizzi, where r = y0 + λyopt. for 0 ≤ λ ≤ 1. Figure 11 shows that the two contradictions between Odorizzi’s

T (y0)i and optimal yi can be explained by the fact that each of the two corresponding

counts began with negative slopes at y0 but actually ended with positive slopes at y0 + yopt.. Jake Odorizzi had the most nonlinear T in the given range, yet the plot of his gradients shows that the landscape is generally very smooth, so we can expect that

56 ∆OBP Optimal yi,rel (%) Name (%) (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) Max Scherzer -5.5 -15.9 -17.6 21.7 33.8 -2.8 -27.5 -15.5 -1.1 -38.9 0.0 19.9 94.7 Strasburg -5.1 -30.6 4.5 5.0 85.1 60.0 30.8 -4.5 -2.6 57.8 0.0 0.0 -4.1 Zimmermann -7.8 -1.1 55.3 -3.4 -18.3 -19.7 -58.7 -2.9 11.5 -27.8 0.0 -10.4 -50.6 Felix Hernandez -6.0 -37.8 -16.4 -28.4 17.7 -8.2 -46.0 -29.3 -68.7 -43.2 39.3 1.6 14.8 Hisashi Iwakuma -5.0 32.8 27.7 44.6 -21.9 -21.0 -31.5 31.7 -7.7 -28.9 -1.2 -0.6 -22.0 J.A. Happ -5.4 69.9 9.9 -2.5 11.5 34.0 59.1 52.3 -1.8 35.9 99.9 -20.4 -26.2 Lance Lynn -5.1 -19.5 99.8 -10.3 100 90.2 100 99.9 -5.7 100 99.9 100 99.9 John Lackey -6.8 -18.9 100 100 -8.9 -2.5 -43.9 -10.5 29.7 100 3.6 -7.4 -14.6 Michael Wacha -5.4 57.9 19.8 -24.1 84.5 -15.3 -52.0 -6.9 65.1 -13.8 -3.9 -13.7 30.9 Kershaw -8.8 -11.4 -11.9 -19.5 -2.1 -19.6 35.7 32.8 -9.8 -93.8 0.0 -26.7 -31.7 Zack Greinke -4.8 -2.2 -16.3 10.9 43.4 -81.7 -12.6 12.5 -21.6 12.0 0.0 21.6 -3.6 Brett Anderson -4.5 -46.6 -9.9 -7.7 -4.5 -6.0 -60.9 43.0 11.5 -9.6 66.3 -23.5 -36.7 James Shields -3.1 -29.5 -35.1 -27.3 -8.4 -23.4 -68.2 73.7 32.4 -14.8 -6.7 99.8 -21.5 Cashner -4.4 -1.8 -14.0 13.0 73.4 -22.7 -35.6 -19.1 -26.1 -10.1 -8.9 -18.9 100 Tyson Ross -7.1 -50.1 -30.7 -56.2 -12.0 1.8 -53.1 7.3 -12.1 -18.0 -5.7 12.2 -0.2 Jeff Samardzija -4.3 -22.0 73.3 -44.1 2.8 42.6 14.0 100 58.4 -3.8 0.0 -3.6 27.8 Chris Sale -3.9 -12.7 -17.1 -22.7 32.3 -33.2 -14.0 -4.1 -4.2 -6.9 -4.6 -37.7 89.4 Jose Quintana -7.0 -15.7 2.0 -24.1 -18.0 1.6 -48.9 19.9 -17.6 90.0 72.0 13.9 -18.5 Julio Teheran -6.3 -21.7 57.3 2.9 -27.5 -3.8 -43.7 -13.3 -5.0 19.1 0.0 99.8 100 Alex Wood -5.5 46.0 -3.6 33.1 -51.4 -7.2 -6.2 2.9 -15.3 33.9 34.1 81.0 1.7 Shelby Miller -8.0 52.2 100 -11.6 -26.0 100 -9.4 99.8 -17.2 99.9 0.0 99.9 -30.8 Liriano -8.2 5.7 1.1 -69.7 -38.6 -52.1 -69.4 -23.5 7.6 13.2 0.0 -1.8 -63.2 Gerrit Cole -5.8 39.6 60.1 -13.8 -14.8 -36.2 3.7 99.9 -24.6 63.7 0.0 17.1 -7.7 Charlie Morton -7.7 100 -18.7 40.2 -14.8 1.9 -60.2 -15.0 -6.9 -27.2 0.0 0.0 99.9 Chris Tillman -5.0 -5.2 53.0 9.7 99.7 -34.5 39.8 36.3 19.9 23.4 0.0 0.2 21.8 Wei-Yin Chen -6.5 -18.7 43.6 40.3 18.2 24.6 18.0 -1.8 47.8 -28.3 0.0 49.5 100 Gonzalez -5.8 3.6 -18.6 -29.1 10.2 -15.0 -3.2 8.0 9.4 90.3 0.0 27.9 21.1 Bartolo Colon -7.5 100 100 100 -17.2 67.0 -36.9 -20.5 99.9 15.9 -1.0 -4.8 100 Jacob deGrom -7.8 58.8 2.9 21.7 -2.1 6.5 68.6 4.1 0.6 -7.4 99.9 -9.5 -54.3 Matt Harvey -6.8 -19.9 -40.4 -13.4 69.7 -13.1 -1.7 -19.7 -12.4 41.5 0.0 63.0 -26.2 David Price -7.6 -37.1 -15.5 -16.9 6.3 48.2 24.5 25.1 -5.7 -12.0 0.0 -4.0 -42.5 Verlander -9.0 6.8 -9.9 31.8 -10.7 -41.6 -30.6 29.5 -2.4 17.4 9.7 -16.7 77.7 Anibal Sanchez -6.5 12.9 -25.2 33.2 29.8 47.2 69.4 44.4 46.3 51.5 -3.3 62.1 -44.6 Chris Archer -7.7 4.8 53.3 -35.3 -4.2 5.2 -7.8 -21.6 -30.2 -10.2 99.8 -5.0 -100 Nate Karns -7.7 55.3 -23.2 -56.9 0.4 16.1 8.9 -19.1 -8.2 -29.4 0.0 78.1 -31.4 Jake Odorizzi -14.6 41.0 -21.2 -0.2 -15.0 100 -4.2 0.0 100 -43.2 -1.6 100 0.0 Corey Kluber -8.6 -66.2 -11.3 -4.9 9.7 -37.6 -37.7 -1.2 -17.6 -32.7 -5.3 31.2 -14.1 Carrasco -6.7 -23.3 2.7 -42.5 -20.5 -47.2 -39.9 47.1 -17.0 -66.6 0.0 11.3 -1.4 Trevor Bauer -6.1 26.2 -48.6 1.0 29.2 -22.5 -40.1 -14.7 26.5 27.4 -11.1 49.6 99.8 Mat Latos -9.8 9.3 -25.4 6.3 -21.0 69.3 24.0 -17.2 68.4 35.9 16.6 -4.2 100 Dan Haren -6.1 -0.9 100 -2.1 42.1 -7.6 -48.7 100 100 98.6 0.0 100 100 Tom Koehler -4.0 -35.3 -1.8 -38.1 -19.6 30.9 -73.8 65.1 -19.9 6.3 99.9 -5.4 58.7 Ventura -8.3 51.7 -21.4 -14.3 46.8 32.9 -51.5 82.6 -6.3 -55.0 99.9 99.9 64.7 Danny Duffy -9.9 100 33.1 9.1 -11.1 -25.2 57.6 -10.6 10.9 -14.2 0.0 -1.2 70.6 Volquez -5.8 -0.9 -18.0 -13.1 -36.7 -6.3 -100 -10.8 -10.8 -36.0 -9.7 100 -37.4

Table 12.A: Optimal y and corresponding relative changes in OBP for each pitcher. Note that many pitchers have entries of 0, especially in the (3,0) column. In these cases, pitchers threw fast balls 100% of the time on that count, so data is not available for MO for that column. Therefore, xi is 0 for these pitchers. (1 of 2)

57 ∆OBP Optimal yi,rel (%) Name (%) (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) Jon Lester -8.5 79.1 -5.9 3.9 -21.5 -32.2 -5.1 100 54.7 -8.0 -6.2 100 -35.8 Jake Arrieta -5.2 -4.1 -36.3 -10.9 -15.1 -30.6 30.4 -2.1 7.5 59.7 -13.0 0.6 -7.2 Jason Hammel -7.4 -45.4 -4.7 2.5 -25.0 -24.5 -37.3 -2.2 -3.2 -25.7 0.0 14.8 -51.1 Johnny Cueto -7.8 -30.9 100 -6.8 -17.7 11.5 17.2 -11.6 3.8 25.3 99.9 15.6 -59.5 Mike Leake -7.4 -12.3 10.4 -55.9 21.3 23.6 55.9 37.3 -22.5 -28.2 0.0 100 100 Desclafani -4.8 29.6 -29.1 -8.7 -4.1 57.9 14.3 -20.6 61.6 39.0 -5.9 54.3 -31.2 Sonny Gray -6.5 -35.9 -4.4 2.9 -8.4 -10.5 -31.9 19.6 -1.6 -64.5 0.0 -9.2 -38.2 Scott Kazmir -5.4 100 29.0 36.2 46.7 10.8 48.7 42.2 -10.0 6.1 100 12.1 76.6 Graveman -6.6 100 -4.7 -22.6 -10.7 99.9 -14.8 100 72.2 -27.3 0.0 -21.3 41.7 Jered Weaver -7.5 -50.0 32.9 6.2 8.5 -4.5 -41.0 4.5 1.1 -71.1 -5.4 -6.8 -100 Garrett Richards -6.0 35.4 -1.6 -25.4 8.7 -2.5 -58.8 3.0 -10.7 33.1 0.0 -9.0 -61.5 C.J. Wilson -6.9 -55.2 -6.2 -23.7 -7.8 -14.1 -7.8 -32.8 -14.4 50.5 0.0 3.1 9.8 Bumgarner -6.4 -67.5 -9.6 19.3 41.2 -9.2 29.4 2.4 -3.2 -28.1 0.0 14.3 -24.2 Tim Hudson -9.5 22.6 -13.5 99.9 83.4 -30.1 -14.7 0.0 -33.9 -27.5 0.0 0.0 100 Jake Peavy -8.6 21.4 99.9 -34.5 -5.1 -36.2 -3.9 28.4 45.7 42.5 -0.8 100 100 Clay Buchholz -5.5 10.8 -37.6 -35.1 -14.2 -33.7 -16.4 99.8 -4.9 -34.1 0.0 0.0 23.3 Rick Porcello -7.0 70.1 -11.1 9.5 -35.6 13.1 5.6 6.6 27.9 96.5 -4.7 7.4 -21.3 Joe Kelly -3.8 -17.7 75.2 -20.9 66.6 -2.4 -38.4 23.6 -15.8 -20.2 0.0 99.9 63.3 Kyle Lohse -9.0 5.6 -52.2 -3.1 -25.2 35.5 -58.8 -1.3 10.6 -49.5 99.9 -12.6 19.7 Matt Garza -7.1 -21.1 41.3 -12.7 83.8 58.4 -34.2 12.6 29.5 60.5 99.6 -9.9 -9.2 Wily Peralta -6.6 -13.3 -23.3 -7.3 -13.7 22.0 24.3 -6.1 -22.0 -40.1 100 -18.3 -44.2 Masahiro Tanaka -9.5 -28.7 72.4 -17.0 -8.8 -3.2 -44.9 -5.1 -30.7 36.3 28.0 13.9 20.5 CC Sabathia -5.7 15.8 -61.6 -12.2 14.3 -29.0 45.3 22.5 31.4 13.7 0.0 99.9 25.8 Michael Pineda -7.1 24.0 5.0 -31.5 86.5 9.0 -58.0 -4.4 -17.1 -34.5 0.0 -16.4 -12.3 Dallas Keuchel -6.7 -24.6 4.6 6.4 -23.9 34.9 -60.0 16.1 -30.3 -50.7 -8.0 56.5 0.9 Scott Feldman -7.5 -32.1 22.7 -23.9 -4.7 8.8 57.8 -4.7 -11.4 15.7 0.0 -24.2 100 Collin McHugh -3.5 -2.7 12.9 -53.9 18.8 -65.6 5.6 -0.8 -70.8 1.0 -5.8 -42.0 -30.8 Cole Hamels -5.3 -2.5 4.9 -0.8 -39.8 -13.0 38.5 -10.1 -1.5 -54.6 100 -18.8 -32.0 Aaron Harang -6.4 100 -14.9 10.5 -26.1 -6.6 -31.8 96.1 -7.5 51.9 98.0 98.8 -12.3 Jerome Williams -6.6 -0.1 63.3 -24.9 30.6 67.4 20.2 60.4 -8.9 -1.2 -26.5 100 -32.8 Drew Hutchison -4.0 84.0 14.4 -21.4 -11.2 17.5 1.1 -4.8 88.1 43.8 99.8 95.3 100 R.A. Dickey -5.4 -100 -90.6 49.3 5.3 -100 -99.9 -4.4 6.1 -100 -4.2 17.8 -100 Mark Buehrle -3.7 -31.1 -0.9 65.7 -13.1 43.0 -16.6 -18.4 22.7 100 31.8 12.2 99.7 Yovani Gallardo -7.1 -26.2 1.4 -22.6 17.2 -52.6 49.5 18.5 -14.4 7.8 -2.5 62.0 99.6 Colby Lewis -6.7 -11.4 26.5 -45.8 -48.7 -77.8 -58.1 -0.1 -14.5 0.2 12.6 71.1 22.1 Nick Martinez -4.3 -3.5 -49.0 -8.7 20.0 22.5 -3.8 -9.8 39.6 49.7 100 -9.6 -26.7 Phil Hughes -6.0 67.8 63.0 27.4 27.6 -40.6 -5.5 0.0 17.4 -14.4 0.0 -30.7 -8.0 Ervin Santana -9.8 -58.1 -5.1 -100 3.4 0.6 -42.6 -0.4 66.7 -49.3 -7.0 -2.0 -19.9 Kyle Gibson -8.8 -18.7 11.8 -17.5 -10.4 -6.0 -45.0 30.3 -38.4 -79.2 -7.8 -4.8 -1.8 Josh Collmenter -6.2 32.2 44.6 6.4 -22.7 34.6 -30.5 0.0 -6.7 6.4 100 99.4 -45.9 Hellickson -7.3 39.9 -11.7 6.8 -8.3 -36.3 -83.9 -8.9 -2.1 -40.9 22.6 -10.2 8.8 Rubby de la Rosa -4.9 3.2 -11.3 24.9 39.1 29.7 -28.3 -14.1 -7.1 35.4 0.0 -31.2 -54.8 Jorge de la Rosa -15.2 69.2 -3.6 -0.4 -23.8 -40.7 88.5 0.0 0.0 -15.2 0.0 0.0 0.0 Kyle Kendrick -6.9 100 35.0 -49.5 -35.9 -10.0 -4.6 23.2 -4.4 -5.7 0.0 92.8 -8.9 Chris Rusin -5.3 9.9 72.6 16.0 -7.0 -8.3 71.6 14.5 78.0 -14.7 0.0 99.9 -21.1 Average -6.7 7.3 9.8 -4.6 6.2 0.6 -11.5 15.9 6.9 2.8 19.7 25.4 10.1 Avg. Abs. Value 6.7 34.8 31.1 25.0 26.5 30.1 37.2 25.8 24.4 37.4 23.3 36.4 45.1 Number >0 0 41 43 35 39 38 31 44 36 42 27 49 39

Table 12.B: Optimal y and corresponding relative changes in OBP for each pitcher. (2 of 2)

58 Figure 11: Plot of the gradients of T (r) for Jake Odorizzi where r = y0 + λyopt., for 0 ≤ λ ≤ 1. Two of the slopes change from negative to positive as r shifts from y0 to y0 + yopt.. These two slopes correspond to (0,2) and (1,2) — both of the counts that have disagreements between Table 11 and Table 12.

the optimization results are valid. Again, I verified that for each player, the minimized

OBP from fminunc was lower than T (y) for 1,000 randomly generated y vectors.

Although the average yi values do not fully agree with the gradients of T , they do agree with the prior analysis on pitch location. The pitch location analysis showed that pitchers, on average, should throw more waste pitches on (0,2) and (1,2). It is common for these waste pitches to be off-speed, so the results of pitch selection optimization may be influenced by the pitch location optimization.

Similar to Table 10, the second column of Table 12 displays ∆OBPopt.,norm.. Again, because these precise values are a function of an arbitrary constraint, they are not

important in an absolute sense. However, a player’s ∆OBPopt.,norm. is important in

59 terms of how it compares to this value for other players. The closer a player’s ∆OBP is to zero, the less that player would improve if he improved his pitch type decisions. We can interpret this, assuming game theory feedback, to mean that these pitchers currently make close to the best pitch selection decisions they can, given their skill set. Similarly, pitchers with large |∆OBP| make poor decisions, relative to other players, regarding pitch selection. Figure 12 illustrates the relationship between pitch selection “decision-making

error” and pitch location “decision-making error” using |∆OBPopt.,norm.|. A lower absolute value indicates a smaller potential change in OBP under optimal decision- making. The correlation between these metrics is weak but statistically significant; how much a pitcher could improve by changing pitch location probabilities tells us a little about how much he could improve by changing pitch selection probabilities.

Figure 12: Scatter plot of |∆OBPopt.,norm.| based on pitch type vs. |∆OBPopt.,norm.| based on pitch location for each pitcher. The R2 of the trend line is 4.67%, and in a simple regression of Pitch Location Error on Pitch Type Decision Error, the t-statistic on β is 2.08.

60 7 Principal Component Analysis

The above analysis focuses on how pitchers and batters can change the expected outcomes of at-bats by using different strategies. In addition to evaluating certain strategies, Katz suggested that the at-bat Markov model might be a promising tool for evaluating pitchers. The following section explores how the 90 different Markov chains — one for each pitcher — compare to each other, and whether or not differences in these matrices reflect differences in skill level. In order to compare each pitcher’s Markov transition matrix built from 2015 data,

I first transform each pitcher’s M into a vector, vi. These vectors contain the 112 entries of M that are not constant at 0 or 1 for all pitchers, namely A through DH in Figure1. Next, I run a principal component analysis of all 90 of these vectors. Principal component analysis (PCA) is a linear algebra technique that takes a set of n vectors of size k by 1 as inputs and outputs a set of m ≤ n principal components of

size k by 1. The first principal component, c1, is the vector that explains the most variance possible between all the input vectors. The second principal component, c2, is

the vector that explains the second most variance possible, given that c2 is orthogonal

to c1, etc. After obtaining the principal components, vi can be written as a linear

combination of all ci plus m, the mean of all vi:

vi = m + w1c1 + w2c2 + ... (41)

th where wi is the weight on the i principal component.

Vector c1 explains 21.1% of the total variance observed in the vectors created for

the 90 pitchers sampled, and c2 explains an additional 13.9%. In other words, 35% of the variation among the 90 transition matrices for all pitchers can be explained by

61 Figure 13: Principal Component 1. This matrix explains 21.1% of the variance among the 90 Markov chains. A higher weight on this matrix translates to more pitches resulting in strikes and fewer pitches resulting in balls, especially on three-ball counts, but also for allowing more contact. two matrices. These special matrices, created by filling the lettered entries in M with the values in c1 and c2, are imaged in Figure 13 and Figure 14. Figure 15 displays the mean transition matrix for all players. Note that the constant absorbing columns are not displayed.

To summarize these figures, a higher weight on c1 codes for pitches more often resulting in strikes than balls, especially on three-ball counts. At the same time, c1 also represents minor increases in contact percentage. Component c2 also codes for pitches more often resulting in strikes than balls, with emphasis placed on two-strike counts. Moreover, c2 codes for decreased contact but increased walk rates. Understanding what each of the first two principal components represents in terms of pitcher performance, and knowing that these components explain a substantial

62 Figure 14: Principal Component 2. This matrix explains 13.9% of the variance among the 90 Markov chains. A higher weight on this matrix translates to more pitches resulting in strikes, especially on two-strike counts. This matrix also decreases contact but increases walks starting from three-ball counts.

63 Figure 15: Mean transition matrix for all 90 players sampled

portion of the total variance among pitchers, it is likely that pitcher performance

is strongly correlated with w1,i and w2,i, the weights on c1 and c2 for each pitcher.

Figure 16 displays the relationship between w1, w2, and WHIP. The spread of these weights is evenly distributed around (0,0) with w1,i having no impact on w2,i.

This figure shows that in general, pitchers with a low WHIP have a high w1, a

high w2, or both. In an ordinary least squares (OLS) regression of WHIP on w1 and w2, the coefficient on w1 is -0.435 with a t-statistic of -5.02, the coefficient on w2 is -0.748 with a t-statistic of -7.01, and the R2 is 46.1%. There are some important

standout points in Figure 16, most notably Zack Greinke, with a w1 of -0.02 and a w2 of -0.01. With these coefficients, one would expect Greinke to be an average pitcher, yet he had the lowest WHIP of the group in 2015. Either this could be a fluke, and we should expect Greinke’s WHIP to increase unless he changes his transition matrix,

or this example just captures the fact that the relationship between WHIP, w1, and

64 Figure 16: w1 vs. w2, color coded for WHIP. In general, either a higher w1, w2, or both is associated with a lower WHIP.

w2 is imperfect. Examining Greinke’s trends in performance, his WHIP values from 2011 to 2015 are 1.20, 1.19, 1.11, 1.15, and 0.84. Perhaps Greinke’s success in 2015 is an outlier not fully representative of his true skill level.

walks + hits WHIP is a relatively simple statistic, calculated as innings pitched , and it does not take into account the impact of events beyond the pitcher’s control. Therefore, variation in performance as measured by WHIP is likely to be somewhat influenced by luck or other factors. As mentioned in the introduction, xFIP is a more advanced pitching metric that normalizes a pitcher’s performance to adjust for circumstances beyond his control, such as team defensive ability, luck, and stadium size.

Figure 17 again plots w1 vs. w2, but this time points are colored based off xFIP values. A lower xFIP is better. Figure 16 shows a clearer relationship between a

pitcher’s weights on c1 and c2 and his performance. Zach Greinke’s point has turned

65 Figure 17: w1 vs. w2, color coded for xFIP. In general, either a higher w1, w2, or both is associated with a lower xFIP.

from black (outstanding performance) to red (above average performance). In an OLS

regression of xFIP on w1 and w2, the coefficient on w1 is -1.24 with a t-statistic of

2 -3.96, the coefficient on w2 is -3.49 with a t-statistic of -9.06, and the R is 52.9%.

In this regression, w2 is more important than w1 because c2 codes for increased strikeouts, and xFIP is slightly biased in favor of strikeout pitchers. In conclusion, Figures 16 and 17 demonstrate that the at-bat Markov model, through principal component analysis, provides another way of determining the skill level of a pitcher.

66 7.1 Principal Component Analysis for Transitions Between

Counts

The fact that pitcher performance, as determined by WHIP or xFIP, which measure outcomes of at-bats, is partially explained by the values in a pitcher’s Markov transition matrix should not be surprising. In each column of a pitcher’s matrix, the final nine rows display the probability distribution among the nine potential outcomes of an at-bat. In other words, the majority of the inputs in the full principal component analysis, entries V through DH, are directly related to WHIP and xFIP. In this section, I determine the power of the at-bat Markov chain to predict a pitcher’s performance only using the entries of Q, the 12 by 12 matrix of transitions from one count to another, instead of M. I again do a principal component analysis, but this time the input vectors only contain 21 entries, A through U. Using these shorter input vectors, the first principal

component, d1, explains 26.0% of the variance in Q among all 90 pitchers. The second

principal component, d2, explains an additional 15.4% of the variance. Figures 18 and 19 image the matrix versions of these principal component vectors. Figure 20 images the mean Q matrix for all 90 pitchers.

Figure 18 shows that a higher weight on d1 translates to higher probabilities of strikes and lower probabilities of balls for every count. Meanwhile, a higher weight on

d2 translates to fewer foul balls on two-strike counts, far more strikes on (3,1), and

other changes. Because d1 has the general trend of moving the count in the direction of more strikes and fewer balls, I expect that superior pitchers will have higher weights

on d1. I also expect this to be the case for d2, but I do not expect weights on this component to be as strongly correlated with pitcher performance. Figure 21 plots the weights on each component, color coded by WHIP. Again, the

67 Figure 18: Principal Component 1. This matrix explains 26.0% of the variance among the 90 Q matrices for each pitcher. A higher weight on this principal component translates to higher probabilities of strikes and lower probabilities of balls for every count.

68 Figure 19: Principal Component 2. This matrix explains 15.4% of the variance among the 90 Q matrixes. A higher weight on this principal component translates to fewer foul balls on two-strike counts, more strikes on (3,1), and other changes.

69 Figure 20: Mean Q transition matrix for all 90 players. weights for each pitcher come from a distribution centered at (0,0). Although the

relationship between w1, w2, and WHIP is not as clear as that in Figure 16, it is

apparent that most pitchers with low WHIP values have either a high w1, a high w2,

or both. In a simple OLS regression of WHIP on w1 and w2, the load on w1 is -0.752

2 and the load on w2 is -0.530, with respective t-statistics of -6.78 and -3.68. The R for this regression model is 40.6%. Figure 21 and the regression output are significant because they show that without even knowing the outcome of at-bats, much can be predicted about a pitcher’s performance solely from the way he works through an at-bat, on average. This highlights the importance of managing the count and staying ahead of the batter, a theme first addressed in Figure5. Furthermore, this suggests principal component analysis of Markov transition matrices may be a useful tool in a statistical evaluation

70 Figure 21: w1 vs. w2, color coded for WHIP. In general, either a higher w1, w2, or both is associated with a lower WHIP.

71 of a pitcher, in addition to popular statistics such as , WHIP, and strikeouts per nine innings. Popular statistics focus mostly on outcomes of at-bats and innings pitched, while the at-bat Markov model PCA approaches evaluation from a more granular perspective. Because it uses a more fine-grain level of analysis — observing every pitch instead of every at-bat — the at-bat Markov model is less likely to be subject to outliers than outcome-based statistics.

7.2 Principal Component Analysis of Gradients of S and T

In this section, I perform principal component analyses of the gradients of S and T , expected opponent on-base percentage as a function of pitch location and pitch selection probabilities. In these two analyses, the input vectors are the rows of Table 9 and Table 11 — each player’s set of gradients. The outputs for the PCA of gradients

of the pitch location function are s1 and s2, the first two principal components, and w1 and w2, the 90 by 1 vectors of weights on s1 and s2 for each pitcher. The outputs

for the PCA of gradients of the pitch selection function are t1 and t2, the first two

principal components, and v1 and v2, the 90 by 1 vectors of weights on t1 and

t2 for each pitcher. Components s1 and s2 explain 41.9% of the variance in pitch

location gradients, while t1 and t2 explain only 34.3% of the variance in pitch selection gradients. Table 13 displays the principal components outputted by the two analyses.

Principal Component Entry Vector (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) (2,2) (3,0) (3,1) (3,2) s1 0.74 0.21 0.11 0.37 0.27 0.17 0.10 0.16 0.30 0.04 0.14 0.07 s2 0.15 -0.07 0.28 -0.05 -0.12 0.74 -0.12 -0.17 -0.44 -0.03 -0.10 -0.29 t1 0.13 -0.07 0.14 0.07 -0.34 -0.03 -0.00 -0.08 -0.01 -0.01 0.05 0.91 t2 0.17 -0.26 -0.02 -0.02 0.80 0.14 0.02 0.17 -0.29 0.02 0.24 0.26

Table 13: Principal components of compiled gradients of S and T

As communicated in Table 13, a higher weight on s1 codes for more positive slopes

for every count; a higher weight on s1 means that throwing the ball in the strike zone

72 more often on any count results in an increased opponent on-base percentage. On

the other hand, s2 codes for more negative slopes for every count except (0,0), (0,2),

and (1,2). A higher weight on s2 means that throwing the ball in the strike zone more often on (0,0), (0,2), and (1,2) increases opponent OBP, while increasing strike percentage on other counts decreases expected opponent OBP. The more negative a

pitcher’s w2,i weight, the more he would benefit from throwing waste pitches on (0,2)

and (1,2). The results for t1 and t2 are not as clear; the signs of the entries in both of these vectors do not seem to follow a pattern. After running a series of regressions, I find that the only statistically significant relationship between these four principal components and the principal components

c1 and c2 computed above is between s1 and c1. Namely, a higher weight on s1

corresponds to a higher weight on c1, with a t-statistic of 5.58. As previously

explained, c1 codes for increased probabilities of pitches resulting in strikes and decreased probabilities of pitches resulting in balls for every count. This relationship implies that the better a pitcher is at staying ahead of the count, the larger his increase in opponent OBP if he throws more pitches in the strike zone.

8 Can the At-bat Markov Model Determine if a

Pitcher Should be Pulled?

After showing that the at-bat Markov model can be used to predict and explain pitcher performance across a season of data, a logical next question is whether or not this model can be useful in the decision-making process revolving around whether or not to pull a starting pitcher from a game. In a baseball game, a team has one pitcher pitch until he grows tired or until the coach decides that the team would be better off

73 moving forward with a pitcher from the . There are many factors and strategies that influence whether or not a coach should, and will, pull a starting pitcher from the game. One of these factors is certainly expected performance for the remainder of the game. To determine if the at-bat Markov model can be useful in predicting a pitcher’s future performance within a game, I ran a step-wise regression using data for every game, for all 90 pitchers, in 2015. The dependent variable is actual on-base percentage for all innings after the

fourth inning for each game, OBP>4. The explanatory variables are the 112 lettered

entries in M≤4, M calculated only using data from the first four innings, plus actual

on-base percentage for the first four innings, OBP≤4. I include OBP≤4 in the regression because I assume that the best predictor of a pitcher’s opponent OBP in innings 5–9 of a given game will be opponent OBP in innings 1–4 of that game, and I wish to test

if any of the Markov transition probabilities are useful if OBP≤4 is already used. I ran a stepwise OLS regression in Stata using a hurdle p-value of 0.05. The results of this regression are displayed in Table 14. The adjusted R2 for this regression was quite low at 4.1%. Fourteen entries of M are statistically significant in the regression output. Many of these variables have coefficients that make sense intuitively. For example, the coefficients on F and H are negative. These coefficients imply that all else equal, converting more (1,0) and (1,1) counts into (1,1) and (1,2) counts early on in the game corresponds to a lower OBP in the second half of the game. However, some of the coefficients do not make as much intuitive sense. For example, the coefficient on AO is negative, but AO is the probability of hitting the batter with the (1,0) pitch. All else equal, this implies that hitting more batters — generally a sign of a lack of location control — early in the game corresponds to a lower OBP later in the game. This effect is likely not reliable due to the rarity of this event. In conclusion, while

74 Variable Coefficient (Std. Err.) BP -1.184∗∗ (0.232) AK -0.122∗∗ (0.044) BG 0.633∗ (0.312) AB 0.108∗ (0.047) AF 0.068∗ (0.033) F -0.887∗∗ (0.178) Y -0.877∗∗ (0.192) H -0.119∗ (0.053) AP 2.016∗ (0.849) J -0.805∗∗ (0.177) BY 1.586∗ (0.649) AO -3.064∗∗ (1.165) BO 0.332∗∗ (0.124) ∗∗ OBP≤4 0.113 (0.036) Q 0.146∗∗ (0.040) Intercept 1.121∗∗ (0.176)

Table 14: Output of the stepwise regression of OBP>4 on the lettered entries of M and ∗ ∗∗ OBP≤4. Note: denotes significance at the 5% level, denotes significance at the 1% level.

it is probably helpful to monitor some of these values, especially F and H, the low R2 and the slightly counterintuitive directionality of some of the coefficients likely indicate that the at-bat Markov model does not have much promise for predicting late-inning OBP or determining whether or not to pull a starting pitcher.

9 Conclusion

My goal of this thesis was to explore and test rigorously the at-bat Markov model initially proposed by Katz thirty years ago. I have shown that a visual comparison of the matrices for two players reflects known differences in each pitcher’s skill level and pitching style. In addition, a visual analysis of changes over time in a player’s Markov chain helps diagnose the causes of changes in performance. Furthermore, I have shown that over the timeline of one season, the at-bat Markov model predicts

75 strikeout percentage, pitches per inning, and walk plus hit percentages that are very close to actual statistics, and this precision indicates that outputs of the model given varying inputs will be accurate. My model suggests that the effectiveness of taking a first pitch or throwing the ball outside the strike zone on an (0,2) count depends on the pitcher. In general, taking the first pitch is more successful against weaker pitchers than stronger pitchers, while throwing an (0,2) waste pitch benefits strikeout pitchers slightly more than pitchers who pitch to contact. However, these general trends cannot be applied as blanket rules; for example, there are many strikeout pitchers who would benefit from throwing fewer waste pitches. Neither of these results take into account the potential changes in batter temporal and spatial calibration that could result from a player employing one of these strategies. More generally, I find that, on average, pitchers should be increasing their usage of waste pitches on (0,2) and (1,2) counts in order to reduce expected opponent on-base percentage. Furthermore, these waste pitches should often consist of off-speed pitches. I find that expected opponent OBP is less sensitive to pitch selection decisions compared to pitch location decisions, and the general trends in decision sensitivity are more pronounced for pitch location compared to pitch selection. I believe that if MLB teams examine the outputs displayed in Tables 9 through 12, and if these pitchers perform in 2016 like they did in 2015, pitchers could actually reduce their opponents’ on-base percentages, albeit by small absolute amounts. For some pitchers, namely those who currently make worse decisions, the potential reduction in OBP is larger. Appendix A displays a relative ranking of decision error for all 90 pitchers included in this study. While it would be unrealistic to expect that pitcher decision errors could be reduced to 0%, my research shows that some players have fundamentally flawed strategies on certain counts. For instance, based on 2015 data,

76 Masahiro Tanaka’s expected opponent OBP starting from (0,2) is more than three times higher if he throws a waste pitch on (0,2) compared to if he throws a strike on (0,2), yet he decided to throw a waste pitch 77% of the time! Although I find that the majority of players should be increasing their usage of waste pitches on (0,2), thus agreeing with traditional strategy, there is an obvious overuse of the waste pitch among pitchers who it does not benefit. The latter portion of this thesis moves on from pitching strategy and determines how a pitcher’s transition matrix is related to his actual performance. I find that both the full transition matrix, as well as the matrix only representing transitions from one count to another, are highly related to performance as measured by WHIP and xFIP. Although this model may not have much power to predict in-game performance, it could serve as a useful tool in categorizing pitchers and determining the validity of performance across several games or a season. All of these results are subject to limitations mentioned throughout this thesis. The most important limitation is the lack of incorporated game theory feedback. Future research using this model could incorporate a game theory perspective by constructing a payoff matrix for player decision probabilities and modeling how batters learn from pitchers and adapt to changes in pitcher strategy. Furthermore, this model interprets baseball only as a series of one-on-one events; it does not really model a baseball game in the sense that it does not account for numbers of outs and runners on base. Pitching in baseball is a mix of science and art, and there are too many unique factors that come into play to draw conclusions about exactly what a given pitcher should be doing on each pitch. However, I believe that if MLB teams incorporated this model in their analysis, they could improve the scouting and evaluation processes used to build a team and then help these players improve, on average, by making better decisions.

77 Appendix A. Ranking MLB pitchers by pitch location decision error13

Pitcher Team14 Location Decision Error Selection Decision Error Bartolo Colon New York Mets 6.3% 7.5% Colby Lewis 7.0% 6.7% Nick Martinez Texas Rangers 8.4% 4.3% Michael Pineda New York Yankees 8.4% 7.1% Mark Buehrle 8.5% 3.7% Kyle Kendrick 8.6% 6.9% Corey Kluber Cleveland Indians 8.9% 8.6% Chris Rusin Colorado Rockies 9.3% 5.3% Jerome Williams 9.4% 6.6% Zack Greinke 9.4% 4.8% CC Sabathia New York Yankees 9.5% 5.7% Phil Hughes Minnesota Twins 9.5% 6.0% John Lackey St. Louis Cardinals 9.6% 6.8% Drew Hutchison Toronto Blue Jays 10.0% 4.0% Johnny Cueto Cincinnati Reds 10.1% 7.8% Jason Hammel 10.1% 7.4% Andrew Cashner San Diego Padres 10.2% 4.4% David Price Detroit Tigers 10.2% 7.6% Jake Peavy San Francisco Giants 10.3% 8.6% Scott Feldman 10.6% 7.5% Jon Lester Chicago Cubs 10.6% 8.5% Alex Wood 10.6% 5.5% Felix Hernandez Mariners 10.7% 6.0% Madison Bumgarner San Francisco Giants 10.8% 6.4% Josh Collmenter 10.8% 6.2% Jeff Samardzija 10.8% 4.3% Kyle Lohse Milwaukee Brewers 10.9% 9.0% Kendall Graveman Oakland Athletics 10.9% 6.6% Collin McHugh Houston Astros 11.0% 3.5% Wei-Yin Chen Baltimore Orioles 11.3% 6.5% Dallas Keuchel Houston Astros 11.5% 6.7% Max Scherzer 11.5% 5.5% Tim Hudson San Francisco Giants 11.5% 9.5% Jose Quintana Chicago White Sox 11.8% 7.0% Jordan Zimmermann Washington Nationals 12.0% 7.8% Jered Weaver 12.1% 7.5% Aaron Harang Philadelphia Phillies 12.1% 6.4% Dan Haren Miami Marlins 12.3% 6.1% Rick Porcello 12.3% 7.0% Brett Anderson Los Angeles Dodgers 12.4% 4.5% Clay Buchholz Boston Red Sox 12.5% 5.5% Rubby de la Rosa Arizona Diamondbacks 12.5% 4.9% Charlie Morton Pittsburgh Pirates 12.5% 7.7%

13Note that the absolute value of a pitcher’s “Decision Error” is not relevant because these numbers depend on an arbitrary constraint. Rather, this metric is relevant only in a relative sense. Also note that this ranking is quite similar whether ||x|| is bounded by 0.25 or 0.5. 14The team name listed for each player is the team he began the 2015 season on. This list does not account for trades or free agency signings that occurred during or after the 2015 season.

78 Joe Kelly Boston Red Sox 12.5% 3.8% Anthony Desclafani Cincinnati Reds 12.6% 4.8% Wily Peralta Milwaukee Brewers 12.6% 6.6% Cole Hamels Philadelphia Phillies 12.7% 5.3% Yovani Gallardo Texas Rangers 12.8% 7.1% Matt Harvey New York Mets 12.8% 6.8% Stephen Strasburg Washington Nationals 13.2% 5.1% Hisashi Iwakuma 13.2% 5.0% Clayton Kershaw Los Angeles Dodgers 13.3% 8.8% J.A. Happ Seattle Mariners 13.4% 5.4% R.A. Dickey Toronto Blue Jays 13.4% 5.4% Mat Latos Miami Marlins 13.5% 9.8% Yordano Ventura 13.5% 8.3% Gerrit Cole Pittsburgh Pirates 13.9% 5.8% Julio Teheran Atlanta Braves 13.9% 6.3% Carlos Carrasco Cleveland Indians 13.9% 6.7% Chris Sale Chicago White Sox 13.9% 3.9% Kyle Gibson Minnesota Twins 13.9% 8.8% Michael Wacha St. Louis Cardinals 14.0% 5.4% Justin Verlander Detroit Tigers 14.1% 9.0% Garrett Richards Los Angeles Angels 14.3% 6.0% Ervin Santana Minnesota Twins 14.4% 9.8% Scott Kazmir Oakland Athletics 14.4% 5.4% Jake Odorizzi 14.5% 14.6% Lance Lynn St. Louis Cardinals 14.6% 5.1% Mike Leake Cincinnati Reds 14.6% 7.4% Chris Tillman Baltimore Orioles 14.6% 5.0% Edinson Volquez Kansas City Royals 14.6% 5.8% Tom Koehler Miami Marlins 14.7% 4.0% Matt Garza Milwaukee Brewers 14.8% 7.1% Jake Arrieta Chicago Cubs 14.8% 5.2% Sonny Gray Oakland Athletics 14.9% 6.5% Jeremy Hellickson Arizona Diamondbacks 14.9% 7.3% Miguel Gonzalez Baltimore Orioles 15.3% 5.8% Francisco Liriano Pittsburgh Pirates 15.4% 8.2% James Shields San Diego Padres 15.4% 3.1% Nate Karns Tampa Bay Rays 15.5% 7.7% Chris Archer Tampa Bay Rays 15.9% 7.7% Jorge de la Rosa Colorado Rockies 16.0% 15.2% Shelby Miller Atlanta Braves 16.2% 8.0% Tyson Ross San Diego Padres 16.4% 7.1% C.J. Wilson Los Angeles Angels 16.4% 6.9% Jacob deGrom New York Mets 16.9% 7.8% Masahiro Tanaka New York Yankees 17.7% 9.5% Trevor Bauer Cleveland Indians 18.1% 6.1% Danny Duffy Kansas City Royals 19.7% 9.9% Anibal Sanchez Detroit Tigers 19.8% 6.5%

79 References

Major league baseball team payroll tracker. Spotrac, 2016.

Sortable player stats. FanGraphs, 2016.

Sal Baxamusa. The memory remains. The Hardball Times, 2006.

Bruce Bukiet, Elliotte Rusty Harold, and Jose Luis Palacios. A Markov chain approach to baseball. Operations Research, 45.1:14–23, 1997.

Earnshaw Cook. Percentage Baseball. 1966.

Thomas M. Cover and Carroll W. Keilers. An offensive earned-run average for baseball. Operations Research, 25.5:729–740, 1977.

R. Allan Freeze. An analysis of baseball batting order by Monte Carlo simulation. Operations Research, 22.4:728–735, 1974.

James Gentile. Swinging or taking on the first pitch. The Hardball Times, 2013.

Robert Hooke. Book review: Percentage Baseball. Journal of the American Statistical Association, 62.318:688–690, 1967.

Tharemy Hopkins and Rhonda C. Magel. Slugging percentage in differing baseball counts. Journal of Quantitative Analysis in Sports, 4.4:688–690, 2008.

Adam Houser. Which baseball statistic is the most important when determining team success? The Park Place Economist, 13:29–36, 2005.

R. A Howard. Dynamic programming and Markov processes. 1960.

Stanley M Katz. Study of ‘the count’ yields fascinating data. Baseball Research Journal, 15, 1986.

80 Joe Lemire. The myth of the first-pitch strike. Grantland, 2014.

George R Lindsey. An investigation of strategies in baseball. Operations Research, 11.4:447–501, 1963.

Frederick Mosteller. The world series competition. Journal of the American Statistical Association, 1952.

Lewie Pollis. How much does a win really cost? Beyond the Box Score, 2013.

Barry Svrluga. Ranking all 30 MLB rotations. The Washington Post, 2015.

Warren Weckesser. Math 312 lecture notes: Markov chains. Colgate University, 2005.

Neil Weinberg. xFIP. FanGraphs Library, 2016.

Daren Willman. PITCHf/x search. BaseballSavant.com, 2016.

81