66 min read

Newlands, Cape Town, 25 January 2017. The third T20 international between South Africa and Sri Lanka. South Africa won the toss, batted, and made 169 for 5. AB de Villiers top-scored with 63 off 44 balls; a 15-ball 32 from Mosehle in the closing...

Chapter 9 — Batting Impact and Context: Measuring How Much a Batting Performance Actually Helped the Team Win

Two runs, two wickets

Newlands, Cape Town, 25 January 2017. The third T20 international between South Africa and Sri Lanka. South Africa won the toss, batted, and made 169 for 5. AB de Villiers top-scored with 63 off 44 balls; a 15-ball 32 from Mosehle in the closing overs pushed the total past par.

Sri Lanka's chase was in the hands of the wicketkeeper-opener Niroshan Dickwella. He batted into the sixteenth over. Upul Tharanga went early, caught off Wayne Parnell for 20 off 11, and Dinesh Chandimal was bowled by Imran Tahir in the sixth over, but Dickwella and Dhananjaya de Silva rebuilt. At the end of the fifteenth over Sri Lanka were 116 for 2. They needed 54 off 30 balls with eight wickets in hand.

Then Imran Tahir bowled the sixteenth over. Here it is, from the Cricsheet file:

 ball_in_over      bowler      batter  runs_batter  runs_extras wicket_kind  player_out  score  wkts
            1 Imran Tahir N Dickwella            0            0        None        None    116     2
            2 Imran Tahir N Dickwella            0            0      caught N Dickwella    116     3
            3 Imran Tahir DM de Silva            1            0        None        None    117     3
            4 Imran Tahir  S Prasanna            1            0        None        None    118     3
            5 Imran Tahir DM de Silva            0            0     stumped DM de Silva    118     4
            6 Imran Tahir  BKG Mendis            0            0        None        None    118     4

Two runs. Two wickets. Dickwella caught for 68 off 51; de Silva stumped for 19 off 27. Sri Lanka now needed 52 off 24 with two new batters at the crease.

What happened next is the reason this match is one of the book's anchors. Seekkuge Prasanna, who had come in at number five, took 19 off Parnell's next over. Kusal Mendis was run out in the eighteenth. Prasanna and Asela Gunaratne took 15 off the nineteenth and 11 off the twentieth, and Sri Lanka won by five wickets with one ball to spare. Prasanna finished 37 not out off 16 balls, Gunaratne 11 not out off 6.

The player of the match was Dickwella.

That is not a scandal; it is a perfectly normal choice. Dickwella made the most runs on either side. He batted the longest. His 68 was the spine of the chase. Most of us, scoring the match from the sofa, would have picked him too.

But try a thought experiment. Suppose Dickwella had been out first ball and someone else had scored his 68 in exactly the same way. Would Sri Lanka have been better or worse off at 116 for 2 after 15? Exactly the same. Now suppose Prasanna had been out first ball in over 16. Would Sri Lanka have won? Almost certainly not: 52 off 24 with five down is a losing position in most T20 chases. The two innings did different jobs. One built a position; the other converted a position that had just been ripped away. Runs measure the first job well. They are poor at measuring the second.

This chapter builds the tool that measures both: win probability. At every ball of a chase, we will estimate the chasing side's chance of winning from the match situation alone — runs needed, balls left, wickets in hand. Then we will credit each batter with the change in that probability on the balls they faced. Sixteen balls from Prasanna will turn out to be worth more than fifty-one from Dickwella; Imran Tahir's four overs for the losing side will turn out to be worth more than either. And we will find, across 1,201 IPL chases, that the batting average and the runs column routinely miss which innings actually won games.

The model we build here — WP v0 — is deliberately simple: a lookup table, counted from 8,939 real men's T20 chases, smoothed so that no single lucky night sets a value. It is good enough to teach the idea and to change how you read a scorecard. It is not the last word. Chapter 20 rebuilds it properly with logistic regression and gradient boosting; this chapter's code is written so that Chapter 20's model drops straight in.

🏏 Fan Track: The hook, §9.1–9.2, §9.5–9.6 and §9.8 carry the whole cricket argument. Every number from the code is restated in prose, so you can skip the code blocks entirely. The Eye-test dialogue in §9.6 is the heart of the chapter.

📊 Analyst Track: Everything. The construction of the table in §9.3 (counting, smoothing, shaping), the out-of-time calibration test in §9.4, and the attribution convention in §9.6 are the foundations Chapters 19, 20 and 27 build on.

🎰 Betting Track: §9.2–9.4 and §9.11. In-play markets are win-probability models with a margin added; the calibration and era-drift results in §9.4 are the most important thing in this chapter for you.


9.1 What the scorecard can't see

The cricket question: how much did a batting performance help the team win?

The traditional answer is the runs column. Let's look at the traditional view of the Newlands chase in full. The script code/01_anchor_a_story.py loads the match from the men's T20I file and prints the two batting cards, using the toolkit's batting_summary (runs off the bat; balls faced exclude wides) — the same canonical table you have used since Chapter 2:

Innings 2 batting (Sri Lanka)
               runs  balls  fours  sixes  outs  strike_rate
batter                                                     
N Dickwella      68     51     10      1     1       133.33
WU Tharanga      20     11      4      0     1       181.82
LD Chandimal      5      5      0      0     1       100.00
DM de Silva      19     27      0      0     1        70.37
S Prasanna       37     16      3      3     0       231.25
BKG Mendis        2      3      0      0     1        66.67
DAS Gunaratne    11      6      2      0     0       183.33

Look at what a traditional card tells you. Dickwella has the most runs and the most boundaries. Prasanna has the highest strike rate of anyone who faced more than six balls. De Silva's strike rate of 70.37 looks poor, but he was "rebuilding" — a word that a scorecard cannot check.

Now the chase over by over, with the state of the match at the end of each over:

Target 170. The chase, end of each over:
 over         bowler  runs  wickets  cum_runs  cum_wkts  need  balls_left   rrr
   13     WD Parnell     7        0       102         2    68          42  9.71
   14       JT Smuts    12        0       114         2    56          36  9.33
   15 AL Phehlukwayo     2        0       116         2    54          30 10.80
   16    Imran Tahir     2        2       118         4    52          24 13.00
   17     WD Parnell    19        0       137         4    33          18 11.00
   18     D Paterson     7        1       144         5    26          12 13.00
   19 AL Phehlukwayo    15        0       159         5    11           6 11.00
   20     D Paterson    11        0       170         5     0           1  0.00

(The full table, from over 1, is in the script output.) This is the information a broadcast graphic usually adds: the required run rate (RRR), runs needed per over from here. It is a big step up from the batting card, because it puts each over in the context of what was needed. But it is still not an answer to our question. The required rate after over 15 was 10.80; after over 17 it was 11.00. Did over 17 make things worse? Obviously not — Sri Lanka had scored 19 runs in it. The RRR went up after over 15 because only 2 came off over 15, and stayed high after over 17 because the hole dug by over 16 was so deep. The required rate tells you the size of the task. It does not tell you the chance of completing it, because it ignores the one thing that matters most in the last five overs of a chase: how many wickets you have left to throw at it.

Worm chart of both innings at Newlands, 25 January 2017, with Sri Lanka's chase annotated at 116/2 after 15 overs and the double-wicket sixteenth over

📊 Figure (described): A worm chart — cumulative runs against overs — for both innings: South Africa (blue) finish on 169/5; Sri Lanka (orange) track just above them for most of the chase, flatten visibly in overs 15–16 (two annotated wickets in over 16), then climb steeply in overs 17–20 to pass the dashed target line of 170 on the penultimate ball. The worm shows when runs came; it cannot show how much each run mattered.

The worm is the Chapter 7 chart for a chase (Chapter 7), and it is useful: you can see Sri Lanka keeping pace with South Africa's innings almost exactly, then falling behind, then surging. What it cannot show is that a run in over 19 with five wickets down and 11 needed is worth far more than a run in over 3 with all ten wickets in hand and 146 needed.

The state of a T20 chase — the situation at any moment — is captured by three numbers:

  • runs needed (R): target minus the current score;
  • balls left (B): legal deliveries remaining, out of 120;
  • wickets in hand (W): ten minus the dismissals so far.

Every ball changes at least one of them. A dot ball reduces B by one. A single reduces R by one and B by one. A wicket reduces W by one and B by one. A wide reduces R by one and leaves B alone. If we knew, for every possible combination of (R, B, W), the chance that the chasing side goes on to win, we could put a number on every ball of every chase. That is what we will build.

🧩 Productive struggle: Before reading on, do two things with pen and paper. First, rank Sri Lanka's seven batters by how much they contributed to winning this match — no formula, just your judgement. Second, estimate Sri Lanka's chance of winning at three moments: (a) at the start of the chase, needing 170; (b) at 116/2 after 15 overs, needing 54 off 30; (c) at 118/4 after 16 overs, needing 52 off 24. Keep your answers. In §9.5 we will compare them with what 8,938 other men's T20 chases say.


9.2 The question every ball answers

Let's state the idea precisely.

📐 Definition — Win probability (WP): the probability that a given side goes on to win the match, estimated from the match situation before a delivery. In this chapter, for a T20 chase, the situation is the triple (runs needed, balls left, wickets in hand), and WP is the chasing side's probability unless stated otherwise. The fielding side's WP is 1 − WP. A tie counts half a win to each side.

📐 Definition — WP v0: the book's first win-probability model: an empirical lookup table for T20 second innings — the share of real men's T20 chases that went on to win from each (runs needed, balls left, wickets in hand) state — smoothed across neighbouring states and shaped so that it obeys the three rules below. A first-innings "par-score proxy" (§9.5) extends it to the side batting first.

Before building it, notice three rules that any sensible chase WP must obey, whatever data it comes from:

  1. More runs needed never helps. WP(R+1, B, W) ≤ WP(R, B, W).
  2. More balls left never hurts. WP(R, B+1, W) ≥ WP(R, B, W).
  3. More wickets in hand never hurts. WP(R, B, W+1) ≥ WP(R, B, W).

And three edges that are not estimates at all: if nothing is needed, WP = 1; if runs are still needed and there are no balls or no wickets left, WP = 0.

These rules sound trivial, and they are — for the truth. For an estimate built by counting real chases, they are not automatic at all. If 22 chases have been in the state "52 off 24, six wickets in hand" and 6 of them won, and 15 chases have been in "51 off 24, six in hand" and 3 won, then the raw counts say that needing one fewer run made you less likely to win. That is noise, not cricket, and §9.3 is mostly about getting rid of it.

🚪 Threshold concept: value = change in win probability. A batter's job is not to score runs; it is to help the side win, and runs are only one way to do it. If you can estimate the chance of winning before and after every ball, then the value of that ball is the change: ΔWP = WP(after) − WP(before). A four that takes a chase from 40% to 52% is worth 12 percentage points; a four that takes it from 99% to 99.5% is worth half a point; a dot ball at 116/2 that drops it from 65% to 61% costs four points, even though "nothing happened". Sum those changes over the balls a batter faced and you have Win Probability Added. Once you see value this way, you cannot unsee it: a run is not a run, a dot is not neutral, a wicket's cost depends on when it falls, and the batter who "scored most" is not necessarily the batter who "won it". It also means that a batter's value depends on the model that estimates WP — change the model and you change the credit. That is uncomfortable, and it is true.

