Friday, 15 March 2013

Balancing the Innings for a Pitching Staff


In my last post, I discussed Pete Palmer’s Linear Weights formula.  I showed how it could be used to estimate the number of runs produced by a men’s fastpitch softball team.

In this post, I will look at a similar idea of linear weights to evaluate a pitching staff.  Then I will use the linear weights to balance the innings assigned to each pitcher to minimize the runs given up by a men’s fastpitch softball team.

I took the pitching statistics for the primary pitchers in a local men’s fastpitch softball league.   I calculated various pitching statistics in terms of their values per inning.  Then I used multiple linear regression to estimate the runs allowed per inning pitched as a function of hits allowed (non-homeruns), walks (base on balls and hit by pitch), strikeouts, and homeruns allowed per inning pitched.

Here is the data that I used.

Pitcher
Hits
Walks
Strikeouts
Homeruns
Runs Allowed
1
1.05
0.42
1.32
0.08
0.58
2
1.23
0.57
0.91
0.16
1.25
3
1.49
0.47
1.24
0.17
1.18
4
0.79
0.26
1.44
0.12
0.32
5
0.83
0.68
1.43
0.00
0.48
6
1.03
0.34
1.52
0.08
0.76
7
1.09
0.34
1.07
0.10
0.73
8
1.13
0.54
1.02
0.17
1.22
9
1.42
0.46
0.46
0.07
1.05
10
1.31
0.20
0.76
0.06
0.71
11
1.09
0.76
1.27
0.15
0.97
12
1.19
0.65
1.19
0.11
0.98
13
0.46
0.33
1.77
0.06
0.40
14
1.15
0.66
0.66
0.16
1.23

The formula that I obtained from the linear regression is

Runs Allowed = 0.42*Hits + 0.55*Walks – 0.14*Strikeouts + 2.36*Homeruns

Pitchers 1, 2 and 3 are on the same team.  

I wanted to balance the number of innings between the three pitchers.  I found that one good way to do that was to equalize the runs allowed by each pitcher.

Here are the results.

Weight
0.42
0.55
-0.14
2.36
Games
Innings
Hits
Walks
Strikeouts
Homeruns
Runs Allowed
9
60
1.05
0.42
1.32
0.08
40
5
37
1.23
0.57
0.91
0.16
40
5
36
1.49
0.47
1.24
0.17
40
19
133
120

So the manager should plan to throw pitcher 1 for 60 innings or the equivalent of 9 games during the season.  Pitchers 2 and 3 would be expected to throw 37 and 36 innings respectively which represents approximately 5 games each.

The entire ptiching staff would be expected to allow 120 runs during the season.

I can now use the expected offensive production of the batters on the team from the previous post and the expected runs allowed by the pitchers shown here in the Pythagorean formula to estimate the winning percentage of the team during the regular season.

Linear Weights to Predict Expected Runs Produced by a Team


In my last post, I talked about Bill James Pythagorean Formula to convert runs for and against into an estimate of winning percentage.

Here are the results for the regular season of an Ontario league.


Team
RF
RA
Actual
Estimated
Diff
A
109
59
0.694
0.773
-0.079
B
94
81
0.605
0.574
0.031
C
92
86
0.556
0.534
0.022
D
74
84
0.447
0.437
0.010
E
106
113
0.421
0.468
-0.047
F
79
102
0.395
0.375
0.020
G
90
119
0.389
0.364
0.025

Notice that the error is less than 10% for all of the estimates.

Pete Palmer provided a method called “Linear Weights” to estimate the number of runs contributed by an individual player.

A simplified version of his formula is

Runs = 0.46*1b + 0.85*2b + 1.02*3b + 1.4*hr + 0.33*walks

The coefficients would need to be modified to apply to this league.   I took all of the individual batting statistics for the league and found that the following formula would be able to estimate the runs produced by each player.

Runs = 0.44*1b + 0.83*2b + 1.00*3b + 1.38*hr + 0.31*walks

Here are the values for Team G.

1B 2B 3B HR Walks Runs
112 11 7 10 29 89

This team actually scored 90 runs.  So this estimate is quite accurate.

Using Linear Weights, I can also estimate the offensive contribution of each player to the team.

In my next post, I show how I can estimate the runs against for a team using pitching statistics.  Then I can use the Pythagorean formula to estimate the winning percentage.





Tuesday, 12 March 2013

Estimating Winning Percentage from Runs For and Against


Bill James created a formula (which he called the Pythagorean formula) to estimate a team’s winning percentage based on their runs for and against.

Winning Percentage = (Runs For)^2 / [ (Runs For)^2 + (Runs Against)^2 ]

During the recent International Softball Federation World Championship, I used this formula to calculate the winning percentage of the teams during the round robin play of the tournament.  Below are the results.

 Pool A

Team
Games
Wins
Runs For
Runs Against
Estimated Win Percentage
Predicted Wins
Difference in Wins
Australia
7
7
48
5
0.989
7
0
Venezuela
7
5
28
17
0.731
5
0
United States
7
4
38
25
0.698
5
-1
Samoa
7
4
31
25
0.606
4
0
Great Britain
7
3
20
18
0.552
4
-1
Czech Republic
7
3
37
38
0.487
3
0
South Africa
7
2
13
37
0.110
1
1
Indonesia
7
0
14
64
0.046
0
0


Pool B

Team
Games
Wins
Runs For
Runs Against
Estimated Win Percentage
Predicted Wins
Difference in Wins
Canada
7
6
44
12
0.931
7
-1
New Zealand
7
6
36
12
0.900
6
0
Japan
7
5
45
13
0.923
6
-1
Argentina
7
5
24
6
0.941
7
-2
Colombia
7
3
17
25
0.316
2
1
Mexico
7
2
19
41
0.177
1
1
Netherlands
7
1
14
57
0.057
0
1
Philippines
7
0
12
45
0.066
0
0


The James Win Percentage Formula did a relatively good job of predicting the winning percentage and thus the number of wins in the round robin portion of the tournament.

The only anomoly seems to be Argentina who allowed very fews runs but scored very few runs.  The Bill James Formula over-estimated their winning percentage.