My son's team has given up 63 earned runs over 102 innings so far this season. We play 6-inning games.
(ER / IP) x Inns per Game = ERA
63 / 102 = .61764706
.61764706 x 6 = 3.71 (rounded)
iScore is displaying an ERA of 4.04
I thought maybe it was calculating by 7 innings but I did that math...
.61764706 x 7 = 4.32 (rounded)
I checked against the ERA/9 which is obviously a 9 inning game:
.61764706 x 9 = 5.56 (rounded)
which is CORRECT
So, in the end it seems to calculate a correct ERA/9, but no a correct ERA/6.
First question, is does this calculation come off of the # of innings set in Game Options? Should it be a field in stats so that it is settable by the user?
Now, maybe this it the wrinkle that causes the bug, elucidates the problem: This team, even though we normally play 6-inning game has played two 7-inning games and two 9-inning games (in lieu of double headers, these were not extra inning games, but rather planned extended games).
Now, should that matter in a simple calculation of (ER / IP) * Inns per game, probably not, but what if it is actually take the average innings per game.
We have played 16 games so far this spring and the innings per game was set as follows:
7,7,6,6,6,6,9,9,6,6,6,6,6,6,6,6 = 104 scheduled innings or an average of 6.5 innings per game
I'm going to try to solve the formula with this new innings per game #:
(ER / IP) x Inns per Game = ERA
63 / 102 = .61764706
.61764706 x 6.5 = 4.01 (rounded)
iScore is displaying an ERA of 4.04
So actually taking the real average innings per game gets us really close, but not to the displayed ERA of 4.04.
Let's try again (again switching one variable, this time actual SCHEDULED innings with an average of 6 and an average of 6.5):
(ER / IP) x Inns per Game = ERA
63 / 104 = .60576923
.60576923 x 6 or 6.5 = 3.63 or 3.94 (rounded)
iScore is displaying an ERA of 4.04
So this isn't the answer.
We have played two extra innings games (games scheduled for 6 innings that went 7 and 8 respectively).
So, now, as I have typed this, I just realized something: Maybe the actual number of innings pitched is wrong? So I did that math:
7,7,6,6,6,6,9,9,5,7,3,5,6,8,6,6 = 102 innings actually pitched, so that is correct.
102 / 16 = 6.375 Maybe this is the problem?
(ER / IP) x Inns per Game = ERA
63 / 102 = .61764706
.61764706 x 6.375 = 3.94 (rounded)
iScore is displaying an ERA of 4.04
So, no, this isn't it either.
The ERA calculations for the individual players are wrong as well.
So...I think I found a bug.