This idea is not new to cricket's cousins. Baseball analysts have used win-expectancy tables and Win Probability Added for decades (Tom Tango, Mitchel Lichtman and Andrew Dolphin's The Book is the classic practitioner treatment), and every in-play betting market is, underneath, a win-probability estimate. What cricket adds is the extra dimension of wickets: in baseball an inning has three outs and you always get nine innings; in a T20 chase you have one innings, 120 balls and ten wickets, and the two resources trade against each other on every ball.

🔄 Check your understanding

  1. State the three shape rules for a chase WP in words.
  2. Why is a dot ball not "neutral" in a win-probability world?
  3. A batter faces two balls: the first is a six that moves WP from 0.30 to 0.42; the second is a wicket that moves it from 0.42 to 0.31. What is the batter's WPA over those two balls?

Answer

  1. Needing more runs never raises WP; having more balls left never lowers it; having more wickets in hand never lowers it.
  2. A dot ball uses up a ball (one of the two scarce resources) without reducing the runs needed, so B falls and R does not: WP goes down.
  3. +0.12 − 0.11 = +0.01. The six and the dismissal almost cancel out — which is exactly the kind of fact a runs column (6 runs) hides.

9.3 Building WP v0: count, smooth, shape

Counting

The cricket question: from this situation, how often do chasing sides win? The most honest first answer is to go and count.

The module crease.impact (written this chapter) has a loader that takes every 20-over men's T20 match in the snapshot — men's T20 internationals plus the IPL and ten other men's T20 competitions — and keeps only matches that were decided by a result with no Duckworth–Lewis–Stern revision and no shortened chase (rain-affected chases change the meaning of "balls left"; Chapter 23 deals with them). Then innings_states turns every second-innings delivery into one row describing the situation before that ball was bowled:

from crease import impact

balls, games = impact.load_t20(impact.MEN_T20)          # 20-over, result-decided, no DLS
s2 = impact.innings_states(balls, games, innings=2)     # one row per chase delivery

# inside innings_states, per match (cumulative sums, minus the current ball):
#   score_before = cumsum(runs_total) - runs_total
#   legal_before = cumsum(is_legal) - is_legal
#   wkts_before  = cumsum(dismissal) - dismissal      (retired hurt / not out excluded)
#   balls_left   = 120 - legal_before ;  wkts_in_hand = 10 - wkts_before
#   runs_needed  = target - score_before ;  bat_won = 1, 0 or 0.5 (tie)

The output (full script: code/02_wp_table.py):

Training pool: 8,939 men's T20 chases, 999,986 pre-ball states
Chases by competition:
competition
t20s_male    3332
ntb          1415
ipl          1201
sma           686
bbl           611
bpl           466
cpl           403
psl           343
ilt           132
lpl           130
sat           118
mlc           102

Chasing side won 52.4% (ties count half)

Distinct (runs needed, balls left, wickets in hand) states seen: 113,474
States seen exactly once: 28,541 (25.2%)
Median states per occupied cell: 4

Almost a million situations — and yet the table is thin. There are 113,474 distinct states, a quarter of them seen exactly once, and the typical occupied cell has been visited four times. Four chases is not a probability; it is an anecdote. And this is the pooled men's game across twelve competitions and two decades. If you restricted yourself to one league in one era, the cells would be thinner still.

Notice one subtlety. A chase passes through each (R, B, W) cell at most once (except when a wide changes R without changing B), so the number of states in a cell is, near enough, the number of chases that visited it. A million rows is not a million independent observations: it is 8,939 matches, each contributing a correlated path of about 110 states. That matters for the evaluation in §9.4 and is the reason Chapter 20 evaluates at the match level as well as the ball level.

Smoothing

Here is the raw table against the smoothed one at a handful of real situations:

Raw cell vs smoothed WP v0 at some real situations
 runs_needed  balls_left  wkts_in_hand  raw_n  raw_wp  wp_v0  backstop
          54          30             8     14   0.643  0.652     0.643
          52          24             6     22   0.295  0.248     0.226
          33          18             6     24   0.688  0.565     0.533
          11           6             5     23   0.717  0.622     0.582
         170         120            10    100   0.430  0.432     0.444
          40          30             7     34   0.868  0.840     0.837
          60          30             7     26   0.346  0.380     0.365
          20          12             3     17   0.294  0.374     0.403
         100          60             8     29   0.207  0.413     0.430
          13           6             2     15   0.133  0.192     0.137

Need 95-105 off 57-63 balls, 8 wickets in hand: 2,098 states from 576 chases, won 0.400

Look at the row for 100 needed off 60 balls with eight wickets in hand — a very ordinary halfway position in a chase of about 170. The raw cell has been visited 29 times and the chasing side won 20.7% of them. Is that the truth? Widen the window a little: chases that needed 95 to 105 off 57 to 63 balls with eight wickets in hand. There are 2,098 such states from 576 different chases, and the chasing side won 40.0%. The 29-chase cell was simply unlucky. WP v0 says 0.413.

This is the small-sample problem of Chapter 6 in a new costume. A cell with 29 observations has a standard error of about √(0.4 × 0.6 / 29) ≈ 0.09 — a 95% interval nine points either side of whatever you observe. So we do what Chapter 6 taught: borrow strength from neighbours and shrink toward a sensible prior. WP v0 does it in two layers.

Kernel smoothing. Neighbouring states are almost the same cricket situation. Needing 100 off 60 and needing 101 off 61 are, to the batters in the middle, indistinguishable. So instead of the raw ratio wins ÷ chases in one cell, we compute a weighted ratio over nearby cells — weights falling away like a bell curve (a Gaussian kernel) with a standard deviation of two runs and two balls. We do this by blurring two grids — the grid of chase counts and the grid of wins — and dividing one by the other. The wickets dimension is not blurred: losing a wicket is a discrete event with a large effect, and blending "8 in hand" with "7 in hand" would wash out exactly the thing we want to measure.

A backstop prior. Kernel smoothing helps where there are neighbours. Where there are none — needing 170 off 60 with ten wickets in hand (a side that has scored nothing for ten overs) — even a blurred cell is empty. For those, we need a sensible default. WP v0 uses a backstop: a small logistic regression on three things — required runs per ball, wickets in hand, and the share of the innings left — plus their pairwise products. Every smoothed cell gets 20 pseudo-chases at the backstop's value added to its real ones:

# inside WPTable.fit (full code: project/crease/impact.py)
sig = (0.0, self.sigma_balls, self.sigma_runs)            # no blur across wickets
n_s = gaussian_filter(n, sig, mode="constant")            # blurred chase counts
w_s = gaussian_filter(wins, sig, mode="constant")         # blurred wins
wp  = (w_s + self.prior_strength * self.backstop) / (n_s + self.prior_strength)

Where a state has been visited hundreds of times, those 20 pseudo-chases barely move it. Where it has been visited twice, the backstop dominates. You have seen this formula before: it is the beta-binomial shrinkage of Chapter 6, with the league average replaced by a model-based prior that already knows that needing 15 an over is harder than needing 8.

🔍 Why this works: Smoothing and shrinkage trade a little bias for a lot less variance. The blurred estimate at "100 off 60" is slightly contaminated by "104 off 58" and "96 off 62", which are slightly different situations — a small bias. In return, it rests on hundreds of chases instead of 29 — a huge fall in variance. For a table whose cells mostly hold single-digit counts, that trade is overwhelmingly worth it. The backstop is a second, coarser trade: it is wrong in detail (a smooth logistic curve cannot know every quirk of T20 chasing) but right in shape, and it only speaks where the data are silent. Notice in the table above that WP v0 and the backstop are close almost everywhere the data are rich — "40 off 30 with 7 in hand" is 0.840 versus 0.837 — which tells you the backstop's shape is reasonable, and also that a simple logistic curve gets you most of the way. Chapter 20 takes that hint seriously.

Two panels showing raw chase win rates (grey dots, sized by count) against runs needed at 30 balls left with 8 wickets in hand and at 24 balls left with 6 wickets in hand; the smoothed WP v0 curve (blue) and backstop (orange dashed) run through the cloud

📊 Figure (described): For two fixed situations (30 balls left with 8 wickets in hand; 24 balls left with 6 in hand), grey dots show the raw win rate of every runs-needed cell, sized by how many chases visited it; the blue line is WP v0 and the dashed orange line the logistic backstop. The raw dots scatter wildly — 1.0 at 83 needed, 0.0 at 59 needed, 0.5 at 47 — while the smoothed curve falls cleanly from near 1 to near 0, crossing 50% at about 57 needed off 30 and about 41 needed off 24.

Shaping

Finally, the three rules. After smoothing, the table almost obeys them on its own:

Before shaping (violations larger than 0.01): 0.00% of neighbouring pairs broke 'more runs needed never helps', 0.00% broke 'more balls never hurts', 0.08% broke 'more wickets never hurts'
Shaping moved 9,328 of 427,251 grid cells by more than 0.05; 94.7% of those are '4 or fewer wickets in hand with 60+ balls left'
Weighted by how often each state actually occurred, shaping moved WP by 0.0004 on average

WP v0 enforces them anyway with running minimums and maximums along each axis (in WPTable._monotone): walking up the runs-needed axis, WP may never rise; walking up balls-left or wickets-in-hand, it may never fall. Weighted by how often states actually happen, shaping changes WP by four hundredths of a percentage point — nothing. The cells it does move are almost all states that real chases rarely or never visit: six or more wickets down with ten or more overs left. There, the backstop extrapolates badly, and the shape rules quietly overrule it by borrowing from the nearest sensible state. You can see the effect on the right-hand panel of Figure 9.3: with only four wickets in hand, the contours go flat beyond about 60 balls left. That is not a discovery about cricket; it is the table admitting it has no data there.

Two heat maps of WP v0 — runs needed (vertical) against balls left (horizontal) — for 8 wickets in hand and for 4 wickets in hand, with white contour lines at 0.10, 0.25, 0.50, 0.75 and 0.90

📊 Figure (described): Two heat maps of the chasing side's win probability (yellow = near 1, dark purple = near 0). With 8 wickets in hand (left), the 50% contour runs diagonally from about 25 needed off 15 balls to about 110 needed off 120 balls — roughly a required rate of 9–11 an over. With 4 wickets in hand (right), every contour sits much lower: the 50% line is near 40 needed off 30 and then flattens at about 60 needed, because chases that lose six wickets early are too rare to estimate further. The gap between the panels is the price of four wickets.

What the table says

Two outputs are worth memorising, because they are rules of thumb you can use while watching a match:

WP v0 (chasing side), 7 wickets in hand:
         12 balls  24 balls  36 balls  48 balls  60 balls
