How to Calculate SRC

A player’s SRC is the Shapley Value for that player in a coalitional-game representation of run scoring.  As shown in the Shapley Value Learning Page, the calculation of the Shapley Value is straightforward once the value function of the coalition game is defined.  All that must be done is to list the orders, calculate the marginal values, and then find the average of those marginal values.

However, defining the value function is not trivial.  Indeed, the main innovation in creating the SRC statistic is the development of a systematic method for constructing the value function for scoring runs. This method involves simulating how many runs would score for each coalition of teammates when only the offensive contributions of those teammates are included in the half-inning.  Each simulation is a hypothetical reconstruction of what would have happened in the game with the teammates not in the coalition are removed from the sequence of plays, akin to how an official scorekeeper imagines how many earned runs would score had an error not occured. Baseball judgement enters directly into these reconstructions.

Constructing the value function and completing the Shapley Value calculation is done by following these three steps.

STEP 1:  EVENT-TRIGGER SCOREKEEPING

The first step is to complete the event-trigger scorekeeping which involves replacing the official scorekeeper’s designation for each play with an appropriate “event trigger” label that corresponds to a multi-dimensional description of that play. Although most of the statistics presented on this website were calculated using event-trigger scorekeeping done by a computer program, most users of this web site will do the event-trigger scorekeeping manually.  Instructions for doing this are provided on this page below.

An event trigger is a scorekeeping innovation that is required by the computer to create hypothetical reconstructions of the game to determine how important each player is to scoring and winning.  It specifies how that play event would change the base-out state and runs scored in a half-inning for each of the possible initial states of a half-inning.

As an example, let us do event-trigger scorekeeping for the bottom of the 6th inning in game 6 of the 2020 World Series.  Table 5 lists the play-by-by sequence for the half-inning.  The wild pitch has been split into two separate rows so that Barnes and Seager are associated with their own base advances.

Table 5:  Play-by-play Sequence, Bottom of 6th Inning, Game 6,2020 World Series

PlayerPlay EventInitial State (runners-outs)Outcome state (runners-outs-runs scored)Event Trigger Label
AJ PollackPop fly to 2B000-0000-1-0FO_A
A BarnesSingle to CF000-1001-1-0SGL_A
M BettsDouble to SS; Barnes to 3B001-1110-1-0DBL_A
A BarnesBarnes scores on wild pitch110-1010-1-1SB_H
M BettsBetts to 3B on same wild pitch010-1100-1-0SB_H2
C SeagerFielders choice; Betts scores on throw home; Seager to 1B100-1001-1-1FC_4
J TurnerFlyout to LF001-1001-2-0FO_A
M MuncyGroundout SS to 1B001-2010-3-0GO_A

The initial state denotes the base-out state at the start of the play.  The first three numbers denote the location of runners on third-second-first.  A zero denotes the base is empty, and a 1 denotes a runner is on the base.  For example, the state 110-1 in the fourth play event means “runners on third and second but not first with one out.”  The outcome state denotes the base-out state at the conclusion of the play, with the extra digit denoting how many runs scored on the play.  Two runs scored in this half-inning in total:  one when Barnes scored on the wild pitch, and one when Betts scored on Seager’s fielder’s choice.

The last column is the label for the event trigger assigned to the play.  Table 6 below lists, in alphabetical order, the seven event triggers assigned in this half-inning plus one that was not assigned in this half-inning. Each row below the top row corresponds to one event trigger.  For example, the event trigger DBL_A is a double in which the batter reaches second, any runner on base advances two bases, and no additional outs are made. Whether a run scores on a DBL_A thus depends on the initial base-out state.  Assigning the event trigger DBL_A to Betts’s play event implies that, in any hypothetical simulation of this inning in which Betts in the coalition, Betts’s double will move the state of play in this manner.

Table 6:  Some Event Triggers

There are other possible event triggers that could have been assigned to Betts’s double, but this one was selected for two reasons.  First, this event trigger appropriately advances the state of play as it occurred in the game when the initial state was 001-1.  If the event trigger did not do this, then the reconstructions of the half-inning would not respect the actual course of play, and this would lead to errors in calculating SRC.  Second, assigning DBL_A is conservative in that a runner on first only ever advances to third and never scores.  A less conservative event trigger would have the runner only reach third from initial state 001-1 but also, say, have the runner score from first score if initial state was 111-1.

