Saturday, June 20, 2015

Getting Inside the Manager's Head

Do you ever watch a game and think that the manager is making a boneheaded decision by leaving a pitcher in or taking a pitcher out of a game? It turns out that the manager's 'gut' feeling can be quantified. In fact through the miracles of regression analysis, knowledge of baseball, and critical thinking, fans can now understand when and why a starting pitcher is going to be taken out of a game.

Joe Girardi Calling to the Bullpen
Using several continuous and categorical variables the number of pitches, age of the pitcher, runs allowed, and whether the game is being played at home and away had the most effect on the manager's decision to pull out a pitcher. We use these variables to predict innings pitched.

There is to be a note on runs allowed. If a pitcher is starting an inning and allows a base runner that base runner is to be considered a potential run until he is not on base. So when calculating how many innings a pitcher will pitch you are to include the runners on base on base in the current inning as runs. This is because often a manager's decision to take out a pitcher is based on the possibility of giving up more runs, also known as base runners.

In the regression equation, runs allowed has the greatest impact on whether a manager will take out the pitcher, which makes plenty of sense. It conveniently works out that each run allowed results in a deduction of one third of an inning pitched. Pitch count also has a lot to do when a pitcher is going to come out of a game. The more pitches a pitcher throws, the further he will go into a game, but not necessarily will be taken out.

An interesting thing I discovered when running this regression model was that 0.5 more innings are pitched by starting pitchers at home than away. People may say that makes plenty of sense because in order to conclude a win at home the home team has to pitch the top of the ninth but the away team does not have to pitch the bottom of the ninth. Managerial tendencies in today's game show that it is unlikely for a starting pitcher to pitch a complete game, so the extra half an inning does not have much to do with the concept of last licks, but rather strictly being at home.

Regression Equation:

A          Innings = 1.57 + 0.04734 Pitches - 0.3219 Runs + 0.0226 Age

H          Innings = 2.07 + 0.04734 Pitches - 0.3219 Runs + 0.0226 Age

Clayton Kershaw handing the ball over to manager
Don Mattingly 
The older the pitcher the further he is to go into the game, either due to experience or the manager's respect for the pitcher.

This equation is to be used a game goes on, because with each pitch the pitcher pitches the further he will go into the game. 100 pitches results in about 6 innings pitched without giving up a run. 100 pitches and 3 runs allowed results in about 5 innings pitched.

If a pitcher is approaching the inning which the equation yields he becomes more and more likely to get pulled from the game. If a pitcher pitches past the inning which the equation yields he becomes very likely to be taken out of the game. The regression model summary had a R^2 value of 65.38%. This means that 65.38% of the manager's decision to take a pitcher out of a game is attributed to these factors. Other non quantifiable factors that may effect a managers decision to take out a pitcher are a reliable bullpen, injury history, outliers in score, game delays, and ejections.

One variable that I tested that turned out not to have much effect on when a manager would take a pitcher out of a game was the categorical variable of League. Pitchers pitching in National League games stay in games to similar lengths as pitchers pitching in American League games.