need 10      0.98      1.00      1.00      1.00      1.00
need 20      0.80      0.98      0.99      0.99      0.99
need 30      0.27      0.89      0.96      0.98      0.98
need 40      0.04      0.69      0.91      0.95      0.96
need 50      0.01      0.40      0.77      0.89      0.91
need 60      0.01      0.16      0.56      0.76      0.86
need 80      0.01      0.01      0.18      0.40      0.59

What one wicket is worth (need 50 off 36):
  10 wickets in hand: 0.930
   9 wickets in hand: 0.890
   8 wickets in hand: 0.826
   7 wickets in hand: 0.775
   6 wickets in hand: 0.654
   5 wickets in hand: 0.511
   4 wickets in hand: 0.429
   3 wickets in hand: 0.281
   2 wickets in hand: 0.196
   1 wickets in hand: 0.131

Read the first table along a row. Needing 40 with seven wickets in hand is 96% with ten overs left, 91% with six, 69% with four, and 4% with two. The collapse between 24 and 12 balls is brutal: a required rate of 10 an over with four overs left is a coin-flip-plus; a required rate of 20 an over with two left is gone.

Read the second table down the column. Needing 50 off 36 — a required rate of 8.33, very gettable — the chasing side is 93% to win with all ten wickets and 51% with five. The fifth wicket (from six in hand to five) costs 14 percentage points; the second (from nine to eight) costs 6. A wicket's cost is not a constant. It depends on how many are left, and — as the first table shows — on how many balls are left to use them. That is the T20 version of Chapter 4's "price of a wicket" (Chapter 4), now in the currency that matters: the chance of winning.

⚠️ Common pitfall: trusting the raw cell. It is tempting to quote "teams needing 100 off 60 with 8 in hand win only 21% of the time" because you counted it yourself and it is real data. It is real data; it is not a real probability. Twenty-nine chases is far too few, and the neighbouring 2,098 states say 40%. Any time you quote an empirical win rate for a specific situation, quote the sample size beside it, and ask what the neighbours say.

🔄 Check your understanding

  1. Why does WP v0 blur across runs needed and balls left but not across wickets in hand?
  2. What does the "backstop" do, and where does it matter most?
  3. The shaping step changed thousands of grid cells by more than 0.05, yet moved the average observed state by 0.0004. How can both be true?

Answer

  1. Neighbouring runs/balls states are nearly the same cricket situation, so averaging them adds little bias. A wicket is a discrete, large change; averaging across it would blur exactly the effect we want to measure.
  2. It supplies 20 pseudo-chases' worth of a logistic-curve estimate to every cell. It matters most where real chases are rare or absent — extreme states like needing 170 off 60 — and barely at all in well-visited states.
  3. The cells it moved are states that real chases almost never reach (many wickets down with many balls left). Weighting by how often states occur, those cells count for almost nothing.

9.4 Does it tell the truth?

The cricket question: when WP v0 says 30%, do chasing sides win about 30% of the time? A model that sounds precise but isn't is worse than no model, because people will act on it.

The test has to be honest. If we fit the table on all the chases and then check it against the same chases, we are partly checking it against its own memory. So code/03_calibration.py does an out-of-time test: fit WP v0 on every chase that started before 1 January 2023, then score every pre-ball state of every chase from 2023 to 2026 — 3,667 chases the table has never seen.

Two scoring rules measure the quality of probability forecasts:

📐 Definition — Brier score: the mean of (forecast − outcome)² over all forecasts, with outcome 1 for a win and 0 for a loss. 0 is perfect; always forecasting 0.5 scores 0.25.

📐 Definition — Log loss: the mean of −[y·log(p) + (1−y)·log(1−p)]. It punishes confident wrong forecasts much more harshly than the Brier score does. Always forecasting 0.5 scores 0.693.

And one picture, the calibration plot (or reliability diagram): group the forecasts into bins (0–10%, 10–20%, …), and plot the average forecast in each bin against the share of those states where the chase was actually won. A perfectly calibrated model lies on the diagonal. Chapter 20 makes calibration its threshold concept; here we just look.

Four forecasts are compared — the base rate (always say "the chasing side wins 52.4%"), a one-variable logistic curve on required runs per ball, the backstop alone, and WP v0:

Train: 5,272 chases (598,074 states) before 2023-01-01
Test:  3,667 chases (401,912 states) from 2023-01-01

Out-of-time scores, all test states (lower is better):
          forecast  brier  log_loss
         base rate 0.2483    0.6947
required rate only 0.1385    0.4302
     backstop only 0.1257    0.3927
       WP v0 table 0.1252    0.3903

By part of the chase (WP v0 vs required-rate-only Brier):
                states   wp_v0  rr_only
stage                                  
last 5 overs   72833.0  0.0717   0.0958
overs 11-15   103041.0  0.1021   0.1198
overs 6-10    110668.0  0.1336   0.1457
overs 1-5     115370.0  0.1716   0.1752

Three things to take from this.

The situation is most of the story. Knowing nothing but the base rate scores 0.2483 — barely better than a coin. Knowing just the required rate halves the error (0.1385). Adding wickets in hand and the stage of the innings takes it to 0.1252.

Wickets matter most at the end. In the first five overs, the required-rate-only model is nearly as good as WP v0 (0.1752 vs 0.1716): early in a chase the wickets column barely varies and the result is genuinely uncertain. In the last five overs, WP v0's error is a quarter smaller (0.0717 vs 0.0958). That is where "52 off 24 with six in hand" and "52 off 24 with nine in hand" become different matches.

The table barely beats its own backstop. 0.1252 against 0.1257. For a lookup table built from a million states, that is humbling — and informative. Most of the useful structure in T20 chase win probability is smooth and can be captured by a handful of terms. The table's extra value is in local detail. Chapter 20 will push the parametric route much further.

Now the calibration:

Calibration of WP v0 on 2023-2026 chases:
          bin  predicted  observed     n
(-0.001, 0.1]      0.031     0.042 98283
   (0.1, 0.2]      0.149     0.207 35928
   (0.2, 0.3]      0.251     0.309 31496
   (0.3, 0.4]      0.350     0.399 25996
   (0.4, 0.5]      0.448     0.492 25561
   (0.5, 0.6]      0.552     0.592 24475
   (0.6, 0.7]      0.652     0.670 25624
   (0.7, 0.8]      0.751     0.773 26589
   (0.8, 0.9]      0.853     0.865 32073
   (0.9, 1.0]      0.965     0.971 75887

Close, but with a lean. In every bin, chasing sides won more often than the table said — by 4 to 6 points in the middle of the range. A pre-2023 table systematically underrates 2023–2026 chasers. Split it by competition and the reason jumps out:

Mean forecast vs what happened, by competition (2023-2026 test states):
             chases  mean_forecast  observed    gap
competition                                        
t20s_male      1863          0.499     0.461 -0.038
ntb             470          0.415     0.487  0.072
ipl             281          0.374     0.508  0.134
bpl             171          0.493     0.557  0.064
bbl             150          0.517     0.620  0.103
psl             139          0.365     0.493  0.128
...
IPL 2023-2026 chases: Brier 0.1580; calibration in the 0.2-0.4 band: forecast 0.290, observed 0.531 (n=4,943)

In men's T20 internationals the old table is, if anything, slightly too generous to chasers. In the IPL from 2023 it is badly too pessimistic: the average forecast for IPL chasers was 37.4% and they actually won 50.8% of the states — a gap of 13.4 points. In the states where the table said 20–40%, IPL chasers won 53.1%. That is not a rounding error; it is a different game.

Left: calibration curves for WP v0 (fitted before 2023) on all men's T20 chases 2023–26 (blue circles, close to the diagonal) and IPL-only chases 2023–26 (orange squares, well above the diagonal). Right: histogram of WP v0 forecasts, piled up near 0 and near 1

📊 Figure (described): Left: the calibration curve for all men's T20 chases from 2023 (blue) sits just above the dashed diagonal — slightly underconfident about chasers. The curve for IPL chases only (orange) sits far above it: where the old table said 25%, IPL chasers won nearly half the time. Right: most forecasts are near 0 or near 1 (late in decided chases), with a flat spread in between.

You have met the reason in the reference tables: the IPL's average first-innings score rose to 183.0, 189.6, 190.9 and 195.7 in 2023–2026, with the Impact Player rule in force from 2023, and Chapter 8 found the IPL's par strike rate in the powerplay climbing from 137.0 to 159.1 over those four seasons (Chapter 8). A table that learned what "54 off 30" meant in 2015 does not know what it means in 2025. Batting sides can now score at rates that the old data treat as near-impossible.

⚠️ Common pitfall: one table for all eras and all leagues. A win-probability model is a summary of how chases used to go in the competitions it learned from. If scoring changes — a rule change like the Impact Player, smaller boundaries, flatter pitches, a new ball regulation — the model is wrong in a predictable direction until it is refitted. Always check the calibration on the most recent seasons of the competition you care about, and be ready to fit era- or league-specific tables. We do exactly that for the IPL in §9.8.

🔄 Check your understanding

  1. Why is fitting and testing on the same chases not a fair test of a WP model?
  2. WP v0's Brier score in the first five overs is 0.1716 and in the last five 0.0717. Does that mean the model is "better" late in a chase?
  3. In the IPL from 2023, chasers won 53.1% of the states where the pre-2023 table forecast 20–40%. Name two practical consequences for someone using that table.

Answer

  1. The table has partly memorised those chases' outcomes (especially in thin cells), so the test flatters it. Out-of-sample — here out-of-time — testing measures how it will do on matches it hasn't seen.
  2. Not exactly. Late in a chase the outcome is much more predictable for any model (many states are near-certain wins or losses), so all Brier scores fall. The fair comparison is between models on the same states — and there, WP v0's advantage over the required-rate-only model is biggest late.
  3. (a) It undervalues chasing batters' contributions in recent IPL matches (their side's starting WP is too low, so every successful chase looks like a bigger comeback than it was). (b) Anyone using it to price in-play bets would systematically underprice the chasing side.

9.5 Newlands, ball by ball

Now the payoff. code/04_anchor_a_wp.py fits WP v0 on every men's T20 chase in the snapshot except this one (a habit worth forming: never let a match vote on its own forecast — "leave one match out"), and walks through Newlands ball by ball.

The first innings: a par-score proxy

A chase has a target, so its state is easy to describe. The first innings has no target yet. What is South Africa's chance of winning at 79 for 1 after ten overs? It depends on what they go on to score and on how often that score is defended. WP v0 handles this with a two-step proxy.

📐 Definition — Par-score proxy (first innings): from the state (legal balls bowled, wickets lost), the empirical distribution of runs still to come in real first innings that passed through that state (smoothed across neighbouring balls). The expected total is the current score plus the mean of that distribution. The batting-first side's WP is the average, over that distribution of final totals T, of the chance that a total of T is defended — which is 1 − WP v0 at the start of a chase needing T + 1.

In code, the class ParTable stores those distributions and first_innings_wp does the averaging:

par = impact.ParTable().fit(s1)                       # s1: first-innings states
defend = 1 - wp.predict(T + 1, 120, 10)               # P(defend | total T), for every T
wp_bat1 = (par.remaining_dist(legal_before, wkts_before) * defend[score + k]).sum(axis=1)