To learn more about making these judgments, see the Instructions for Preparing Your Files page under CALCULATE.

STEP 2: SIMULATE THE HALF-INNING FOR EVERY COALITION

Once the event-trigger scorekeeping is completed, the half-inning for every coalition is simulated by tracing through the changes in states of play as implied by the event triggers for the players in that coalition.  The number of runs that score during the course of that coalition’s simulation constitutes the value in runs scored for that coalition.  Simulating the half-inning for every coalition thus provides the value function used to calculate the Shapley Value for SRC.

Given the value function, the Shapley Value calculation will always assign Null players a value of 0, and removing them does not affect the Shapley Value calculation for any of the other teammates.  Pollack, Turner, and Muncy happen to be Null teammates in this example, so we here will construct the run-value function with just Barnes, Betts, and Seager to keep the example simple.  However, a good rule of thumb is to never remove teammates unless you know that they are Null.  If you remove a teammate who is not Null, then your Shapley Value calculations will not fairly distribute credit.  Identifying and removing Null teammates requires experience and an understanding of the Shapley Value, and its primary value comes when calculating the Shapley Values by hand.  If you use this website to calculate SRC and OSWC, then it is best to just include all teammates.  The computer can perform the calculations easily enough with Null teammates, and you can be sure that you did not unintentionally remove any non-Null teammates.

Let A represent [A]ustin Barnes, B represent Mookie [B]etts, and C represent [C]orey Seager.

The hypothetical coalition of None contains no offensive plays.  Without any offensive plays, no runs score, so the run value for the None coalition is 0.  In fact, by this logic, the run value for the None coalition will always be 0.

The coalition of just A is an inning with event triggers SGL_A and SB_H in that order.  A simulated half-inning always begins at the initial state 000-0.  Event trigger SGL_A takes the course of play to 001-0-0, then event trigger SB_H takes the course of play to 010-0-0, and then the half-inning ends.  That is, with just Austin Barnes, the offense would result in a player reaching second base but not scoring.  The run value for coalition A is thus 0.  Similarly, the coalitions of just B or just C also result in run values of 0.

The coalition AB has four event triggers — SGL_A, DBL_A, SB_H, and SB_H2 — in that order.  Notice that the event triggers for Barnes and Betts are placed in the order that respects the order of the play events in the actual game, i.e., Betts’s DBL_A is placed in between Barnes’s SGL_A and SB_H, and Betts’s SB_H2 is placed after Barnes’s SB_H.  This proper sequencing must always be respected to ensure proper simulations and calculations of SRC and OSWC.  Simulating the course of play implied by these event triggers in this order results in Barnes scoring and Betts reaching third.  This event sequence ends with 1 run having scored, so the run value of the AB coalition is 1.

Simulating the event triggers for AC yields 0 runs, and simulating BC yields 1 run.  Finally, simulating all of the event triggers in proper sequence results in 2 runs, which equals the actual runs scored in the game.  Done properly, the run value for the full coalition of teammates must always equal the number of runs scored in the actual half-inning.

Table 7 lists the value function for this half-inning.

Coalition MembersValue Function
None (the empty set)0
A0
B0
C0
AB1
AC0
BC1
ABC2

STEP 3: CALCULATE THE SHAPLEY VALUES USING THE VALUE FUNCTION

Because the values in Table 7 are in run units, the Shapley Value calculation will distribute the credit for the 2 runs that are scored by the full coalition of teammates among the three teammates.  This fact allows us to interpret the Shapley Value for a player as that player’s SRC, i.e., the run credited to that player when credit for the team’s runs are fairly distributed among the players.

For those who use this website’s CALCULATE feature to calculate SRC or OSWC, the website will calculate the Shapley Values automatically after performing all of the simulations to create the value function using the event-trigger file submitted by the user.  To calculate the SRC Shapley Values by hand, we can follow the method demonstrated on the Start Here – The Shapley Value page.

The value function in the above table happens to be exactly the same as the value function in Table 1 on the Shapley Value Learning Page, so we can conclude that Austin Barnes has 0.50 SRC, Mookie Betts has 2.00 SRC, and Corey Seager has 0.50 SRC.