Here is South Africa's innings through that lens:

South Africa's innings: par-score proxy and WP (batting first), end of selected overs
  after  1 overs:  10/0  expected total  165.4  WP(SA) 0.521
  after  5 overs:  36/1  expected total  161.7  WP(SA) 0.494
  after  6 overs:  48/1  expected total  168.2  WP(SA) 0.542
  after 10 overs:  79/1  expected total  175.7  WP(SA) 0.602
  after 13 overs: 107/1  expected total  181.9  WP(SA) 0.655
  after 15 overs: 119/3  expected total  171.7  WP(SA) 0.577
  after 18 overs: 141/5  expected total  162.9  WP(SA) 0.501
  after 19 overs: 148/5  expected total  160.2  WP(SA) 0.476
  after 20 overs: 169/5  expected total  169.0  WP(SA) 0.569
Start of match WP(SA batting first): 0.472
Innings break: SA 169/5 -> WP(SA) 0.569

South Africa's high point was 107 for 1 after 13 overs, on course for about 182 and 65.5% to win. Three wickets in five overs (de Villiers, Miller and Behardien among them) dragged the projection down to 160 by the end of the nineteenth, and South Africa were briefly underdogs in their own innings at 47.6%. Twenty-one runs in the last over, most of them from Mosehle, took the total to 169 and South Africa's chance to 56.9% at the break. The proxy is crude — it knows nothing about the pitch, the outfield or who was bowling — but it captures the shape everyone in the ground felt: a strong start, a stumble, a late kick.

The chase

At the start of the chase, needing 170, WP v0 gives Sri Lanka 0.431. Then, at the end of each over:

Sri Lanka's chase: WP (Sri Lanka) at the end of each over
  over  1:   9/0  WP 0.484
  over  2:  18/0  WP 0.552
  over  3:  24/0  WP 0.570
  over  4:  36/0  WP 0.653
  over  5:  45/1  WP 0.563
  over  6:  48/2  WP 0.410
  over  7:  55/2  WP 0.446
  over  8:  60/2  WP 0.439
  over  9:  73/2  WP 0.539
  over 10:  81/2  WP 0.576
  over 11:  85/2  WP 0.547
  over 12:  95/2  WP 0.625
  over 13: 102/2  WP 0.638
  over 14: 114/2  WP 0.755
  over 15: 116/2  WP 0.649
  over 16: 118/4  WP 0.246
  over 17: 137/4  WP 0.565
  over 18: 144/5  WP 0.332
  over 19: 159/5  WP 0.623
  over 20: 170/5  WP 1.000

Go back to your productive-struggle guesses. At 116 for 2 after 15, needing 54 off 30, WP v0 says 0.649 — about two chances in three. (As a cross-check, the reference tables in the book's data snapshot record that IPL chases from 2015 to 2026 needing 41–60 off the last 30 balls with two wickets down won 71.4% of the time, from 42 chases — the same neighbourhood, a slightly different pool.) After over 16, at 118 for 4 needing 52 off 24, it says 0.246. One over took Sri Lanka from strong favourites to one-in-four. Then the swing back: 0.565 after Parnell's 19-run over, 0.332 after Mendis's run-out in the eighteenth, 0.623 after 15 off the nineteenth, and the win.

Here is Imran Tahir's over, ball by ball:

Over 16, ball by ball (Sri Lanka WP before -> after):
  ball 1  N Dickwella  0                      0.649 -> 0.609
  ball 2  N Dickwella  caught N Dickwella     0.609 -> 0.450
  ball 3  DM de Silva  1                      0.450 -> 0.438
  ball 4  S Prasanna   1                      0.438 -> 0.426
  ball 5  DM de Silva  stumped DM de Silva    0.426 -> 0.282
  ball 6  BKG Mendis   0                      0.282 -> 0.246
Over 16 total: -0.403
Over 17 total: +0.319
Over 18 total: -0.233
Over 19 total: +0.291
Over 20 total: +0.377

Every ball of that over cost Sri Lanka something. The dot ball to Dickwella cost four points. His dismissal cost 16. Even the two singles cost a point each — at 13 an over required, a single is a loss. De Silva's stumping cost 14, and the final dot another 4. The over cost 40.3 points in total, the most of any over in the match.

Win probability curve for the whole match: Sri Lanka's WP drifting between 0.33 and 0.53 during South Africa's innings, rising to 0.755 after 14 overs of the chase, collapsing to 0.25 in over 16, then oscillating violently through overs 17–20 before reaching 1

📊 Figure (described): Sri Lanka's win probability across both innings (first innings left of the vertical line, chase to the right; shaded blue when South Africa are favourites, orange when Sri Lanka are). During South Africa's innings it drifts between about 0.33 and 0.53; through the chase it climbs to its peak of 0.755 after 14 overs, falls off a cliff in over 16 (to 0.246), and then whipsaws — up with the 19-run seventeenth over, down with Mendis's run-out, up and down again within the last two overs — before finishing at 1. The last five overs contain more movement than the previous 35.

The figure is the picture of the chapter. Thirty-five overs of a match moved Sri Lanka's chances within a band about 40 points wide. The last five overs moved it by 40 points in one over, then 32, 23, 29 and 38. That is why the last five overs of a T20 chase feel the way they do — and why Chapter 31 spends a whole chapter on who should bowl them.

What could have been shown on the night?

One more honest check. The table above learned from chases played after January 2017 too, including the high-scoring years. A broadcaster on the night could only have used chases up to that date. Refit on the 1,848 men's T20 chases before 25 January 2017, and compare:

Table fitted only on the 1,848 chases before 25 Jan 2017:
  start of chase           all-data 0.431   pre-2017 0.375
  after 15 overs (116/2)   all-data 0.649   pre-2017 0.628
  after 16 overs (118/4)   all-data 0.246   pre-2017 0.217
  after 17 overs (137/4)   all-data 0.565   pre-2017 0.511
  after 18 overs (144/5)   all-data 0.332   pre-2017 0.288
  after 19 overs (159/5)   all-data 0.623   pre-2017 0.586

The story is the same — the shape of the curve does not change — but every number is a few points lower. In the pre-2017 game, chasing 170 was harder (37.5% rather than 43.1%), and so was every state on the way. That is §9.4's era drift again, now in a single match: the "right" WP for a state depends on which games you believe it resembles.

🪞 Learning check-in. We are halfway. Before the attribution step, take stock. Compare your productive-struggle guesses with WP v0's 0.431, 0.649 and 0.246. Were you too optimistic at 116/2, or too pessimistic? Most people underestimate how much two wickets cost late in a chase — if you did, notice that your intuition was trained on the required rate, which ignores wickets. Now look at your ranking of the seven Sri Lankan batters. Hold on to it; the next section will either confirm it or argue with it, and it matters that you notice which. If the threshold concept still feels slippery — "the value of a ball is the change in WP" — reread the over-16 table and say aloud why a single cost a point. When that sentence sounds obvious, you have crossed the threshold.


9.6 Win Probability Added: who moved the needle?

The cricket question: who won the match for Sri Lanka? Now we can answer it with numbers.

📐 Definition — Win Probability Added (WPA): for one delivery, ΔWP = WP after the delivery − WP before it, from the batting side's point of view (WP after the last delivery of a match is the result: 1, 0 or 0.5). A batter's batting WPA is the sum of ΔWP over the deliveries credited to them; a bowler's bowling WPA is −ΣΔWP over every delivery they bowled. Positive is good for the player's own side.

Credit convention (WP v0): the striker gets the ΔWP of each delivery, except (a) a dismissal of the non-striker (almost always a run-out) is charged to the non-striker, and (b) a delivery whose only runs are extras — a wide, a bye, a leg-bye — with no wicket is credited to "extras", not to any batter. The bowler is charged every delivery, including wides and byes.

The convention matters, and you could argue every clause of it. Should the bowler be charged for the keeper's byes? Should a run-out be the fault of the batter who was out, or the one who called? Should the striker get the full credit for a single that keeps the better batter on strike? WP v0 makes simple choices and states them. Chapter 12 returns to how much credit belongs to the partnership rather than the person.

The code is short, because all the work is in the WP table:

m = impact.match_wp(balls, games, "936157", wp, par)     # both innings, wp_before / wp_after / dwp
bat  = impact.wpa_table(m, by="batter")
bowl = impact.wpa_table(m, by="bowler")

And here is the answer:

Batting WPA (each side's own win probability):
batting_team         batter  runs  balls  gained   lost    wpa
   Sri Lanka     S Prasanna  37.0   16.0   0.926 -0.421  0.504
   Sri Lanka  DAS Gunaratne  11.0    6.0   0.445 -0.067  0.377
   Sri Lanka    N Dickwella  68.0   51.0   0.605 -0.449  0.157
South Africa AB de Villiers  63.0   44.0   0.219 -0.138  0.081
   Sri Lanka         extras   0.0    0.0   0.100 -0.030  0.070
South Africa      M Mosehle  32.0   15.0   0.165 -0.097  0.068
South Africa   RR Hendricks  41.0   34.0   0.125 -0.087  0.038
   Sri Lanka    WU Tharanga  20.0   11.0   0.173 -0.155  0.018
South Africa         extras   0.0    0.0   0.016 -0.002  0.015
South Africa       JT Smuts  19.0   14.0   0.087 -0.083  0.005
South Africa     WD Parnell   3.0    3.0   0.000 -0.013 -0.013
South Africa    F Behardien   6.0    6.0   0.000 -0.039 -0.039
South Africa      DA Miller   1.0    4.0   0.000 -0.057 -0.057
   Sri Lanka   LD Chandimal   5.0    5.0   0.046 -0.164 -0.118
   Sri Lanka    DM de Silva  19.0   27.0   0.080 -0.284 -0.204
   Sri Lanka     BKG Mendis   2.0    3.0   0.000 -0.235 -0.235

Bowling WPA (positive = helped the fielding side):
  bowling_to          bowler  balls  runs    wpa
   Sri Lanka     Imran Tahir     24    18  0.525
South Africa  PADLR Sandakan     24    23  0.055
South Africa      S Prasanna     18    21  0.028
...
   Sri Lanka  AL Phehlukwayo     24    34 -0.255
   Sri Lanka      WD Parnell     24    42 -0.278
   Sri Lanka      D Paterson     23    39 -0.296

Check - WPA sums per side: {'South Africa': 0.097, 'Sri Lanka': 0.569}
Sri Lanka: start of chase 0.431 -> result 1.0

Read the check line first, because it is the reason WPA can be trusted as bookkeeping. Sri Lanka's batting WPA (including extras) sums to 0.569, which is exactly 1.0 − 0.431: the whole distance from where their chase started to where it finished. South Africa's sums to 0.097: the distance from their start-of-match 0.472 to their innings-break 0.569. WPA is a complete, additive accounting of how the match moved. Nothing is double-counted and nothing is lost.

Now the people.

  • Prasanna: +0.504 from 16 balls. He gained 0.926 — almost a whole match's worth — and gave back 0.421 on the balls that did not reach the boundary — at 11 to 13 an over required, dots and even singles cost probability. His six off the third ball of the nineteenth over was the single biggest swing of the match (+24.8 points); his six off the last ball of the seventeenth was worth +19.3.
  • Gunaratne: +0.377 from 6 balls. Two fours in the last over (+17.5 and +22.7 points). Eleven runs, three-eighths of a match.
  • Dickwella: +0.157 from 51 balls. He gained 0.605 over a long innings — more than any Sri Lankan except Prasanna — but lost 0.449: some to the dot balls of a chase whose required rate was rising, and 0.159 to his own dismissal at the start of over 16.
  • De Silva: −0.204. Nineteen off 27 in a chase that needed nearly nine an over, then stumped in the over that turned the match.
  • Mendis: −0.235 from 3 balls. Two runs, then run out in over 18 while Prasanna was on strike — a non-striker dismissal, which under our convention is charged to Mendis (−17.0 points).
  • Imran Tahir: +0.525 — for the losing side, from four overs for 18 runs and three wickets. By this accounting he was the most valuable player on the field.

The traditional and win-probability views agree on almost nothing beyond "Sri Lanka's chase was won late". Dickwella, the top scorer and player of the match, ranks third among his own side's batters; Prasanna's 37 is worth more than three times his 68; and the best performance of the night belongs to a bowler who lost.

Two horizontal bar charts: batting WPA (Prasanna 0.50, Gunaratne 0.38, Dickwella 0.16 at the top; Mendis −0.24, de Silva −0.20, Chandimal −0.12 at the bottom) and bowling WPA (Imran Tahir 0.53 far ahead; Paterson, Parnell and Phehlukwayo all below −0.25)

📊 Figure (described): Left: batting WPA for every batter in the match (Sri Lanka solid, South Africa hatched). Prasanna and Gunaratne dominate; Dickwella is a distant third; de Silva and Mendis are the largest negatives. Right: bowling WPA. Imran Tahir (+0.525) stands alone; South Africa's three death bowlers — Paterson, Parnell and Phehlukwayo — each cost their side between 0.25 and 0.30.

The Eye test

Wendell Baptiste has watched the highlights on his phone, twice.

🏏 Eye test:

Wendell: So your table says Dickwella was worth a third of Prasanna. Rubbish. Without Dickwella there is no 116 for 2. Prasanna walks in at 116 for 2 because of Dickwella.

Narrator: Yes — and the table agrees, in a way. Every run Dickwella scored on the way to 116 for 2 was credited to him at the time. The position Prasanna inherited is already counted in Dickwella's 0.605 of gains. What the table refuses to do is credit Dickwella twice — once for building the position and again for Prasanna using it.

Wendell: And the dismissal? He got a good ball from Tahir and holed out. You're charging him sixteen points for one ball.

Narrator: Sixteen points is what losing a set batter with 52 needed off 25 costs a chasing side, on average. The table doesn't know whether it was a good ball or a bad shot. You do. That's your half of the job.

Nusrat: What about de Silva? Nineteen off 27 looks terrible, but he was batting with Dickwella in a rebuild. Isn't that his role?

Wendell: That's the one I'd defend. He was told to give Dickwella the strike and not get out. He did the first. Didn't do the second.

Narrator: And the numbers say that role, executed at a strike rate of 70 in a chase needing nine an over, cost Sri Lanka 0.20 of a match. Maybe the plan was right and the execution was poor; maybe the plan was wrong. WPA can't tell you which. It can tell you the plan, as executed, didn't help.

Wendell: One more thing your table doesn't know. The sixteenth was Tahir's fourth over — 4 for 18, three wickets, finished. After that South Africa had Parnell, Paterson and Phehlukwayo for the last four overs, and they went for 52. Your table had Sri Lanka at 25% after sixteen as if an average attack was bowling the rest. With the spinner bowled out and Prasanna swinging at seamers, I'd have said more.

Wendell has put his finger on the biggest single limitation of WP v0. The table knows the score, the balls and the wickets. It does not know who is still to bowl or who is still to bat. When a side has used up its best bowler, the true WP for the chasers is higher than the table says; when the batters at the crease are tailenders, it is lower. Chapter 20 adds some of that context. Chapter 27 does it live.

📋 Try it — Analyze this match: Using the end-of-over WP numbers in §9.5, compute the WPA of over 19 (Phehlukwayo's over) and over 20 (Paterson's). Then explain, in one sentence each, why Gunaratne's 11 off 6 is worth more than Tharanga's 20 off 11.

Worked answer

Over 19: from 0.332 to 0.623, +0.291 for Sri Lanka. Over 20: from 0.623 to 1.000, +0.377. (These match the script's over totals.) Tharanga scored his 20 in the first five overs, when Sri Lanka's WP was near 50% and ten balls' worth of good batting moves it only a little; he then got out, giving most of it back (+0.173 gained, −0.155 lost). Gunaratne scored 11 in the last over, needing 11 off 6, when every boundary moved WP by around 20 points and the match ended before he could give anything back.

⚠️ Common pitfall: reading WPA as skill. WPA is a measure of what happened — how much a performance moved the match — not of how good the player is. It depends heavily on opportunity: a batter who walks in at 52 off 24 has huge leverage; one who opens a chase of 120 has little. Over one match, WPA is a story. Over a career, it is still mostly a story about roles and situations, unless you adjust for leverage. Use it to answer "what mattered in this game?", and be very careful using it to answer "who is better?".

🔄 Check your understanding

  1. Sri Lanka's batting WPA (with extras) sums to 0.569. Why exactly that number?
  2. Under the v0 convention, who is charged for a wide? For Mendis's run-out?
  3. Give one reason Dickwella's WPA (+0.157) understates his contribution and one reason it might overstate it.

Answer

  1. It is 1.0 (the result) minus 0.431 (Sri Lanka's WP at the start of the chase). WPA is a complete accounting of the change.
  2. A wide with no wicket goes to "extras" on the batting side and is charged in full to the bowler. Mendis, as the dismissed non-striker, is charged for his run-out.
  3. Understates: the table judges every ball against an average attack, so it cannot see how good the bowling he survived was (Imran Tahir took 3 for 18 on the night), and it gives no extra credit for the calming value of a set opener to his partners. Overstates: some of his early gains came in low-leverage overs where any competent batting would have gained the same, and his slow middle phase let the asking rate creep up for the batters who followed.

9.7 Expected runs: what should a batter score here?

The cricket question: given the situation, how many runs should a batter have scored off the balls they faced? WPA tells us how much an innings moved the match. A complementary question strips out the luck of the result: was the batter scoring faster or slower than an average batter would have in the same situations?

You have seen the idea in Chapter 8's SR+ (runs relative to par in the same season and phase). Here we condition on more of the match situation.

📐 Definition — Expected runs (xR, simple version): for each ball a batter faced (wides excluded), the league's average runs off the bat on balls faced in the same situation — innings (first or second), over, wickets lost (0–1, 2–3, 4–5, 6+) and, in a chase, the required-rate band (under 6, 6–8, 8–10, 10–12, 12–15, 15+ an over) — summed over the innings. Situation cells with fewer than 200 balls fall back to the (innings, over, wickets lost) average.

📐 Definition — Runs above expected (RAE): runs off the bat − xR. Positive means the batter scored faster than the average batter would have in the same situations.

A note on names. This is a per-ball expected-runs figure for a batter. Chapter 19 builds the other, more famous Expected Runs: the runs a team can expect from the rest of its innings from a given state — cricket's version of baseball's run-expectancy table — and does it properly, as a Markov chain. The two are cousins; both say "how many runs does this situation usually produce?"; this chapter's version is the simple one.

For Newlands we use a situation table built from men's T20Is in 2015–2019 — the era around the match:

t20i = pd.concat([s1, s2])
t20i = t20i[(t20i["competition"] == "t20s_male") & t20i["year"].between(2015, 2019)]
xr = impact.expected_runs_table(t20i)
imp = impact.innings_impact(impact.add_expected_runs(chase_with_wp, xr))
Anchor A, Sri Lanka's chase (xR from men's T20Is 2015-2019):
       batter  runs  balls  strike_rate    xr    rae  intent   wpa
   S Prasanna    37     16       231.25 24.46  12.54  114.46  0.50
DAS Gunaratne    11      6       183.33  9.84   1.16  117.55  0.38
  N Dickwella    68     51       133.33 61.41   6.59   87.94  0.16
  WU Tharanga    20     11       181.82 14.17   5.83  127.37  0.02
 LD Chandimal     5      5      100.00  7.07  -2.07   70.85 -0.12
  DM de Silva    19     27       70.37 30.22 -11.22   45.55 -0.20
   BKG Mendis     2      3       66.67  4.11  -2.11   32.62 -0.24

An average T20I batter, facing Dickwella's 51 balls in Dickwella's situations, would have scored about 61. He scored 68: +6.6 runs above expected. Good, not extraordinary. Prasanna's 16 balls came in high-pressure death-over situations where the average batter scores about 24; he scored 37, +12.5 — the best on the field by this measure, from a third of the balls. De Silva's 27 balls "should" have produced about 30 runs; he made 19, −11.2.

RAE and WPA usually agree in sign but not in size. Dickwella's RAE (+6.6) is half Prasanna's but his WPA is less than a third: RAE does not care when the runs came or whether the batter then got out; WPA cares about both. RAE is a better guide to how well someone batted. WPA is a better guide to how much it mattered.

⚠️ Common pitfall: comparing xR across eras without re-fitting. An xR table built on 2015–2019 T20Is will say an IPL batter in 2026 is wildly above expected — because everyone in 2026 is, compared with 2017. Fit the situation table on the same competition and era as the innings you are judging (the module's extra_keys=("era",) option does this). Chapter 8 made the same point with SR+'s season-and-phase par.

🔄 Check your understanding

  1. What is the difference between this chapter's xR and Chapter 19's Expected Runs?
  2. Prasanna's RAE was +12.5 and Dickwella's +6.6, yet Prasanna's WPA was more than three times Dickwella's. Name the two things WPA "cares about" that RAE does not.

Answer

  1. xR here is per batter: the runs an average batter would have scored off the specific balls this batter faced, in the same situations. Chapter 19's Expected Runs is per team state: the runs a side can expect from the rest of its innings.
  2. When the runs came (leverage — the same run is worth far more at 52 off 24 than at 146 off 102) and dismissal (Dickwella's wicket cost 0.159; Prasanna was not out).

9.8 Intent: keeping pace with the asking rate

The cricket question: was the batter scoring fast enough for what the chase needed? Commentators call this "intent". It is usually an eye-test word — a batter "showing intent" by attacking early. We can give it a precise, chase-specific meaning.

📐 Definition — Intent ratio (chases): 100 × runs off the bat ÷ the runs the required rate asked for on the balls the batter faced. For each ball faced, "asked" = runs needed ÷ balls left at the start of that ball; sum over the innings. 100 means the batter scored exactly at the asking rate; above 100, ahead of it; below 100, the chase was getting harder while they batted.

It is a deliberately narrow metric. It ignores wickets, so a batter who keeps pace while partners fall around them scores the same as one batting serenely. It is undefined in the first innings, where there is no asking rate. But it measures something the strike rate cannot: 133 is a fine strike rate when the asking rate is 7 an over and an inadequate one when it is 12.

At Newlands, Dickwella's intent ratio was 87.94: a strike rate of 133.33 against an average asking rate of about 1.5 runs a ball (9 an over) — so while he batted, the asking rate slowly climbed. De Silva's was 45.55: he scored at less than half the rate the chase required. Prasanna's was 114.46.

Now let's scale up. code/05_expected_runs_intent.py computes xR, RAE, intent and WPA for every batter-innings in every IPL chase from 2008 to 2026 — 8,994 batter-innings, of which 4,897 lasted ten balls or more. Because §9.4 showed that a single table misjudges the impact-player IPL, the WP is era-matched: chases before 2023 are judged by a table fitted on all men's T20 chases before 2023; chases from 2023 by a table fitted on IPL chases from 2023 to 2026. The difference is enormous:

IPL chases: 1,201 (281 from 2023)
Same state, two eras (chasing side WP):
  need 200 off 120, 10 wkts in hand: pre-2023 pool 0.168   IPL 2023-26 0.491
  need 170 off 120, 10 wkts in hand: pre-2023 pool 0.399   IPL 2023-26 0.739
  need  54 off  30,  8 wkts in hand: pre-2023 pool 0.628   IPL 2023-26 0.773
  need 100 off  60,  8 wkts in hand: pre-2023 pool 0.388   IPL 2023-26 0.632
  need  40 off  24,  6 wkts in hand: pre-2023 pool 0.573   IPL 2023-26 0.728
  need  20 off  12,  5 wkts in hand: pre-2023 pool 0.600   IPL 2023-26 0.754

Chasing 200 used to be a one-in-six shot; in the IPL of 2023–2026 it is a coin flip. Chasing 170 used to be slightly worse than even; now it is three-to-one on. The IPL-only table is fitted on just 281 chases, so it leans heavily on its smoothing and backstop, and it is in-sample — treat its third decimal place with suspicion — but the direction and size of the shift are unmistakable and match §9.4's out-of-time test.

Do the metrics agree with WPA?

Correlation with WPA (innings of 10+ balls):
runs           0.661
strike_rate    0.528
rae            0.611
intent         0.345
wpa            1.000
Spearman with WPA: {'runs': 0.715, 'strike_rate': 0.598, 'rae': 0.621, 'intent': 0.689, 'wpa': 1.0}

Runs correlate with WPA at 0.66 — strongly, but far from perfectly. Strike rate alone, 0.53. Intent's ordinary (Pearson) correlation is the weakest, 0.35, but its rank (Spearman) correlation is 0.69, nearly the highest: intent is a very good guide to the direction of an innings' impact and a poor one to its size — because the ratio has no idea how many balls the batter faced or how close the chase was.

The intent bands make the direction visible:

Intent ratio bands (IPL chase innings of 10+ balls):
             innings  mean_runs  mean_wpa  share_positive  chase_won
intent_band                                                         
<70             1701     21.004    -0.067           0.088      0.176
70-85            804     32.057     0.004           0.422      0.410
85-100           712     37.782     0.098           0.705      0.584
100-115          556     42.077     0.163           0.878      0.754
115-130          346     42.832     0.171           0.890      0.825
130+             777     43.108     0.157           0.976      0.929

40+ runs at intent < 85: 411 innings, mean WPA +0.044, chase won 18.9%
40+ runs at intent >= 115: 535 innings, mean WPA +0.251, chase won 92.1%

Innings with an intent ratio under 70 — scoring at less than 70% of the asking rate — had negative WPA on average and positive WPA only 8.8% of the time; the chase was won 17.6% of the time. Above 130, WPA was positive 97.6% of the time. And look at the "40+ runs" lines: 411 IPL chase innings of 40 or more runs were played below 85% of the asking rate; their sides won 18.9% of those chases, and the average innings was worth +0.044 — almost nothing. Forty-plus runs at 115% or more of the asking rate: won 92.1%, average WPA +0.251. Same runs, a different match.

Bar charts by intent band for IPL chase innings of 10+ balls: mean WPA is negative below 70, about zero at 70–85, and 0.10–0.17 above 85; the share of chases won rises steadily from 18% to 93%

📊 Figure (described): Left: average batting WPA per innings in each intent band — negative (−0.067) below 70, about zero at 70–85, then +0.10 to +0.17 from 85 upward. Right: the share of those chases that were won, rising from 18% in the lowest band to 93% in the highest. Scoring below the asking rate is, on average, a negative contribution even when it produces runs.

🔍 Why this works: Intent and WPA are connected by arithmetic, not just by correlation. While a batter scores below the asking rate, the required rate rises — and in Figure 9.3 you saw that WP falls steeply as the required rate rises, especially late. So a below-rate innings drains WP ball by ball even if no wicket falls, and a long below-rate innings drains a lot. The only way such an innings ends with positive WPA is if partners later win the chase from the position it left, and then most of the credit goes to them.

One caution before you go and judge every slow innings by this. An intent ratio below 100 early in a chase, with wickets in hand and a modest asking rate, can be perfectly sensible: a side chasing 140 does not need to score at 7 an over from ball one if it has ten wickets to spend later. The bands above average over all of that. Intent is most damning late in a chase, and most forgivable early.

"Eighty off fifty-five in a losing cause"

Here is the most famous objection to the runs column, put concretely. Which innings scored the most runs in lost IPL chases — and what were they worth?

Most runs in a LOST IPL chase, and what WP v0 says they were worth:
      date     batter     batting_team              opponent  runs  balls   rae  intent  wpa
2021-04-12  SV Samson Rajasthan Royals          Punjab Kings   119     63 31.51   88.66 0.41
2026-05-06 C Connolly     Punjab Kings   Sunrisers Hyderabad   107     59 27.47   43.66 0.00
2024-04-14  RG Sharma   Mumbai Indians   Chennai Super Kings   105     63  6.70   62.32 0.12
2010-03-13  YK Pathan Rajasthan Royals        Mumbai Indians   100     37 50.02  120.25 0.24
2018-05-08   KL Rahul  Kings XI Punjab      Rajasthan Royals    95     70 15.51   51.37 0.09
2025-05-04    R Parag Rajasthan Royals Kolkata Knight Riders    95     45 33.69  111.62 0.42
2011-04-23   SE Marsh  Kings XI Punjab      Delhi Daredevils    95     46 29.94   83.35 0.04
2017-04-17    M Vohra  Kings XI Punjab   Sunrisers Hyderabad    95     50 38.27  119.51 0.80

Three different kinds of losing hundred:

  • Sanju Samson, 119 off 63 (2021): +0.41 WPA. His side lost, but he took them from a long way behind to very nearly level — 119 runs, +31.5 above expected. A heroic losing innings, and the numbers say so.
  • Rohit Sharma, 105 off 63 (2024, Wankhede, v Chennai): +0.12. A hundred in a chase, a famous innings, but it never kept up with the asking rate (intent 62.32) and only +6.7 runs above expected in those situations. Mumbai's chase got harder while he batted.
  • Cooper Connolly, 107 off 59 (2026): WPA 0.00, with an intent ratio of 43.66. A brilliant innings in the sense of runs above expected (+27.5) — but it began in a chase that was already as good as lost, against a huge target. A century worth nothing to the result.

Meanwhile, at the other end:

Biggest WPA from innings of fewer than 30 runs (IPL chases):
      date          batter        batting_team              opponent  runs  balls   rae  intent  wpa
2008-04-24        SK Warne    Rajasthan Royals       Deccan Chargers    22      9  8.05  104.14 0.98
2023-05-07     Abdul Samad Sunrisers Hyderabad      Rajasthan Royals    17      7  5.39   75.32 0.94
2012-05-06        DR Smith      Mumbai Indians   Chennai Super Kings    24      9 10.65   93.43 0.94
2022-04-21        MS Dhoni Chennai Super Kings        Mumbai Indians    28     13  9.67   83.57 0.94
2012-05-13 Gurkeerat Singh     Kings XI Punjab       Deccan Chargers    29     12 11.71  112.78 0.92
2022-04-08       R Tewatia      Gujarat Titans          Punjab Kings    13      3  6.90   83.33 0.92
2024-04-10     Rashid Khan      Gujarat Titans      Rajasthan Royals    24     11  7.12   88.44 0.86
2011-05-22       AT Rayudu      Mumbai Indians Kolkata Knight Riders    17      6  5.86   90.52 0.85

Rahul Tewatia's 13 off 3 against Punjab Kings in 2022 was worth 0.92 of a match — more than twice Samson's 119. Shane Warne's 22 off 9 in the very first IPL season, 0.98. MS Dhoni's 28 off 13 against Mumbai in 2022, 0.94. These are the innings that finish chases from losing positions, and a runs column ranks them among the forgettable.

(An aside for the curious: several single innings in the full list exceed 1.0 — MS Dhoni's 67 off 37 against Sunrisers Hyderabad in 2013 is worth 1.31. A batter's WPA can exceed 1 because partners at the other end can lose probability that the batter then wins back. The team total is still bounded by 1 − the starting WP.)

Scatter of runs scored against batting WPA for 4,897 IPL chase innings of 10+ balls, coloured by whether the chase was won; WPA rises with runs on average but with enormous spread, and many 50+ innings in lost chases sit near zero

📊 Figure (described): Each dot is one IPL chase innings of ten or more balls (blue circles: chase won; orange squares: chase lost). WPA rises with runs on average, but the spread is huge: at 30 runs, WPA ranges from about −0.3 to +1.0; many innings of 60–100 in lost chases sit near zero; a few short innings in won chases are worth nearly a whole match. Of 987 innings of 50 or more in IPL chases, 86 (8.7%) had negative WPA.

📋 Try it — Settle this debate: "Samson's 119 off 63 was a greater innings than Tewatia's 13 off 3." Using the two tables above, argue for and against in two sentences each, and say which question each side is really answering.

Worked answer

For: Samson scored 31.5 runs above what an average batter would have in his situations, over 63 balls — sustained, high-quality batting — while Tewatia's 6.9 runs above expected came from three balls, which is mostly opportunity and nerve. Against: Tewatia's three balls moved his side from losing to winning (+0.92), and Samson's 63 moved his only part of the way (+0.41) before his side lost; if the job is to win the match, Tewatia did it and Samson didn't. The "for" side is answering how well did they bat? (RAE); the "against" side is answering how much did it matter? (WPA). Both are legitimate — and neither is answered by the runs column.

🔄 Check your understanding

  1. Define the intent ratio. Why is it undefined for a first-innings batter?
  2. Intent's Pearson correlation with WPA is 0.35 but its Spearman correlation is 0.69. What does that combination tell you?
  3. Connolly's 107 in 2026 had RAE +27.5 and WPA 0.00. Explain how both can be right.

Answer

  1. 100 × runs ÷ the runs the required rate asked for on the balls faced. In the first innings there is no target, so there is no required rate.
  2. Intent ranks innings by impact well (its direction is right) but does not track the size of the impact (a 10-ball and a 60-ball innings at the same ratio have very different WPA).
  3. RAE says he batted far better than an average batter in his situations; WPA says his side's chance of winning was near zero when he started and still zero when he finished. Great batting in a lost cause.

9.9 Careers, and the batting-average illusion revisited

The cricket question: over a career, who has added the most to IPL chases? Sum the era-matched WPA over every chase innings. code/06_career_chase_wpa.py does this for the 99 batters with 400 or more balls faced in IPL chases (and checks that no name in the list hides two people — none does):

Top 15 by total chase WPA:
                chase_innings  runs  balls  average  strike_rate  rae_per_100b    wpa  wpa_per_inns  wpa_per_100b
batter                                                                                                           
AB de Villiers             78  1974   1423    34.03       138.72        13.935  5.115         0.066         0.359
DA Miller                  71  1912   1327    47.80       144.08         8.766  4.967         0.070         0.374
V Kohli                   127  4262   3127    43.49       136.30         2.397  4.280         0.034         0.137
DA Warner                  96  3273   2305    38.96       142.00        15.799  4.149         0.043         0.180
KA Pollard                 72  1550   1025    29.81       151.22        16.005  3.793         0.053         0.370
JC Buttler                 72  2313   1489    39.20       155.34        16.732  3.623         0.050         0.243
MS Dhoni                   98  2307   1713    41.20       134.68        -5.097  3.566         0.036         0.208
...
Bottom 8 by total chase WPA:
               chase_innings  runs  balls  average  strike_rate  rae_per_100b    wpa  wpa_per_inns  wpa_per_100b
PA Patel                  65  1406   1151    24.24       122.15         2.691 -2.048        -0.032        -0.178
NV Ojha                   43   712    618    22.25       115.21       -10.094 -1.912        -0.044        -0.309
...
  V Kohli         chase runs  4262 (rank   1)  WPA +4.28 (rank   3)  avg 43.49 SR 136.30
  RG Sharma       chase runs  3425 (rank   2)  WPA +2.50 (rank  17)  avg 30.58 SR 129.93
  MS Dhoni        chase runs  2307 (rank  12)  WPA +3.57 (rank   7)  avg 41.20 SR 134.68
  AB de Villiers  chase runs  1974 (rank  21)  WPA +5.11 (rank   1)  avg 34.03 SR 138.72
  SV Samson       chase runs  2612 (rank   7)  WPA +0.63 (rank  45)  avg 30.02 SR 137.18

AB de Villiers has added 5.1 wins' worth of probability to IPL chases — the most of anyone — from only the 21st-most chase runs. David Miller, with 1,912 chase runs and a chase average of 47.80, is a close second at 4.97. Virat Kohli has scored more chase runs than anyone (4,262) and ranks third for WPA; Rohit Sharma is second for runs and seventeenth for WPA; Sanju Samson seventh for runs and forty-fifth for WPA. MS Dhoni's runs-above-expected is negative (−5.1 per 100 balls — he scored slower than an average batter in his situations), yet his WPA is seventh: his runs came at the moments that decided chases, and he was rarely out when it mattered. The finishers — de Villiers, Miller, Pollard, Dwayne Smith — dominate WPA per 100 balls, because finishing is where leverage lives.

Across the 99 batters, chase average correlates 0.65 with WPA per 100 balls, strike rate 0.52. In chases, not getting out is worth more than it looks — a dismissal is a big negative ΔWP, and the batter who is there at the end collects the final swing to 1.

Scatter of IPL chase strike rate against batting WPA per chase innings for 99 batters with 400+ chase balls, dot size proportional to balls faced, with the top and bottom batters labelled

📊 Figure (described): Each dot is an IPL batter with 400+ balls in chases (dot size = balls faced). Higher chase strike rates go with higher WPA per innings on average, but the spread is wide: Dwayne Smith, Miller and de Villiers sit at the top (+0.066 to +0.082 a chase innings); Kohli, Dhoni and Gill are clustered between +0.03 and +0.04; a group of slower batters — Naman Ojha, Deepak Hooda, Parthiv Patel, Yuvraj Singh — sit below zero.

Anchor C, chase edition

Chapter 4 introduced the batting-average illusion with Rohit Sharma's ODI record: an average of 58.46 in matches India won against 36.01 in matches they lost. The question was whether he "performs in wins" or whether India win because he scores — selection on the outcome. Does WPA solve it? Here are IPL chase averages in won and lost chases, next to mean WPA per innings:

Chase average in WON vs LOST chases, next to mean WPA per innings:
        batter chase  innings  runs  average  strike_rate  mean_wpa
     RG Sharma   won       70  2127    41.71       130.73     0.063
     RG Sharma  lost       61  1285    21.78       130.06    -0.028
       V Kohli   won       68  2766    65.86       142.65     0.078
       V Kohli  lost       58  1431    26.02       125.75    -0.018
      MS Dhoni   won       54  1271    55.26       134.78     0.109
      MS Dhoni  lost       44  1036    31.39       134.55    -0.053
AB de Villiers   won       37  1232    64.84       148.08     0.187
AB de Villiers  lost       40   703    18.50       125.76    -0.050
...

The illusion is even starker in IPL chases than in Rohit's ODIs: Kohli averages 65.86 in won chases and 26.02 in lost ones; de Villiers 64.84 and 18.50. And WPA shows the same split: positive in wins, negative in losses, for every batter.

🔍 Why this works (and why it doesn't solve everything): WPA is additive to the result: a side's total WPA in a chase is exactly the result minus the starting WP. So any batter's WPA will tend to be positive in wins and negative in losses — WPA is still tied to the outcome. What it changes is the question. The batting average in wins asks "how many runs did he score in matches his side won?" — and answers it with selection on the outcome baked in. WPA asks "how much did each ball he faced move his side's chances, given the situation at the time?" — so a hundred in a lost chase can still be worth +0.41 (Samson), and a fifty in a won chase can be worth very little if the chase was already safe. WPA does not tell you whether Rohit causes wins. It tells you, ball by ball, how much of each win (or loss) passed through his bat. For the causal question — would the side win more often with him than without him? — you need a model of what the replacement would have done, which is Chapter 13's runs-above-replacement and, ultimately, a simulation.

For a franchise, the practical reading is this: career chase WPA is a good description of who has delivered in chases, and a poor predictor on its own, because it is dominated by role (finishers collect leverage) and by a few huge innings. Before using it to value a player, divide it by opportunity (WPA per 100 balls, or per unit of leverage), shrink it towards the league average as Chapter 6 taught, and check it against the steadier skill measures of Chapter 8.

🔄 Check your understanding

  1. Dhoni's chase RAE is negative (−5.1 per 100 balls) but his chase WPA ranks seventh. Reconcile the two.
  2. Does WPA escape the selection-on-outcome problem of Anchor C? Answer in one sentence.

Answer

  1. He scored slightly slower than an average batter in his situations, but his runs came disproportionately in high-leverage moments late in chases, and he was rarely dismissed when it mattered — both of which WPA rewards and RAE ignores.
  2. No: WPA still sums to the result, so it is positive in wins and negative in losses — but it attributes the result ball by ball given the situation, so it can still credit a losing innings (Samson's 119) and discount a safe one.

9.10 Women's cricket: a different table for a different game

The cricket question: can we use the men's table for a women's chase? No — and the size of the error is instructive.

code/07_womens_wp.py fits WP v0 on 2,594 women's T20 chases — women's T20Is (2,035), the WBBL (471) and the WPL (88). The median target is 126 in the women's pool against 162 in the men's. The same state means something completely different:

Same state, two tables (chasing side WP):
  need 150 off 120, 10 wkts: men 0.608   women 0.276
  need  54 off  30,  8 wkts: men 0.652   women 0.256
  need  40 off  30,  7 wkts: men 0.840   women 0.564
  need  30 off  24,  6 wkts: men 0.854   women 0.612
  need  20 off  12,  5 wkts: men 0.621   women 0.270
  need  12 off   6,  4 wkts: men 0.424   women 0.125
  need  80 off  60,  6 wkts: men 0.423   women 0.167

Sri Lanka's position at Newlands after 15 overs — 54 off 30 with eight in hand — was 65% in men's T20; in women's T20 it would be 26%. Chasing 150 is a 61% proposition for men and 28% for women. None of this is a judgement on quality; it is the scoring environment (Chapter 8 found the median women's T20I strike rate at 92.18 against 124.68 in men's T20Is). A model has to be fitted to the game it describes.

Here is a women's chase through the right table: the Commonwealth Games group match between Australia and India at Edgbaston on 29 July 2022. India made 154 for 8 (Harmanpreet Kaur 52 off 34, Shafali Verma 48 off 33). Australia chased:

Australia's chase, end of each over (women's table):
  over  1:   7/1  WP 0.155
  over  3:  21/3  WP 0.069
  over  5:  38/4  WP 0.055
  over  8:  55/5  WP 0.039
  over 12:  91/5  WP 0.155
  over 15: 112/7  WP 0.092
  over 17: 134/7  WP 0.362
  over 18: 146/7  WP 0.781
  over 19: 157/7  WP 1.000
Lowest WP: 0.033 before ball 8.3 (over.ball, 1-based over), 49/5 needing 106 off 76
Same lowest state on the MEN'S table: 0.152

Batting WPA, Australia (women's table):
     batter  runs  balls  gained   lost    wpa
  A Gardner  52.0   35.0   1.000 -0.074  0.925
     A King  18.0   16.0   0.227 -0.127  0.101
  GM Harris  37.0   20.0   0.141 -0.128  0.013
...
   AJ Healy   0.0    2.0   0.000 -0.110 -0.110

(Selected overs shown; the script prints all of them.) On the third ball of the eighth over Australia were 49 for 5, needing 106 off 76: WP 3.3% on the women's table — and 15.2% on the men's, which would have badly overrated their chances. Ashleigh Gardner's 52 not out off 35 took them home with an over to spare, worth +0.925 — she gained a full 1.000 and lost only 0.074. Grace Harris struck 37 off 20, but her dismissal gave back almost all of what she gained: +0.013 net. Alana King's 18 not out off 16, batting with Gardner at the end, was worth +0.101. Renuka Singh's four overs for 18 were worth +0.243 to India — the only Indian bowler with positive WPA.

Left: Australia's win probability through the chase on the women's table (blue, below 0.25 until over 17) and the men's table (orange dashed, much higher throughout). Right: batting WPA with Gardner at +0.93 and Healy, Jonassen and Lanning negative

📊 Figure (described): Left: Australia's chase of 155 against India at Edgbaston, 2022. On the women's table (solid blue) Australia sit below 25% for the first 16 overs, bottoming out at 3.3% at 49/5, before Gardner's hitting lifts them to 78% after 18 overs and the win. The men's table (dashed orange) tells a different and wrong story — a near-even contest for much of the chase. Right: batting WPA — Gardner's +0.93 bar dwarfs everyone else's.

🔄 Check your understanding

  1. Why would the men's table have overrated Australia's chances at 49/5 needing 106 off 76?
  2. Grace Harris scored 37 off 20 but finished with WPA +0.013. What happened?

Answer

  1. It learned from a scoring environment where 106 off 76 (8.4 an over) is a routine rate; in women's T20 in this pool, the median target is 126 and that rate with five wickets down is rarely achieved.
  2. Her boundaries gained 0.141, but her dismissal (and dot balls) gave back 0.128: a fast cameo that ended before it could change the match's direction.

9.11 What WP v0 doesn't know — and the other formats

WP v0 is a good teacher and a limited model. Before you use it to settle an argument, know what it cannot see.

  • Who is playing. No team strength, no batters still to come, no bowlers' remaining overs. A chase by the best side in the league starts at the same 43% as a chase by the worst.
  • Where. No venue, no pitch, no dew, no boundary size. Chapter 22 measures how much those matter.
  • When. One table per era at best. §9.4 showed what happens when the game moves under a fixed table.
  • History within the innings. The table is memoryless: 52 off 24 is 52 off 24, whether the batters at the crease are set on 40 or just arrived. Set batters score faster; Chapter 19's Markov model makes the memorylessness explicit, and Chapter 20 starts to relax it.
  • Uncertainty. Every WP is a point estimate. A cell resting on a backstop deserves wider error bars than one resting on 400 chases. Chapter 20 adds intervals.

And the formats:

  • ODIs. The same idea works, with 300 balls instead of 120. The state space is two and a half times larger and there are far fewer ODI chases than T20 chases, so smoothing and the backstop would carry more of the load — and DLS-affected chases (common in ODIs) need the resource methods of Chapter 23. Rohit's ODI "average in wins" from Anchor C is exactly the kind of number an ODI WPA could interrogate; building that table is Exercise E1.
  • Tests. Win probability in a Test has three outcomes — win, draw, loss — and the state is far richer: runs, wickets, time remaining (overs left in the match, not the innings), which innings it is, the condition of the pitch. A two-outcome lookup table is the wrong tool. Chapter 29 and Chapter 33 build the Test machinery; the threshold concept — value is the change in the probability of the outcome you want — carries over unchanged.

🔷 R corner (not run in this book's build): the counting step of WP v0 in dplyr, assuming a data frame states with one row per chase delivery.

r library(dplyr) raw_table <- states %>% group_by(wkts_in_hand, balls_left, runs_needed) %>% summarise(n = n(), wins = sum(bat_won), raw_wp = wins / n, .groups = "drop")

Smoothing is the extra step; in R, a two-dimensional kernel smoother or a GAM (mgcv::gam) on the same columns plays the role of the Gaussian blur and backstop.


Spaced Review

Try each question before reading the answer.

  1. From Chapter 4: what was the "price of a wicket" there, and how does §9.3's "what one wicket is worth" table improve on it? Answer: Chapter 4 measured the price of a wicket in runs — how many fewer runs a side ends with for each extra wicket lost at a given point (about 6 at halfway in an IPL first innings). WP v0 measures it in the currency that matters, the chance of winning, and shows it is not constant: needing 50 off 36, the second wicket costs about 4 points and the fifth about 14.

  2. From Chapter 6: which idea from that chapter does WP v0's backstop implement? Answer: Shrinkage toward a prior. Each smoothed cell gets 20 pseudo-chases at the backstop's value, exactly as a beta-binomial estimate adds pseudo-counts at the prior mean; thin cells move a lot toward the prior, rich cells barely move. The 29-chase cell at "100 off 60, 8 in hand" (raw 0.207, neighbourhood 0.400, WP v0 0.413) is regression to the mean in action.

  3. From Chapter 8: SR+ adjusts a strike rate for season and phase. What does this chapter's runs above expected (RAE) adjust for that SR+ does not? Answer: The match situation within the phase — wickets lost and, in a chase, the required rate. SR+ compares a batter's death-overs scoring with the league's death-overs par for that season; RAE compares it with what an average batter scored in that over, with that many wickets down, at that asking rate.


Project Checkpoint: impact.py

Nusrat opens her laptop in Dhaka, re-runs the Chapter 8 checkpoint to make sure crease.batting still loads, and starts the new module. "Every batting number I've built so far," she says, "describes how someone bats. This one has to describe whether it mattered."

project/crease/impact.py is the Crease module for this chapter. Its public pieces:

Function / class What it does
load_t20(codes, since=None, until=None) deliveries and matches for 20-over, result-decided, non-DLS matches
innings_states(balls, games, innings=2) one row per delivery with the pre-ball state (runs needed, balls left, wickets in hand, result)
WPTable().fit(states) · .predict(R, B, W) WP v0: counted, smoothed (Gaussian kernel + logistic backstop) and shaped chase table
ParTable().fit(states1) · .expected_total(...) first-innings par-score proxy: distribution of runs still to come
first_innings_wp(states1, par, model) batting-first side's WP before each ball
chase_wp(states2, model) · chase_wp_grouped(states2, models, key) WP before/after each chase ball (optionally one model per era)
match_wp(balls, games, match_id, model, par) both innings of one match, ready for attribution
wpa_table(states, by="batter" or "bowler") Win Probability Added per player under the v0 credit convention
expected_runs_table(states, extra_keys=()) · add_expected_runs(...) situation-based xR per ball
innings_impact(states) per batter-innings: runs, balls, xR, RAE, intent ratio, WPA
calibration_table, brier, log_loss evaluation helpers

The design decision that matters most for later chapters: every function that uses a win-probability model takes it as an argument, and a model is anything with a predict(runs_needed, balls_left, wkts_in_hand) method. The checkpoint demonstrates it by swapping in a deliberately crude model:

class RequiredRateOnly:
    """A crude stand-in model: logistic in required runs per ball, ignoring wickets."""
    def predict(self, runs_needed, balls_left, wkts_in_hand):
        rpb = np.asarray(runs_needed, float) / np.maximum(np.asarray(balls_left, float), 1)
        p = 1 / (1 + np.exp(-(4.0 - 3.0 * rpb)))
        return np.where(np.asarray(runs_needed) <= 0, 1.0, p)

crude = impact.match_wp(balls, games, "936157", RequiredRateOnly(), par)

The output of code/project_checkpoint.py:

[1] states: 1,117,548 first-innings, 999,986 chase deliveries
[2] WP v0 at 54 needed off 30, 8 wickets in hand: 0.649
    par proxy: expected total from 79/1 after 10 overs = 175.7
[3] top three batting WPA, Anchor A:
batting_team        batter  runs  balls   wpa
   Sri Lanka    S Prasanna  37.0   16.0 0.504
   Sri Lanka DAS Gunaratne  11.0    6.0 0.377
   Sri Lanka   N Dickwella  68.0   51.0 0.157
...
[5] same match, crude swapped-in model (top three):
batting_team         batter   wpa
   Sri Lanka  DAS Gunaratne 0.902
South Africa AB de Villiers 0.059
   Sri Lanka     S Prasanna 0.045
Checkpoint complete: crease.impact works with any model exposing predict(R, B, W).

Look at line [5]. With a model that ignores wickets and thinks every last-over chase at 11 an over is hopeless, Prasanna's WPA collapses from 0.504 to 0.045 and Gunaratne's balloons to 0.902. Same balls, same runs, wildly different credit. That is the threshold concept's uncomfortable corollary in one printout: WPA is only as good as the WP model behind it. In Chapter 20, crease.winprob will provide WP v1 — a calibrated logistic and gradient-boosted model — and every function here will accept it unchanged. Chapter 27 uses the same interface for live forecasting, and Chapter 37's auto-generated match notes will quote the biggest WPA swings.

"So the module doesn't decide who won the match," Nusrat says. "It decides who won it according to a model, and lets me change the model."

That is exactly right.


Chapter Summary

Metric Definition Answers Watch out for
WP (chase) P(chasing side wins | runs needed, balls left, wickets in hand) How likely is the chase to succeed from here? Era drift; no team/venue/bowler context
WP v0 Empirical chase table, Gaussian-smoothed (σ = 2 runs, 2 balls), shrunk to a logistic backstop (20 pseudo-chases), shaped by three monotone rules A transparent first model Barely beats its own backstop out of time (Brier 0.1252 v 0.1257)
Par-score proxy Distribution of runs still to come from (balls bowled, wickets lost); WP = average chance that each final total is defended First-innings WP Crude; inherits all of the chase table's blind spots
ΔWP WP after − WP before a delivery The value of one ball Depends on the model
WPA Σ ΔWP credited to a player (v0 convention: striker; non-striker for non-striker dismissals; extras separate; bowler charged −ΔWP) How much did this performance move the match? Not skill: driven by role and leverage; tied to outcome
xR / RAE Σ league runs-off-bat per ball in the same situation (over, wickets band, required-rate band); RAE = runs − xR How well did the batter score for the situations faced? Fit on the same competition and era
Intent ratio 100 × runs ÷ runs the asking rate demanded on the balls faced Did the batter keep pace with the chase? Ignores wickets and innings length; forgiving early, damning late

Headline findings from the book's data snapshot:

  • At Newlands 2017, WP v0 (leave-one-match-out) gives Sri Lanka 0.431 at the start of the chase, 0.649 at 116/2 after 15 and 0.246 at 118/4 after 16; Imran Tahir's sixteenth over cost Sri Lanka 40.3 points. Batting WPA: Prasanna +0.504, Gunaratne +0.377, Dickwella +0.157, de Silva −0.204; bowling WPA: Imran Tahir +0.525.
  • Out of time (fit before 2023, test 2023–26), WP v0 is well calibrated for men's T20 overall but underrates IPL chasers by 13.4 points; in the 20–40% band, IPL chasers won 53.1%.
  • Chasing 200 in the IPL: 0.168 on the pre-2023 pool, 0.491 on the IPL 2023–26 table.
  • In IPL chases 2008–2026, runs correlate 0.66 with WPA; 411 innings of 40+ runs played below 85% of the asking rate came in chases won only 18.9% of the time.
  • Career IPL chase WPA leaders: de Villiers 5.12, Miller 4.97, Kohli 4.28 (most chase runs: Kohli 4,262).
  • Women's T20 needs its own table: 54 off 30 with eight in hand is 0.652 for men and 0.256 for women.

A decision framework:

  1. Describing one match? Use the WP curve and WPA — and state the model and the credit convention.
  2. Judging how well someone batted? Use RAE (and Chapter 8's SR+), not WPA.
  3. Judging a chase innings' tempo? Use the intent ratio, late in the chase especially.
  4. Comparing careers? Use WPA per 100 balls, adjusted for role, shrunk, and alongside skill metrics.
  5. Applying any WP table to a new league, era or gender? Check its calibration there first.

What's Next

Win probability made the T20 chase legible. Chapter 10 goes to the format where it is hardest to apply — Test cricket — where the scarce resource is time rather than balls, a draw is a result, and the batting metrics that matter are survival, conversion and conditions. We will meet survival analysis there, and win probability returns, rebuilt properly, in Chapter 20.