Seven times since the start of the 2023 IPL season, a side batting first has reached exactly 91 after ten overs. Here they all are, from the book's data snapshot (code/01_state_space.py), sorted by how many wickets had fallen:
In This Chapter
- Ninety-one for…
- 19.1 The match as a state space
- 19.2 An idea borrowed from baseball
- 19.3 Counting the table: count, smooth, shape
- 19.4 The innings as a Markov chain
- 19.5 One table per era — and the resources idea
- 19.6 Simulating innings: the chain as a dice-roller
- 19.7 What a wicket, a dot ball, a four and a six are worth
- 19.8 Expected Runs Added: crediting batters and bowlers
- 19.9 ODIs — and why Tests need a different lens
- 19.10 What the state space can't see
- Spaced Review
- Project Checkpoint: states.py
- Chapter Summary
- What's Next
Chapter 19 — Expected Runs and the State of the Game: Resource Tables, Markov Chains, and the Mathematics of an Innings
Ninety-one for…
Seven times since the start of the 2023 IPL season, a side batting first has reached exactly 91 after ten overs. Here they all are, from the book's data snapshot (code/01_state_space.py), sorted by how many wickets had fallen:
IPL 2023-26 first innings at exactly 91 after 10 overs
date batting_team bowling_team score_before wkts_before final_total final_wkts last10 top_scorer
2023-04-20 Royal Challengers Bangalore Punjab Kings 91 0 174 4 83 F du Plessis 84(56)
2023-05-26 Gujarat Titans Mumbai Indians 91 1 233 3 142 Shubman Gill 129(60)
2026-04-05 Royal Challengers Bengaluru Chennai Super Kings 91 1 250 3 159 TH David 70(25)
2026-05-01 Rajasthan Royals Delhi Capitals 91 2 225 6 134 R Parag 90(50)
2026-05-18 Chennai Super Kings Sunrisers Hyderabad 91 3 180 7 89 D Brevis 44(27)
2025-04-10 Royal Challengers Bengaluru Delhi Capitals 91 4 163 7 72 PD Salt 37(17)
2026-04-30 Royal Challengers Bengaluru Gujarat Titans 91 5 155 10 64 D Padikkal 40(24)
Same score. Same point in the innings. Final totals from 155 to 250 — a gap of 95 runs, which in the IPL is the gap between a total you defend most nights and one you lose with most nights. The scoreboard at the halfway mark said "91" seven times. It was telling seven different stories.
Two of them you can read off the wickets column. The Gujarat Titans were 91 for 1 in the second qualifier of 2023 and Shubman Gill went on to 129 off 60; Royal Challengers Bengaluru were 91 for 1 against Chennai in April 2026 and Tim David smashed 70 off 25 late on. Both sides added more than 140 in the last ten overs. Three weeks after that Chennai game, Bengaluru were 91 again — but 91 for 5 — and were bowled out for 155. They added 64.
Not every story fits the wickets column, and that matters too. The Bengaluru side of April 2023 were 91 for none — the best position of the seven — and finished on 174, adding only 83. The wickets column is a strong clue, not a verdict. Across all 281 complete IPL first innings from 2023 to 2026, here is what the last ten overs produced, sorted by wickets down at the halfway mark:
Runs in the last ten overs by wickets lost at 10 overs (IPL 2023-26):
size mean std
wkts_before
0 23 109.7 18.0
1 52 112.0 23.9
2 84 105.2 20.0
3 64 98.1 19.6
4 37 90.5 21.3
5+ 21 68.1 28.4
Two things leap out. First, the wickets column matters enormously: sides five or more down at halfway added, on average, 44 fewer runs in the second half than sides one down. Second, the spread inside each row is large — a standard deviation of about 20 runs — so the state of the game tells you where the innings is likely to go, never where it will go.
This chapter is about that idea: that a cricket scoreboard is not a score but a position. Runs on the board are history. What matters for everything that happens next — the batting side's plan, the bowling captain's choices, the win-probability graphic on the broadcast, a DLS target if it rains — is where the innings stands: how many legal balls are left and how many wickets are left. Those two numbers define the state of the innings, and the whole of limited-overs cricket is a walk through a grid of states.
We will build three tools on that grid. The first is a table: the Expected Runs still to come from every state, counted from 8,917 real men's T20 first innings and smoothed so that it obeys the rules every such table must obey. The second is a model of how the walk happens: a Markov chain, which treats each delivery as a random step from one state to the next with probabilities estimated from the data, and which lets us simulate innings by the thousand. The third is a currency: with the table in hand, every delivery has a run value — a four in the first over is worth a different amount from a four in the twentieth, a dot ball costs more at the death than in the powerplay, and a wicket can cost 14 runs or almost nothing — and those values add up to Expected Runs Added for every batter and bowler.
Along the way you will see why a table built for the IPL before 2023 is the wrong table for the IPL since, why the shape of the table barely changes even when the level does (the observation on which the Duckworth–Lewis method rests), and why none of this works for Test cricket without a rethink.
🏏 Fan Track: The hook, §19.1, §19.3 (skim the code), §19.5, §19.7 and §19.9 carry the cricket argument. Every number the code prints is restated in prose. The Eye-test dialogue in §19.6 is the place to argue back.
📊 Analyst Track: Everything, especially the construction of the table in §19.3 (count, smooth, shape), the Markov recursion in §19.4 and the calibration of simulated innings in §19.6. Chapters 20, 23, 27 and 30 all build on the module
states.py.🧑💼 Franchise Track: §19.5 (eras), §19.7 (what a wicket and a dot are worth in each phase) and §19.8 (Expected Runs Added leaderboards for IPL 2023–26). The run values are the exchange rate behind every "should he have taken that risk?" argument in a team meeting.
19.1 The match as a state space
The cricket question: what, exactly, does the scoreboard need to tell you about the future?
Start with what it shows. In a T20 first innings the broadcast graphic gives you the score, the wickets, the overs, the current run rate and perhaps a "projected score" at six, eight or ten an over. Of those, the projected score is the only one that tries to look forward, and it does so by ignoring the wickets column completely: 91 for 1 and 91 for 5 after ten overs both "project" to 182 at the current rate.
Strip the scoreboard down to the parts that constrain the future. The runs already scored can't be taken away and don't limit what comes next. What limits the future is resources: the legal balls still to be bowled and the batters still to come. That pair is the state.
📐 Definition — state of a limited-overs innings: before any delivery, the pair (u, w) where u = legal balls still to be bowled (120 at the start of a T20 innings, 300 in an ODI) and w = wickets in hand (10 minus dismissals, where dismissals exclude retired hurt and retired not out, as everywhere in this book). The innings ends when u = 0 or w = 0. A wide or no-ball does not change u; a dismissal on any delivery reduces w by one.
A T20 innings has 120 × 10 = 1,200 possible pre-ball states with an innings still alive. That sounds like a lot until you see how unevenly real innings use them. The script code/01_state_space.py loads every men's T20 first innings in the snapshot from twelve competitions — men's T20 internationals, the IPL, the Big Bash, the PSL, the CPL, SA20, ILT20, Major League Cricket, the BPL, the LPL, the Vitality Blast and the Syed Mushtaq Ali Trophy — keeping only matches that were scheduled for twenty overs, finished with a result and had no rain rule applied. It then marks, for every innings, every state it passed through:
Men's T20 pool: 9,117 first innings in full-length, result-decided matches; complete (all out or 120 balls) 8,917 (97.8%)
Possible pre-ball states (u = 1..120, w = 1..10): 1,200
States visited at least once: 1,059; at least 30 innings: 880; at least 300: 639
Pre-ball state observations: 1,059,247 (one per innings per state)
Wickets lost at the start of each over (10th / 50th / 90th percentile):
over_idx 1 4 7 10 13 16 19 20
10% 0.0 0.0 0.0 1.0 1.0 2.0 3.0 3.0
50% 0.0 1.0 2.0 2.0 3.0 4.0 5.0 6.0
90% 0.0 2.0 3.0 4.0 5.0 6.0 8.0 8.0
The "complete" filter matters, and we will lean on it throughout. An innings that was cut short for a reason other than running out of balls or wickets (an injured batter absent, a scheduling quirk) does not tell you how many runs a state "goes on to produce", so the 2.2% of innings that ended any other way are left out of every table in this chapter.
Of the 1,200 states, 141 were never visited at all — "four down before the first over is complete" happens, but not "seven down after two overs" — and only 639 were passed through by at least 300 innings. The typical innings hugs a narrow corridor: two down at the start of the seventh over, four down at the start of the sixteenth, six down by the start of the twentieth. Ninety per cent of innings are no more than eight down entering the last over.

📊 Figure (described): A heat map with the over about to be bowled (1–20) across the bottom and wickets lost (0–9) up the side; brighter cells are states that thousands of innings passed through, darker cells states visited only a handful of times, and the empty upper-left triangle is the region no real innings reached. Three IPL innings that were all 91 after ten overs are drawn as paths: Bengaluru (2023) and Gujarat (2023) stay along the bottom edge and finish on 174/4 and 233/3, while Bengaluru (2026) climbs steeply through the middle of the grid and is bowled out for 155. The figure is the chapter's mental model — an innings is a walk through this grid.
That picture is the threshold concept of this chapter.
🚪 Threshold concept: the match as a state space. Once you see an innings as a walk through a grid of states, three things change at once. First, value becomes local: a run, a dot ball or a wicket is worth whatever it does to the state, and the same event is worth different amounts in different states. Second, history becomes irrelevant to the future except through the state: two sides at the same (balls left, wickets left) face the same arithmetic, however they got there — which is a modelling assumption (the Markov property), not a fact, and a lot of this chapter is about where it breaks. Third, the whole game becomes computable: if you know how likely each outcome of the next ball is in each state, you can work out the expected runs, the distribution of final totals, the chance of reaching a target, the cost of a wicket and the value of every delivery — from one small set of numbers. Win probability (Chapter 20), rain rules (Chapter 23), live score projection (Chapter 27) and batting-order simulation (Chapter 30) are all walks on this grid. Before it clicks, cricket looks like a list of scores. After it clicks, every ball is a move.
🧩 Productive struggle: Before you see a single table, write down your best guesses for the average number of runs a men's T20 side still scores, batting first, from these four states: (a) the first ball of the match; (b) 2 down after 10 overs; (c) 5 down after 10 overs; (d) 2 down after 18 overs. Then answer a harder question: by how many runs does losing a third wicket at the start of over 11 reduce the expected remainder of the innings? And how much would losing a third wicket at the start of over 19 cost? Keep your numbers; §19.3 and §19.7 will test them.
19.2 An idea borrowed from baseball
Cricket analysts did not invent this. Baseball analysts have used a run-expectancy matrix for decades: the average number of runs a team goes on to score in the rest of an inning from each combination of outs (0, 1 or 2) and runners on base (eight arrangements of first, second and third). That is 24 states, and the matrix is small enough to print on an index card. Tom Tango, Mitchel Lichtman and Andrew Dolphin's The Book: Playing the Percentages in Baseball built a whole strategic toolkit on it: the value of a stolen base, a sacrifice bunt or an intentional walk is just the change in run expectancy the play causes, averaged over the situations in which it happens.
The analogy to cricket is close but not exact, and the differences teach you something:
- Baseball's inning has no clock. It ends after three outs, however long that takes. A T20 innings ends after 120 legal balls or ten wickets, whichever comes first. So cricket's state needs both a clock (balls) and a resource that runs out (wickets). That second dimension — time — is what makes cricket's grid 1,200 states instead of 24, and what makes the table harder to estimate.
- Baseball's base state is an arrangement of runners; cricket's wickets are a count. In cricket the "runners" are not on base — the batters' identities and quality matter, but the state as we define it ignores them. We will come back to this (§19.10); it is the biggest simplification in the chapter.
- In baseball both teams get the same number of outs; in limited-overs cricket the second innings has a target. A chasing side does not maximise runs; it maximises the chance of reaching a number. So the expected-runs table is properly a first-innings object. In a chase, the right currency is win probability, which Chapter 9 introduced and Chapter 20 rebuilds — and which, for the first innings, is computed from the kind of runs-to-come table we build here.
The mathematics carries over cleanly, though. Define the expected runs still to come from each state; then the value of any event is the runs it produced plus the change in expected runs it caused. That one line of algebra is the backbone of the chapter.
🔄 Check your understanding
- Why is "91 after 10 overs" not a state, while "60 balls left, 9 wickets in hand" is?
- Give one reason the Markov property ("only the current state matters for the future") is false in real cricket, and one reason it is still a useful assumption.
- Why is an expected-runs table more natural for a first innings than for a chase?
Answer
- The score is history; it does not limit the future. The state is the pair of remaining resources — balls and wickets — that does. (The score matters in a chase, where it sets the runs still needed, which is why chase states in Chapter 9 included runs needed.)
- False because the identity of the batters at the crease and still to come, the pitch, the bowlers with overs left and the match situation all carry information that (balls, wickets) does not. Useful because those two numbers capture most of the predictable structure, they are always available from ball-by-ball data, and they make the whole innings computable from a small table.
- A side batting first is (roughly) trying to maximise its total, so "runs still to come" is the quantity it cares about. A chasing side is trying to reach a target; it will slow down when comfortable and take wild risks when behind, so its runs-to-come are shaped by the target, and an innings that wins stops early — the data are truncated by the chase itself.
19.3 Counting the table: count, smooth, shape
The cricket question: from each state, how many runs does a men's T20 side batting first go on to add, on average?
The simplest possible answer is to count. For every complete first innings, at every state it passes through, record the runs it went on to add — its final total minus its score at that moment. Average those numbers within each state. That is the raw Expected Runs table.
📐 Definition — Expected Runs (ER): ER(u, w) = the average runs a side batting first goes on to add, from the moment it has u legal balls and w wickets left, in complete innings of the competition and period the table is fitted on. Runs include extras, because the scoreboard does. Par = ER(120, 10) for T20 (ER(300, 10) for an ODI): the expected total from the first ball. A side's projected total at any moment = runs scored so far + ER(state).
Two practical details shape the counting. Each innings contributes one observation per state — the first delivery it bowled in that state — because wides and no-balls repeat a state and would otherwise double-count it. And only complete innings count, for the reason given in §19.1.
The counting step lives in ERTable.fit in the module project/crease/states.py. Its heart is two np.add.at calls that fill an 11 × 121 grid (wickets left × balls left) with counts and sums:
s = states[states["complete"] & states["first_in_state"] & (states["balls_left"] >= 1)
& (states["wkts_left"] >= 1)]
w = s["wkts_left"].to_numpy().astype(int)
u = s["balls_left"].to_numpy().astype(int)
y = s["runs_to_come"].to_numpy().astype(float)
n = np.zeros((11, N + 1)); tot = np.zeros_like(n)
np.add.at(n, (w, u), 1.0) # how many innings passed through each state
np.add.at(tot, (w, u), y) # the runs they went on to add
raw = np.where(n > 0, tot / n, np.nan)
If every state were visited by thousands of innings, we could stop here. They aren't, and the raw table shows it. The script code/02_expected_runs_table.py prints the raw cell means and counts at two checkpoints:
Raw vs smoothed vs final, start of over 11 (60 balls left):
overs_bowled wkts_lost n raw smoothed er
10 0 460 100.23 100.24 99.38
10 1 1580 96.73 96.58 95.75
10 2 2508 91.66 91.57 90.78
10 3 2285 84.72 84.74 84.07
10 4 1284 76.80 77.02 76.25
10 5 516 62.78 62.74 62.40
10 6 183 51.99 52.17 50.80
10 7 62 39.00 38.19 36.44
10 8 22 17.86 19.43 22.35
At halfway, two down, 2,508 innings tell you the answer to within a run: about 91 more. Eight down, only 22 innings do, and a single big last-wicket stand would move the cell by several runs. Worse, the raw table breaks rules that any sensible table must obey. Count the violations among cells with at least 30 innings on both sides of the comparison:
Raw-table violations (both cells >= 30 innings): one more ball left but fewer runs to come 90 of 869; one more wicket left but fewer runs 17 of 760
In 90 places, having one more ball left means fewer expected runs; in 17, having one more wicket in hand does. Neither can be true of the underlying game. A side with an extra ball can always choose to block it; a side with an extra wicket can always choose to bat as if it didn't have it. Those violations are noise (and, as we'll see, something subtler), and the table has to be repaired before you can take differences of it — which is exactly what run values are.
The module repairs it in four steps:
- Count (above).
- Smooth along the balls-left axis, but smooth the rate — runs still to come per remaining ball — rather than the total, with a Gaussian kernel of two balls. Then multiply back by the balls left. Never smooth across wickets: the difference between 4 and 5 wickets in hand is a real structural difference, not noise.
- Shape with weighted isotonic regression: find the closest table (weighting each cell by how many innings it rests on) that never decreases as balls left or wickets left increase, sweeping along both directions in turn. A light final blur of the per-ball rate turns isotonic regression's "steps" back into smooth ramps, and a running maximum re-checks the rules.
- Anchor: every complete innings passes through the very first state, so ER(120, 10) is known exactly — it is the mean total. Smoothing borrows a little from the neighbouring "survived the first ball" states, so the whole table is rescaled by under one per cent to hit it. (You can see the effect in the output above: the "er" column sits about 0.9% below "smoothed".)
🔍 Why this works: Smoothing the rate rather than the total is the step people get wrong. Near the end of an innings, expected runs fall roughly in a straight line towards zero: 12 balls left, about 24 runs; 6 balls left, about 12; 1 ball left, about 1.5. A symmetric kernel applied to the totals at "2 balls left" averages "1, 2 and 3 balls left" — fine — but at "1 ball left" it can only average "1, 2 and 3", because there is nothing at zero to balance them, so it biases the estimate upwards. The per-ball rate, by contrast, is nearly flat near the end (about two runs a ball), so averaging neighbours costs almost no bias at all. Isotonic regression, for its part, is the least-squares answer to "what is the nearest table that obeys the rules?" — it moves only the cells that violate, pools each violation with its neighbours in proportion to how much data they carry, and leaves well-measured cells alone. The largest adjustment it makes anywhere the table rests on 30 or more innings is 4.2 runs.
Here is the finished table at checkpoints (cells that fewer than 30 innings pass near are blanked, because the table there is the shaping's guess, not the data's):
Expected runs still to come, men's T20 first innings (rows: overs bowled; cols: wickets lost; - = fewer than 30 innings nearby)
wkts_lost 0 1 2 3 4 5 6 7 8 9
overs_bowled
0 159.5 145.9 - - - - - - - -
3 144.6 135.7 123.9 109.3 - - - - - -
6 125.6 119.7 110.7 101.7 86.5 69.5 - - - -
8 113.4 108.2 101.6 93.7 82.5 67.7 50.9 - - -
10 99.4 95.7 90.8 84.1 76.2 62.4 50.8 36.4 - -
12 83.4 81.5 77.9 72.7 67.0 57.9 47.5 35.9 22.3 -
14 66.9 64.8 62.8 59.7 55.2 50.0 42.3 33.3 22.3 10.3
16 46.8 46.3 45.1 43.5 41.3 37.7 33.3 27.4 20.8 10.3
18 - 24.5 24.5 24.0 23.0 21.7 19.7 17.4 14.2 8.7
19 - 12.7 12.7 12.7 12.2 11.6 10.9 9.8 8.6 5.9
(The "0 overs, 1 down" cell is the state after a wicket falls before the first legal ball is complete — almost always a first-ball dismissal, which the smoothing borrows from.)
Check your guesses from the productive struggle. From the first ball, a men's T20 side batting first goes on to make 159.5 on average across the twelve competitions. Two down at halfway, it adds about 91; five down, about 62. Two down with two overs left, about 24.5.
Now read the table the way a captain should. Down each column the numbers fall steadily — by about 5 or 6 runs per over early in the innings, rising to 10 to 12 per over late, as the remaining overs get more valuable. Across each row the pattern changes completely through the innings. After 10 overs, the first three wickets cost about 4, 5 and 7 runs each; the fifth wicket costs nearly 14 (from 76.2 to 62.4), the moment the side's recognised batting starts to run out. After 18 overs, the row barely moves from one to four down — 24.5, 24.5, 24.0, 23.0 — because with twelve balls left, balls are the scarce resource, not batters. And at the other corner of the table, look at the right-hand columns: with eight or nine down, the runs to come barely change whether there are 8 overs left or 4. When wickets are the scarce resource, balls stop mattering.
That trade-off — balls binding at the end, wickets binding when the tail is in — is the whole of limited-overs strategy in two sentences, and the table makes it quantitative.

📊 Figure (described): Expected runs to come (vertical axis) against legal balls left (horizontal axis, running from 120 on the left to 0 on the right, so the innings moves left to right), one coloured line per number of wickets left, drawn only where at least 30 innings pass. Faint dots show the raw averages behind each line. The 10-wicket line falls smoothly from 159.5 to zero; lines for fewer wickets start lower and flatten towards the left — with few wickets left, extra balls add little — and all the lines converge in the last 20 balls, where wickets barely matter. The raw dots scatter most where the lines are thin (few wickets, many balls).

📊 Figure (described): The same table as a heat map, every second over by wickets lost, with the expected runs printed in each cell. The colour falls from bright (160 runs to come at the start) to dark (under 20 in the last overs or with eight down). The grey triangle in the top right marks states that almost no real innings reach — five down before the fourth over, for instance — where the table is the shaping rules' extrapolation rather than an observation.
⚠️ Common pitfall: reading a state's average as a cause. The table says what happened to the sides that reached a state, and sides do not reach states at random. A team six down after eight overs is more often than not on a hard pitch, against a strong attack, or simply a weaker batting side — and the runs it goes on to add reflect those conditions as well as the six wickets. That is why the raw table broke the "more balls never hurts" rule 90 times: being six down after eight overs is a worse sign about the conditions than being six down after twelve, so the earlier state can show fewer runs to come even though it has more balls. Isotonic shaping repairs the symptom, not the cause. When you take differences of the table — the price of a wicket, the cost of a dot ball — remember that part of the difference is "what the wicket did" and part is "what kind of innings loses that wicket then". Chapter 5's regression and the table disagree about the price of a wicket for precisely this reason (§19.7).
🔄 Check your understanding
- The raw cell for "8 down after 10 overs" rests on 22 innings and says 17.9 runs to come; the finished table says 22.4. Why did the finished table move it upwards, and why is that defensible?
- After 18 overs, the table says 24.5 runs to come with 1 down and 24.5 with 2 down. What does that equality mean for a batting side's approach in the last two overs?
- Why must the table count only one observation per innings per state?
Answer
- The raw value broke the rules: with more balls left it sat below the value for eight down four overs later (22.3), and out of line with its neighbours along the balls axis. With only 22 innings behind it, its weight in the isotonic fit was tiny, so it was pooled towards what the better-measured neighbouring states imply. Defensible because a cell resting on 22 innings has a standard error of several runs, and the shaping rules (more balls or wickets never hurt) are certainly true of the game itself.
- With twelve balls left, losing one more top-order wicket costs essentially nothing in expected runs: the batting side should not be protecting wickets. Every ball should be treated as a scoring chance. (Wickets start to matter again only when the tail is in — the table shows 14.2 with eight down.)
- Wides and no-balls leave the state unchanged, so an innings can be "in" a state for several deliveries. Counting each would give extra weight to innings that bowled more extras in that state and would double-count the same future runs.
19.4 The innings as a Markov chain
The cricket question: can we explain the table, rather than just count it?
The counted table answers "how many runs came next, on average?" without saying anything about how they came. A side six down after eight overs has been seen only a few dozen times, so the table there is shaky — yet the individual balls bowled in similar situations number in the thousands. If we model the innings ball by ball, every delivery in the data contributes to the estimate for every state, and the table becomes something we can compute rather than merely look up.
That model is a Markov chain. Each delivery is a random step from the current state to the next one, with probabilities that depend only on the current state.
📐 Definition — Markov innings model: the state before a delivery is (over, wickets lost). The delivery's outcome is one of a small set of outcome types — legal or not (wide/no-ball), total runs on the delivery (capped at 7), dismissal or not — with probabilities p(outcome | state) estimated from real deliveries. A legal delivery moves the innings one ball on; a dismissal moves it one wicket on; a wide or no-ball without a dismissal leaves it in the same state. The innings ends at 120 legal balls or 10 wickets. Markov means the probabilities depend on the current state only, not on how the innings got there.
The script code/03_markov_chain.py fits the chain on all 1,117,548 deliveries of the men's T20 first innings in the snapshot. The data contain 24 distinct outcome types — "L0" is a legal dot, "L4" a legal four, "L0W" a legal ball with a wicket and no run, "X1" a wide or no-ball for one, and so on:
Deliveries used: 1,117,548; outcome types: 24; cells: 20 overs x 10 wicket counts
The outcome types (legal?, total runs on the delivery capped at 7, wicket?):
X1 X1W X2 X2W X3 X3W X4 X5 X6 X7 L0 L0W L1 L1W L2 L2W L3 L3W L4 L4W L5 L6 L6W L7
Here are the transition probabilities from one real, busy state — the start of the 16th over with four wickets down, a state that 13,481 deliveries in the data were bowled in:
Transition probabilities from the start of over 16 with 4 down (top 10 outcomes):
legal runs wicket p n_cell
True 1 False 0.4457 13481
True 0 False 0.2071 13481
True 4 False 0.0926 13481
True 2 False 0.0884 13481
True 6 False 0.0612 13481
True 0 True 0.0588 13481
False 1 False 0.0361 13481
False 2 False 0.0029 13481
True 3 False 0.0028 13481
False 5 False 0.0018 13481
-> P(next legal state with no wicket) = 0.8979; P(wicket) = 0.0605; P(stay: wide/no-ball, no wicket) = 0.0415
That is the whole game, one ball at a time, at the start of the death overs: a 45% chance of a single, 21% of a dot, 9% of a four, 6% of a six, 6% of a wicket, 4% of an extra ball. Here is how those probabilities move through an innings:
Per-delivery probabilities by state (summary):
over wkts_lost n dot one four six wicket extra_ball runs_per_delivery
1 0 52940 0.485 0.248 0.114 0.016 0.035 0.052 0.977
1 3 2 0.600 0.209 0.083 0.003 0.018 0.063 0.676
1 6 0 0.491 0.246 0.112 0.015 0.035 0.052 0.960
6 0 11549 0.295 0.325 0.177 0.057 0.049 0.038 1.555
6 3 6813 0.464 0.281 0.103 0.024 0.039 0.036 0.995
6 6 74 0.604 0.199 0.049 0.010 0.071 0.058 0.534
7 0 8583 0.263 0.465 0.083 0.046 0.042 0.030 1.261
7 3 9005 0.369 0.432 0.063 0.015 0.030 0.030 0.941
7 6 172 0.572 0.244 0.058 0.002 0.055 0.040 0.619
12 0 1656 0.178 0.426 0.121 0.083 0.055 0.036 1.659
12 3 15121 0.258 0.471 0.081 0.042 0.047 0.027 1.242
12 6 1979 0.443 0.354 0.061 0.024 0.047 0.025 0.875
16 0 288 0.151 0.382 0.124 0.105 0.080 0.038 1.788
16 3 11227 0.185 0.441 0.108 0.076 0.060 0.037 1.569
16 6 6267 0.302 0.433 0.073 0.032 0.057 0.031 1.106
20 0 32 0.076 0.310 0.187 0.134 0.110 0.048 2.255
20 3 3790 0.107 0.313 0.135 0.132 0.111 0.063 2.042
20 6 10260 0.132 0.318 0.116 0.101 0.135 0.056 1.787
Read down the first column of probabilities and you can see the T20 innings breathe. In the first over, nearly half of all deliveries are dots. By the sixth over, with the field still up and no wickets down, dots are down to 30% and fours are at their peak (17.7% of deliveries). Then the powerplay ends: in the seventh over, with nobody out, fours fall from 17.7% to 8.3% and singles leap from 33% to 47% as the boundary riders go back — the fielding restrictions (Appendix E) written into the transition probabilities. By the 20th over, a third of the deliveries go for boundaries and one in nine takes a wicket. And the wickets dimension changes everything at every stage: in the twelfth over, six down, dots are 44% of deliveries; three down, 26%.
Thin cells: borrowing strength
Some cells are almost empty. Only two deliveries in the whole pool were bowled in the first over with three wickets down, and none with six down. The chain cannot be built on two deliveries, so each cell's probabilities are shrunk — a Dirichlet prior worth 60 pseudo-deliveries — towards the same over with a band of similar wicket counts (0–1, 2–3, 4–5, 6–7, 8–9), which is itself shrunk towards the over as a whole. It is the same partial-pooling logic as the beta-binomial shrinkage of Chapter 6, applied to 24 outcomes at once:
Thin cells and shrinkage: deliveries counted in a cell vs its estimate
over 3, 5 down: 12 deliveries; raw P(wicket) 0.000; shrunk 0.052
over 12, 3 down: 15,121 deliveries; raw P(wicket) 0.047; shrunk 0.047
over 20, 9 down: 4,571 deliveries; raw P(wicket) 0.163; shrunk 0.163
Twelve deliveries and no wicket does not mean a side five down in the third over is unbreakable: the shrunk estimate says 5.2% per delivery, borrowed from its neighbours. Fifteen thousand deliveries speak for themselves, and the prior changes nothing.

📊 Figure (described): Left panel, two wickets down; right panel, six down. Each line is the chain's probability (as a percentage of deliveries) of one outcome by over. With two down, dots fall from about 60% in the first over to about 10% in the last, fours step down sharply when the powerplay ends after over 6, and sixes and wickets climb together through the death overs. With six down, the dot-ball line sits far higher through the middle overs — a side with the tail exposed scores far less freely — and the early-over values, where very few innings have been, are mostly borrowed from neighbouring cells.
From probabilities to expected runs: the recursion
Now the payoff. If you know the outcome probabilities in every state, you can compute expected runs for every state exactly, by working backwards from the end of the innings. With no balls left, or no wickets, ER is zero. With one ball left, ER is just the expected runs of one delivery (plus whatever extra balls a wide or no-ball brings). With two balls left, it is the expected runs of the next delivery plus the expected runs from wherever that delivery leaves you — which you already know. And so on, back to the first ball.
For a state with u legal balls left and w wickets left, with outcome probabilities p_k, runs r_k, and a legal/wicket flag for each outcome type k:
ER(u, w) = Σ_k p_k × [ r_k + ER(next state after k) ]
where the next state is (u − 1, w) for a legal ball, (u − 1, w − 1) for a legal ball with a wicket, (u, w − 1) for a wide or no-ball with a wicket — and (u, w), the same state, for a wide or no-ball with no wicket. That last case puts ER(u, w) on both sides of the equation, which you solve in one line: move it across and divide by (1 − P(stay)). In code (MarkovInnings.expected_runs):
for u in range(1, N + 1): # balls left, from the end of the innings backwards
o = (N - u) // 6 # which over this ball belongs to
for wleft in range(1, 11):
p = self.P[o, 10 - wleft] # outcome probabilities in this state
nxt_legal = np.where(W, E[wleft - 1, u - 1], E[wleft, u - 1])
nxt_ill = np.where(W, E[wleft - 1, u], 0.0)
num = (p * R).sum() + (p * L * nxt_legal).sum() + (p * (~L) * nxt_ill).sum()
stay = p[(~L) & (~W)].sum() # wide/no-ball, no wicket: same state again
E[wleft, u] = num / (1.0 - stay)
All 1,331 states take 0.02 seconds. No simulation, no sampling error — this is dynamic programming, and it is the same backward induction that underlies optimal-stopping problems and much of game theory. Here is how the chain compares with the counted table:
Expected total from ball 1: counted table 159.5; Markov chain 159.4; hybrid 159.5
overs down innings_seen counted markov hybrid
0 0 8917 159.5 159.4 159.5
6 1 3031 119.7 121.2 119.7
6 4 403 86.5 82.5 86.3
10 2 2508 90.8 91.9 90.8
10 5 516 62.4 61.8 62.4
15 3 1897 52.1 53.0 52.1
15 7 453 30.9 29.6 30.9
18 5 1855 21.7 21.8 21.7
19 8 950 8.6 8.3 8.6
Well-visited states (100+ innings, n = 776): Markov minus counted: mean +0.05, mean |diff| 1.89, max |diff| 6.92 runs
1-2 wkts left n= 63 mean diff -0.72
3-5 wkts left n= 204 mean diff -1.08
6-10 wkts left n= 509 mean diff +0.59
From nothing but per-ball probabilities, the chain reconstructs the par of 159.4 against a counted 159.5 — a remarkable check, because the chain never saw a final total. Across the 776 states that at least 100 innings pass through, the two approaches differ by under 2 runs on average.
The disagreements are instructive. Where the chain is lower — four down after six overs, 82.5 against a counted 86.5 — it is because the chain judges each future ball by the average side in each future state, while the sides that are actually four down after six overs recover a little better than that. Where it really goes wrong is at the edge of the data, and Figure 19.5 shows it:

📊 Figure (described): For 10, 7, 5 and 3 wickets left, a thick faint line shows the counted table where innings were actually observed, a dotted line shows the Markov chain's expected runs for every state, and a thin solid line shows the hybrid table. With 10 wickets left the three agree almost exactly. With 3 wickets left, the chain's dotted line dips as balls left increase from about 50 to 90 — it says that having more balls left with seven down is worse — before rising again; the counted and hybrid lines stay flat or rise, as the rules require.
The chain's dip is not a bug in the arithmetic. It is the same selection effect as in §19.3, entering through a different door. The chain's probabilities for "seven down in the eighth over" come from the few sides that have actually been seven down in the eighth over — collapses on difficult pitches, against good bowling — and their per-ball scoring is poor. So the chain, asked about a side with seven down and lots of balls left, walks it through states populated by struggling sides and predicts a struggle. The state space has no column for "the pitch is doing a lot", so that information leaks into the state that correlates with it.
The hybrid: the data where they are rich, the chain where they are thin
The module's recommended table combines the two. After smoothing, each cell of the counted table is shrunk towards the chain's value with a weight of 10 pseudo-innings; then the shaping and anchoring steps run as before:
er = (ns * er_counted + k * markov_er) / (ns + k) # ns = smoothed innings count, k = 10
Where 2,508 innings stand behind a cell, the chain's opinion is a rounding error. Where 12 do, it is most of the answer — and the shaping rules then forbid the chain's selection-driven dips. ERTable(120, backstop="markov") is the version every later section of this chapter, and every later chapter that uses the module, works with.
🔄 Check your understanding
- In over 7 with no wicket down, fours fall to 8.3% of deliveries from 17.7% in over 6. What changed in the game, and why does a Markov model indexed by over capture it?
- Why does a wide with no wicket put ER(u, w) on both sides of the recursion, and how is that solved?
- The chain reproduces the par total (159.4 v 159.5) without ever seeing a final total. Why is that a meaningful check?
Answer
- The powerplay ended: from over 7 up to five fielders may be outside the circle, so boundary riders go back and singles become easier while fours become harder. Because the chain's probabilities are estimated separately for each over, the change in fielding restrictions appears directly in the over-7 cells.
- A wide without a wicket does not use up a legal ball, so the side is in exactly the same state after it, with one or more extra runs. ER(u, w) = … + P(stay) × [r + ER(u, w)]; collecting the ER(u, w) terms gives ER(u, w) × (1 − P(stay)) = (everything else), so divide by 1 − P(stay).
- The chain is built only from per-ball outcomes; the par is a property of whole innings. If the per-ball model were badly wrong (for example, if the Markov assumption threw away important structure), the errors would compound over 120 balls and the reconstructed par would miss. Getting within 0.1 runs says that, on average, the per-ball model captures how innings unfold.
19.5 One table per era — and the resources idea
The cricket question: the IPL has changed; how much of the table changes with it?
Chapter 9 found that a win-probability table fitted before 2023 underrated IPL chasers since 2023 by about 13 points, and that the honest fix was era-specific tables. The same is bound to be true of expected runs: average IPL first-innings totals jumped in 2023, the first season of the Impact Player substitute. So code/04_eras_and_resources.py fits separate hybrid tables for the IPL from 2008 to 2022 and from 2023 to 2026, for the men's T20 pool before and after 2023, and for women's T20 cricket (women's T20Is, the WPL and the WBBL):
Par (expected total from ball 1) and sample size
IPL 2008-22 par 163.4 complete first innings 918
IPL 2023-26 par 190.3 complete first innings 281
Men's T20 pool pre-2023 par 158.6 complete first innings 5,255
Men's T20 pool 2023+ par 160.8 complete first innings 3,662
Women's T20 pool par 125.3 complete first innings 2,583
The IPL's par rose by 27 runs, from 163.4 to 190.3. The men's pool as a whole barely moved (158.6 to 160.8): the surge is an IPL story, not a T20 story, which is exactly why a single pooled table would be wrong for the IPL and roughly right almost everywhere else. Women's T20 par is 125.3.
Now compare the IPL tables state by state, in runs and as a percentage of par:
Expected runs to come and resources remaining (% of par) at checkpoints
ER IPL 2008-22 ER IPL 2023-26 ER Women's T20 pool IPL ratio new/old res% IPL 2008-22 res% IPL 2023-26 res% Women's T20 pool
state
0 ov, 0 down 163.36 190.26 125.31 1.16 100.00 100.00 100.00
6 ov, 1 down 122.60 138.06 95.66 1.13 75.05 72.56 76.34
10 ov, 2 down 91.74 103.79 71.78 1.13 56.16 54.55 57.28
10 ov, 4 down 77.49 88.49 57.69 1.14 47.43 46.51 46.04
15 ov, 3 down 52.99 59.92 40.13 1.13 32.44 31.49 32.03
15 ov, 6 down 38.00 45.96 28.10 1.21 23.26 24.16 22.43
18 ov, 5 down 21.30 24.42 16.56 1.15 13.04 12.83 13.21
IPL 2008-22 vs IPL 2023-26: mean |gap| over 427 shared well-visited states = 11.0 runs but only 1.2 resource points
Men's T20 pool pre-2023 vs Men's T20 pool 2023+: mean |gap| over 801 shared well-visited states = 1.5 runs but only 0.8 resource points
Men's T20 pool pre-2023 vs Women's T20 pool: mean |gap| over 807 shared well-visited states = 14.8 runs but only 2.2 resource points
In runs, the two IPL eras are different games: across the 427 states both tables have seen often, they differ by 11 runs on average, and the ratio between them sits at 1.13 to 1.21 everywhere. As a share of par, they are almost the same table: the average gap is 1.2 percentage points. Two down after ten overs, an IPL side has 56.2% of its innings' run-scoring potential left in the old era and 54.5% in the new. Even women's T20, with a par 35 runs lower than the men's, has nearly the same shape: 2.2 points apart on average.
📐 Definition — resources remaining: R(u, w) = 100 × ER(u, w) / par: the percentage of a full innings' expected runs still available from state (u, w). Resources used = 100 − R. The table of R is a resource table.
That observation — that the level of scoring changes much more than the shape of the resource curve — is the foundation of the method Frank Duckworth and Tony Lewis published in 1998 for revising targets in rain-affected matches. If resources are a stable fraction of the innings, you can compare an innings of 20 overs with one of 12 by comparing the resources each side had, rather than the overs. Chapter 23 builds a data-derived resource table from exactly this module and puts the published method's structure to the test; here you have the empirical fact it rests on.

📊 Figure (described): Left panel: expected runs to come against balls left for 10, 7 and 4 wickets left, IPL 2008–22 dashed and 2023–26 solid; the new-era lines sit 10–27 runs higher early in the innings and converge late. Right panel: the same tables as a percentage of each era's par; the pairs of lines almost overlap. The figure says that the Impact Player era scaled IPL scoring up without much changing how an innings uses its resources.
The practical consequence for anyone building a table for a thin era: borrow the shape from a big pool and take only the level from the era. The IPL 2023–26 table rests on 281 innings; the men's T20 pool on 8,917. fit_tables(states, "era", shape_from=pool) rescales the pool's table to each era's mean total — and §19.7 shows why that matters when you start taking differences.
⚠️ Common pitfall: one table for all eras and leagues. Fit an expected-runs table on IPL 2008–22 and use it to project a 2026 innings, and it will be wrong in a known direction. Ten overs in at 80 for 2, the old table projects 171.7; the new one projects 183.8 — a 12-run difference in the most ordinary state in the game. At 130 for 4 after 15 overs, the gap is smaller (179.2 v 184.8) because fewer overs remain for the difference in scoring rate to accumulate. Every projected-score graphic, every DLS-style resource calculation and every run value in this chapter is only as current as the table behind it. Refit when the game changes — new playing conditions, a new ball, smaller boundaries — and check the shape before assuming it carries over.
📋 Try it — Predict this match: It is IPL 2026. A side batting first is 80 for 2 after ten overs. Using the 2023–26 column above (ER 103.8 at 10 overs, 2 down), what total do you project? A rival analyst using a table fitted on 2008–22 says the side is "on course for 172". Who is right, and how would you check?
Answer
80 + 103.8 = 183.8. The rival's 171.7 comes from a table in which IPL sides scored about 13% less in every state. The check is calibration on recent data: take every 2025–26 first innings that passed through a 10-over state, project each with both tables, and compare the average projection with the average actual total. Section 19.6 runs a version of that test for the Markov chain: a chain fitted on 2008–22 under-forecast IPL 2026 totals by 14.2 runs on average.
🔄 Check your understanding
- IPL par rose from 163.4 to 190.3 between eras. The men's T20 pool's par rose only from 158.6 to 160.8. What does that tell you about where a pooled table can safely be used?
- Two down after ten overs, the IPL tables give 56.2% and 54.5% of resources remaining. Why is that small difference more important for a rain rule than the 12-run difference in expected runs?
- When would you not borrow the shape of a large pool for a thin era?
Answer
- The scoring surge since 2023 is concentrated in the IPL. A pooled table is a fair description of most men's T20 competitions in either era, but for the IPL from 2023 it is centred about 30 runs too low and must be replaced (or rescaled to the IPL's level).
- A rain rule compares the resources two sides had, not their runs, and then scales by the level of the match. If the shape — the share of resources at each state — is stable across eras, the resource table carries over and only the level needs updating; if the shape shifted, revised targets would be biased in particular states.
- When there is reason to think the thin era uses resources differently — for example, if a rule change made late-innings scoring disproportionately easier, or a new format (such as The Hundred's 100-ball innings) changed the clock itself. Check first: fit the thin era's own table, compare resource percentages in the well-visited states, and borrow the shape only if they agree within noise.
19.6 Simulating innings: the chain as a dice-roller
The cricket question: from here, what is the range of totals this side could make — not just the average?
Expected runs is a single number. A captain deciding whether 190 is enough, a broadcaster drawing a "projected score" fan, or a bookmaker pricing an over/under line needs a distribution. The Markov chain gives one for free: start at any state, roll the next ball from that state's probabilities, move, and repeat until the innings ends. Do it 20,000 times.
The simulator in MarkovInnings.simulate does all 20,000 innings at once with numpy, one delivery per step, so it takes about a second. The first test is the obvious one: does the chain's distribution of totals look like the real distribution? (code/05_simulate_innings.py.)
1. Men's T20 pool: real complete first innings vs the chain
mean sd p10 p50 p90 200+ % <120 %
real 159.5 38.3 111.0 161.0 206.0 13.4 13.6
chain 159.5 31.1 121.0 161.0 197.0 8.7 9.4
chain + tilt 0.08 161.1 39.1 114.0 159.0 211.0 15.8 13.3
All out: real 14.0%, chain 14.5%, chain + tilt 14.6%
The chain nails the centre — mean 159.5, median 161, and even the all-out rate (14.5% against a real 14.0%). But its spread is too narrow: a standard deviation of 31.1 runs against a real 38.3. It produces 200-plus totals in 8.7% of innings when real sides managed 13.4%, and sub-120 totals in 9.4% against a real 13.6%. The tails are where the cricket is, and the chain is short of both.
🔍 Why this works (the chain is too narrow): Every simulated innings in the chain is played in the same average conditions: the same probabilities for the same state, whatever pitch, ground, ball or opposition. Real innings are not. Some are played on a featherbed at a small ground against a weak attack, and every ball of those innings is more likely to go for four; others on a slow, turning pitch where every ball is harder to score from. That innings-to-innings variation in conditions is invisible to the state, so the chain leaves it out — and a variance that is left out of every ball compounds over 120 balls. Statisticians call this overdispersion: the real outcomes vary more than a model with fixed probabilities can produce. It is the same phenomenon that makes a team's season record more variable than a coin-flip model would predict when teams genuinely differ in quality.
The fix is to give each simulated innings its own scoring environment. The module's tilt_sd option draws a number θ for each innings from a normal distribution with mean 0 and standard deviation tilt_sd, and reweights every run-scoring outcome by exp(θ × runs) — more boundaries and fewer dots on a good day, the opposite on a bad one — while keeping each state's wicket probability fixed. fit_tilt tries a grid of values and you choose the one whose spread matches reality:
tilt_sd mean sd real_mean real_sd
0.00 159.26 31.08 159.5 38.27
0.06 160.23 35.99 159.5 38.27
0.08 161.55 39.40 159.5 38.27
0.10 162.66 43.98 159.5 38.27
0.12 163.79 48.70 159.5 38.27
A tilt of 0.08 brings the spread to 39.1 against a real 38.3, and the tails into line: 15.8% of innings above 200 (real 13.4%) and 13.3% below 120 (real 13.6%). The cost is a mean that drifts up by about 1.6 runs, because the exponential reweighting helps good days a little more than it hurts bad ones. For the IPL 2023–26 chain, fitted on those 281 innings alone, a smaller tilt of 0.04 is enough (standard deviation 34.4 against a real 35.6) — the IPL's venues and teams are more alike than a pool of twelve competitions spanning full-member internationals, associate internationals and domestic leagues on four continents.

📊 Figure (described): The grey bars are the 8,917 real totals. The solid line, 20,000 innings simulated by the plain chain, has the right centre but is visibly too tall and too narrow, with thin tails. The dashed line, the chain with a per-innings tilt of 0.08, spreads out to match the real histogram in both tails. The lesson: a model can be right on average and wrong about risk.
Same score, different futures
Return to the hook. Using the IPL 2023–26 chain with its tilt, simulate the second half of the innings 20,000 times from 91 for 1 and from 91 for 5:
2. Forecasting from the 10-over state (IPL 2023-26 chain with tilt)
91/1 (Gujarat Titans v MI, 26 May 2023): median 204, 80% interval 180-231, P(200+) 59.8%, actual 233 at the 91.6th percentile
91/1 (RCB v CSK, 5 Apr 2026): median 204, 80% interval 180-231, P(200+) 59.8%, actual 250 at the 98.4th percentile
91/5 (RCB v GT, 30 Apr 2026): median 170, 80% interval 138-195, P(200+) 6.1%, actual 155 at the 24.6th percentile
From 91 for 1, the median finish is 204 and a 200-plus total is more likely than not (59.8%). From 91 for 5, the median is 170 and 200 happens in only 6.1% of simulated innings. The two Bengaluru innings are a neat lesson in what a forecast is. Their 250 from 91 for 1 sat at the 98.4th percentile — something the chain expects about once in sixty innings from that state. Their 155 from 91 for 5 sat at the 24.6th percentile — slightly below par for the state, nothing remarkable. Gujarat's 233 (91.6th percentile) was a very good second half, made largely of one innings from Shubman Gill.

📊 Figure (described): The solid distribution, from 91 for 1, is centred near 204 and runs from about 165 to 245; the dashed distribution, from 91 for 5, is centred near 170 and runs from about 125 to 210. Dotted vertical lines mark the actual finishes: Bengaluru's 155 sits in the left-centre of the 91-for-5 curve, Gujarat's 233 in the right tail of the 91-for-1 curve and Bengaluru's 250 at its far edge. Same score, two almost separate distributions.
Does it forecast honestly?
The real test of a forecasting model is on data it has not seen. Take every complete IPL 2026 first innings — 71 of them — and forecast each from its state after ten overs, with chains fitted only on earlier seasons. If the 80% intervals are honest, about 80% of real totals should land inside them:
3. Out of time: forecast every complete IPL 2026 first innings from its 10-over state
IPL 2023-25 chain tilt 0.0 : n=71, 80% interval coverage 73.2%, mean (actual - median) +2.1 runs, mean width 46.1
IPL 2023-25 chain tilt 0.04: n=71, 80% interval coverage 73.2%, mean (actual - median) +2.1 runs, mean width 49.8
IPL 2008-22 chain tilt 0.0 : n=71, 80% interval coverage 59.2%, mean (actual - median) +14.2 runs, mean width 42.5
IPL 2008-22 chain tilt 0.04: n=71, 80% interval coverage 62.0%, mean (actual - median) +14.2 runs, mean width 45.5
The chain fitted on IPL 2023–25 covers 73.2% of 2026 totals with its 80% interval and is centred within about 2 runs — close to honest on a sample of 71 (where one innings either way moves coverage by 1.4 points), and slightly too confident. The chain fitted on 2008–22 is a cautionary tale: it under-forecasts by 14.2 runs on average and its intervals catch only 59–62% of real outcomes. No amount of tilting fixes a model that is centred in the wrong place.
🏏 Eye test:
Wendell: So the computer says 91 for 5 at halfway finishes around 170. I could have told you that from the bar at Queen's Park.
Nusrat: You could have told me "about 170". Could you have told me there's a 6% chance of 200 and a 10% chance of under 138? That's what the bowling captain needs to know about how much risk to take with his overs.
Wendell: Fine. But here's what your chain doesn't know. Ninety-one for five with Russell and Narine still to come is one game. Ninety-one for five with three bowlers and a keeper who can't bat is another. You've got a column for "how many" wickets, and no column for "whose".
Nusrat: That's the Markov assumption. It's wrong, and we know how wrong: the plain chain's spread was 31 runs when the real spread was 38. Some of that missing spread is the pitch, and some of it is exactly what you said — who's left. The tilt soaks up some of both, but it doesn't know which side has Russell.
Wendell: So when would you trust it over me?
Nusrat: Over two hundred and eighty innings, I'd trust it over anyone — it was centred within two runs of the 2026 totals. On one night, with you watching the pitch and knowing the batting order, I'd want your number and the chain's number side by side, and I'd want to know why they disagree.
The narrator's view: Wendell's objection is the right one and it is fixable. The batting-order simulation of Chapter 30 replaces "wickets in hand" with the actual batters still to come, each with their own outcome probabilities, and runs the same simulator — the chain in this chapter is the league-average batting order. What no ball-by-ball model can see is what Wendell saw from the boundary: the ball gripping, the outfield slow, the left-hander struggling to rotate the strike. That information belongs in the forecast, and today it gets there through a person.
🔄 Check your understanding
- The plain chain's simulated totals have the right mean but too small a spread. Give two cricket reasons why.
- What does a tilt of 0.08 do to one simulated innings, in cricket terms?
- Why can't any tilt rescue the chain fitted on IPL 2008–22 when it is used on 2026?
Answer
- Conditions differ from innings to innings — pitch, ground size, dew, the quality of the attack — and they push every ball of an innings the same way; and the identity of the batters still to come differs. The chain gives every innings the same average probabilities for the same state, so it leaves out the innings-to-innings variation, which compounds over 120 balls.
- It draws a "scoring environment" for the innings — say θ = +0.08, a good batting day — and makes every run-scoring outcome more likely in proportion to exp(0.08 × runs) (so sixes gain most, dots lose), keeping the chance of a wicket on each ball as it was. A negative θ is a hard pitch.
- Tilting spreads the forecast out symmetrically around its centre; it does not move the centre. The 2008–22 chain is centred 14 runs too low for 2026, so its intervals sit in the wrong place, and making them wider only partly helps (coverage rises from 59.2% to 62.0%).
19.7 What a wicket, a dot ball, a four and a six are worth
The cricket question: how many runs does a wicket cost? How much does a dot ball cost? And does the answer depend on when?
With a table in hand, every outcome of every delivery has a price. The idea is the one from baseball's run-expectancy matrix: a delivery's run value is the runs it produced plus the change in expected runs it caused.
📐 Definition — run value of an outcome: in state (u, w), an outcome that scores r runs and leaves the innings in state (u′, w′) is worth r + ER(u′, w′) − ER(u, w) runs to the batting side. Positive means the ball went better than an average ball in that state; negative, worse. By construction, the average run value over all deliveries is zero, and the run values of an innings add up to its final total minus par.
Two named special cases: - Value of a dot ball = ER(u − 1, w) − ER(u, w): the expected runs the side loses by using up a ball and scoring nothing. Always ≤ 0. - Price of a wicket = ER(u − 1, w) − ER(u − 1, w − 1): the runs a wicket costs beyond the dot ball it fell on. Always ≥ 0. (The full value of a wicket ball, compared with an average ball, is the sum of the two.)
The functions run_value_dot, run_value_wicket, outcome_value and run_value_grid in the module compute these from any table. The script code/06_run_values.py prints the grid for the men's T20 pool (states that fewer than 50 innings pass near are skipped):
Run values at the first ball of an over, men's T20 pool (hybrid table)
overs_bowled wkts_lost er dot single four six wicket_ball wicket_cost
0 0 159.50 -0.96 0.04 3.04 5.04 -14.48 13.52
6 0 125.66 -1.06 -0.06 2.94 4.94 -6.90 5.85
6 2 110.72 -0.74 0.26 3.26 5.26 -9.66 8.92
6 4 86.33 -0.30 0.70 3.70 5.70 -17.61 17.31
10 0 99.49 -1.29 -0.29 2.71 4.71 -4.84 3.56
10 2 90.78 -1.00 0.00 3.00 5.00 -7.62 6.62
10 4 76.22 -0.58 0.42 3.42 5.42 -14.22 13.64
10 6 50.58 -0.08 0.92 3.92 5.92 -14.53 14.45
15 0 57.30 -1.69 -0.69 2.31 4.31 -2.96 1.26
15 2 54.22 -1.49 -0.49 2.51 4.51 -3.47 1.98
15 4 48.62 -1.16 -0.16 2.84 4.84 -5.36 4.20
15 6 38.09 -0.73 0.27 3.27 5.27 -7.75 7.03
15 8 22.04 -0.12 0.88 3.88 5.88 -11.72 11.60
18 2 24.47 -1.91 -0.91 2.09 4.09 -2.22 0.31
18 4 22.97 -1.72 -0.72 2.28 4.28 -2.84 1.12
18 6 19.67 -1.33 -0.33 2.67 4.67 -3.43 2.10
18 8 14.21 -0.78 0.22 3.22 5.22 -5.89 5.10
19 2 12.74 -2.04 -1.04 1.96 3.96 -2.05 0.01
19 4 12.18 -1.93 -0.93 2.07 4.07 -2.36 0.43
19 6 10.90 -1.67 -0.67 2.33 4.33 -2.62 0.94
19 8 8.56 -1.23 -0.23 2.77 4.77 -3.34 2.11
Four lessons are in that grid.
A wicket's price collapses through the innings. A first-ball wicket costs 13.5 runs. Two down at halfway, the next wicket costs 6.6; at the start of the 16th over, 2.0; at the start of the 20th, essentially nothing (0.01). Your productive-struggle question from §19.1 — the third wicket at the start of over 11 versus over 19 — has the answer 6.6 runs versus about zero.
But it rises steeply with wickets already lost. At halfway the fifth wicket (four already down) costs 13.6 runs and the seventh 14.5; at the start of the 16th, the ninth wicket (eight down) costs 11.6 — six times the price of the third. Protecting the last recognised batter is worth far more than protecting an opener.
A dot ball's cost grows from under one run to two. Early in the innings with wickets in hand, a dot costs about one run (−0.96 on the first ball); with four down after six overs, only 0.3 — when wickets are scarce, balls are cheap; in the last over, a full two runs. That is why the death overs feel so different: every dot costs the batting side about as much as a well-run two would earn.
A single is not always a good ball. In the 19th over with two down, a single is worth −0.91 runs: below what the average ball in that state produces. In the first over, a single is roughly break-even (+0.04). "Rotating the strike" is a positive act early in the innings and a small defeat at the death — unless, which the table cannot see, it gets the better hitter on strike.

📊 Figure (described): The price of one more wicket (runs) at the start of the over, with darker cells meaning more expensive wickets. Prices are highest early in the innings and when four to seven wickets are already down (16 to 20 runs), fall steadily down every column, and are lowest in the bottom-left corner — few wickets down with two overs left — where a wicket costs under one run. Grey cells are states real innings almost never reach.
Checking against Chapter 5
Chapter 5 estimated a "price of a wicket" a different way: a regression of final first-innings total on runs so far and wickets so far at a checkpoint. For men's T20Is between full members from 2016 it found about 5.3 runs at ten overs. Fit a hybrid table on the same kind of innings (724 complete first innings, par 168.9) and average the table's price over the real mix of wickets lost at ten overs, and you get:
Price of one more wicket at 10 overs, averaged over the real wickets-lost mix: 7.4 runs (by wickets already lost 0/2/4: 3.2 / 6.3 / 6.3)
at 6 overs: own table 8.9 runs; pool shape rescaled 10.4 runs
at 10 overs: own table 7.4 runs; pool shape rescaled 8.4 runs
at 15 overs: own table 4.3 runs; pool shape rescaled 5.0 runs
Chapter 5-style regression on the same innings (final ~ runs so far + wickets so far, 10 overs): wicket coefficient -4.4, runs-so-far coefficient 1.36 (n = 724)
The table says 7.4; the regression on these very innings says 4.4. Both are honest. They disagree because of the selection effect of §19.3, and the regression's other coefficient tells you so: each run already scored at ten overs predicts 1.36 more runs in the final total, not 1. A side that is 90 at halfway rather than 70 has not only 20 more runs; it is probably batting on a better pitch or against a weaker attack, and the regression credits runs-so-far with that information. Wickets-so-far carries the mirror image: a side that has lost more wickets is, on average, scoring less freely as well, and the regression assigns part of the wickets' cost to the runs column. The table, which compares states rather than fitting a straight line, keeps that cost with the wickets. Neither is "the causal effect of a wicket" — that would need you to compare the same innings with and without the dismissal, which no observational data can do — but the table's number is the one to use for decisions within an innings, where the pitch is whatever it is and the question is what one more wicket does.
Two further checks. The price of a wicket at halfway is 9.3 runs in IPL 2023–26 against 8.0 in IPL 2008–22, on the same mix of wickets lost: a higher-scoring game makes every resource, wickets included, more valuable. And in ODIs (§19.9), the table and Chapter 5's regression agree closely at 25 overs (19.5 v 19.1). Chapter 14's "working price of a wicket" by over is the one-dimensional ancestor of Figure 19.9; the module's run_value_wicket is the version to use from here on.
Thin eras: whose shape?
For the IPL's new era, which rests on 281 innings, you have two choices: the era's own table, or the pool's shape rescaled to the era's level (§19.5). The script prints both:
Run values, IPL 2023-26: the era's OWN thin table vs the pool's shape at the era's level
overs_bowled wkts_lost er_own dot_own wicket_cost_own er_scaled dot_scaled wicket_cost_scaled
6 0 144.16 -1.42 5.87 149.89 -1.26 6.97
6 2 130.06 -1.30 6.57 132.07 -0.89 10.64
10 2 103.79 -1.23 6.45 108.29 -1.19 7.90
15 4 54.84 -1.47 3.33 58.00 -1.38 5.01
18 4 25.99 -1.98 1.17 27.40 -2.05 1.34
The expected runs themselves agree within about 6 runs, but the differences — which is what run values are — disagree more: the price of a third wicket after six overs is 6.6 runs on the era's own table and 10.6 on the rescaled pool. A table built on 281 innings simply cannot resolve a four-run difference between adjacent cells; its differences are mostly noise and shaping. The rescaled table assumes the IPL's new era uses resources the way the rest of men's T20 does — an assumption §19.5 found holds to about one resource point. This chapter uses the rescaled table for IPL 2023–26 run values and Expected Runs Added, and says so. If you are an analyst with access to more seasons of a single league, refit and compare.
Linear weights
Average the run values of every real delivery by outcome and phase, and you get cricket's version of what baseball analysts call linear weights — the average worth of each kind of event. For IPL 2023–26 first innings (35,437 deliveries, rescaled table):
Linear weights: average run value of each outcome, IPL 2023-26 first innings (IPL 2023-26 table)
phase powerplay middle death share of deliveries %
outcome
dot -0.94 -1.04 -1.60 25.99
one 0.01 -0.12 -0.72 37.99
two 1.04 0.87 0.20 5.99
four 3.01 2.83 2.16 12.54
six 4.97 4.78 4.14 7.37
wicket -13.87 -9.27 -3.95 5.06
wide 1.24 1.16 1.07 4.20
no-ball 2.81 2.54 2.88 0.43
Check: mean ball value over all 35,437 deliveries = -0.001 runs

📊 Figure (described): For each outcome, three bars give its average run value in the powerplay, middle overs and death. Fours and sixes are worth about 3 and 5 runs early and about 2.2 and 4.1 at the death; dots cost about one run early and 1.6 at the death; the wicket bar dwarfs the rest — almost −14 runs in the powerplay, −9.3 in the middle overs and −4 at the death. A wide is worth just over one run in every phase.
In the IPL powerplay, a wicket costs as much as four or five sixes earn (13.9 runs against 5.0 for a six). At the death, it costs about the same as one six (3.95 against 4.14). Those two numbers are the quantitative core of every T20 batting plan: protect wickets early because they are expensive; spend them freely late because they are cheap. A single at the death is worth −0.72 runs — close to half a dot ball's cost — which is the arithmetic behind the modern batter's reluctance to "just get off strike" in the 19th over.
📋 Try it — Optimize this strategy: A batter considers a riskier approach for the coming over: it would turn 6% of deliveries from dots into fours, and 3% of deliveries from dots into wickets. Using the pool's run values, is it worth it (a) at the start of over 16 with two down (dot −1.49, four +2.51, wicket ball −3.47), and (b) at the start of over 7 with four down (dot −0.30, four +3.70, wicket ball −17.61)?
Answer
(a) Gain from extra fours: 0.06 × (2.51 − (−1.49)) = +0.24 runs per ball. Cost of extra wickets: 0.03 × (−3.47 − (−1.49)) = −0.06. Net +0.18 runs per ball — about +1.1 runs over the over. Attack. (b) Gain: 0.06 × (3.70 − (−0.30)) = +0.24. Cost: 0.03 × (−17.61 − (−0.30)) = −0.52. Net −0.28 runs per ball — about −1.7 runs over the over. Don't. The same change in approach is right at the death with wickets in hand and wrong in the middle overs with the lower order exposed. (Caveat: these are average values; who is batting next changes them, which the table cannot see.)
🔄 Check your understanding
- Why do the run values of all deliveries in an innings sum to (total − par)?
- The table's price of a wicket at ten overs (7.4) is larger than the regression's (4.4) on the same 724 innings. Which coefficient in the regression reveals why?
- Why is a single at the death worth less than nothing?
Answer
- Each delivery's value is runs + ER(after) − ER(before). Summed over an innings, the ER terms telescope: every ER(after) cancels the next delivery's ER(before), leaving (total runs) + ER(end) − ER(start) = total + 0 − par.
- The runs-so-far coefficient of 1.36: each run already scored predicts more than one run of final total, because runs so far also signal good conditions. Wickets so far signal bad conditions, and the regression splits the shared information between the two columns, shrinking the wicket coefficient.
- At the death, the average delivery in a state is worth well over a run (ER falls by about 1.7–2 runs per ball). A single uses up one of those valuable balls and returns only one run, so it is below average for the batting side — a small win for the bowler.
19.8 Expected Runs Added: crediting batters and bowlers
The cricket question: which batters added the most runs beyond what their situations would produce on average — and which bowlers took the most away?
Every delivery now has a value. Credit it to the people involved and you have a player metric.
📐 Definition — Expected Runs Added (xRA): for a batter, the sum over every delivery they faced of the delivery's run value minus any extras on it (extras belong to nobody); a non-striker run out is charged for the delivery on which he is dismissed. For a bowler, the sum over every delivery bowled of −(runs conceded + ER(after) − ER(before)) — that is, runs saved compared with the state's expectation — so that bigger is better for both. xRA above average subtracts the average player's rate in the same data (batters' raw xRA runs slightly negative, by about 0.08 runs a ball in IPL 2023–26, because extras are taken out); xRA per 100 balls is that, per 100 balls faced or bowled. Computed on first innings only, with a table matched to the competition and era.
xRA is the state-space cousin of two measures you have met. Chapter 9's runs above expected (RAE) compares a batter's runs with the league's runs per ball in the same situation — but it does not charge the batter for getting out. xRA does, at the state's price: a dismissal in the IPL 2023–26 powerplay averages −13.9 runs. Chapter 9's WPA credits the change in win probability, which is the right currency in a chase; in the first innings, where the side's job is to set a total, runs are the natural currency, and xRA measures them. Bowlers have Chapter 14's Bowling Runs Saved, built from phase baselines and expected wickets; bowling xRA instead prices every delivery, wickets included, through the same state table as the batters, so the batting and bowling accounts balance.
The code is one line per side once the ball values exist (code/07_xra.py):
V = st.ball_values(ipl_2023_26_first_innings, ipl_2023_26_table) # adds er_before, er_after, ball_value
bat = st.xra_table(V, "batter") # batters, grouped by registry id
bowl = st.xra_table(V, "bowler")
Here are the IPL 2023–26 leaders among the 42 batters with at least 300 balls faced in first innings:
Batters, IPL 2023-26 first innings, 300+ balls faced (n = 42): top 12 by xRA above average
name balls runs outs average strike_rate xra xra_avg xra_per_100
H Klaasen 809 1399 28 49.96 172.93 217.15 279.72 34.58
Shubman Gill 829 1368 24 57.00 165.02 152.36 216.48 26.11
RM Patidar 434 782 20 39.10 180.18 136.63 170.20 39.22
TM Head 577 1003 28 35.82 173.83 123.15 167.78 29.08
B Sai Sudharsan 746 1123 22 51.05 150.54 67.59 125.29 16.79
KL Rahul 662 983 20 49.15 148.49 52.70 103.90 15.70
RD Gaikwad 717 1042 23 45.30 145.33 48.12 103.57 14.45
MR Marsh 520 844 20 42.20 162.31 62.88 103.10 19.83
Abhishek Sharma 523 971 32 30.34 185.66 55.94 96.39 18.43
Tilak Varma 482 704 20 35.20 146.06 58.60 95.88 19.89
V Kohli 966 1407 30 46.90 145.65 15.29 90.00 9.32
TH David 316 536 16 33.50 169.62 46.14 70.58 22.33
Bottom 6
name balls runs outs average strike_rate xra xra_avg xra_per_100
AK Markram 505 696 24 29.00 137.82 -87.75 -48.69 -9.64
RR Pant 406 589 20 29.45 145.07 -83.86 -52.46 -12.92
JM Sharma 341 487 20 24.35 142.82 -97.33 -70.95 -20.81
RA Jadeja 416 555 18 30.83 133.41 -107.42 -75.24 -18.09
HH Pandya 358 486 20 24.30 135.75 -111.61 -83.93 -23.44
RG Sharma 324 458 22 20.82 141.36 -126.28 -101.22 -31.24
Heinrich Klaasen leads by a distance: +279.7 runs above an average batter's xRA over 809 first-innings balls, combining a strike rate of 172.93 with an average of 49.96 — runs fast and rarely charged for a wicket. Shubman Gill is second, with the best average in the group (57.00). Rajat Patidar has the best rate of all (+39.2 per 100 balls). Virat Kohli made the most first-innings runs in the period (1,407 from 966 balls) and ranks 11th: a positive contributor, but at +9.3 per 100 balls about a quarter of Klaasen's rate.
At the other end, Rohit Sharma's first innings in this period — 458 runs at an average of 20.82, strike rate 141.36 — cost his side about 101 runs compared with an average batter facing the same 324 balls. That is a statement about 22 dismissals, many of them early, at the price the table charges for powerplay wickets — not about his career (Chapter 9 found his IPL chase WPA of 2.50 ranked 17th of 99), and over 324 balls a large part of it is noise. Ask how much is noise before you ask what it means.
Across the 42 batters, xRA per 100 balls correlates 0.687 with strike rate and 0.641 with average: it is neither, and it needs both. The biggest rank changes show what it adds:
Biggest gaps between runs rank and xRA rank:
name runs strike_rate average xra_avg r_runs r_xra
JC Buttler 841 147.8 40.0 -13.1 14.0 33.0
AK Markram 696 137.8 29.0 -48.7 22.0 37.0
SV Samson 800 149.5 42.1 15.2 15.0 27.0
name runs strike_rate average xra_avg r_runs r_xra
RM Patidar 782 180.2 39.1 170.2 16.0 3.0
DP Conway 520 147.3 47.3 27.7 38.0 20.0
TH David 536 169.6 33.5 70.6 34.5 12.0
Jos Buttler's 841 runs at an average of 40 rank 14th by volume but 33rd by xRA: a strike rate of 147.8 while opening, when the IPL powerplay as a whole scored at about 153 in 2024–26 (Chapter 7), means his runs came at roughly the rate the states he batted in were producing anyway, and his dismissals were charged at powerplay prices. Tim David's 536 runs rank 34th-equal but his xRA ranks 12th: he bats late, where a run scored at 170 is worth more than the state's expectation and a dismissal costs little.

📊 Figure (described): Each dot is a batter with 300+ first-innings balls in IPL 2023–26; strike rate runs across, xRA above average per 100 balls up the side, dot size is balls faced and colour is batting average. The cloud rises from bottom left to top right, but loosely: at a strike rate of about 145, xRA ranges from −31 (Rohit Sharma) to +15 (players with higher averages), and the top-right corner is shared by high-average, high-SR batters (Klaasen, Gill, Head, Patidar). The figure shows that speed without survival, or survival without speed, both leave xRA near zero.
The bowlers' side, among the 40 with at least 300 legal first-innings balls:
Bowlers, IPL 2023-26 first innings, 300+ legal balls (n = 40): runs saved vs average (xRA)
name balls runs wickets economy xra_avg xra_per_100
B Kumar 606 825 37 8.17 212.45 35.06
SP Narine 528 621 27 7.06 141.27 26.76
Noor Ahmad 564 740 32 7.87 131.81 23.37
JJ Bumrah 425 540 20 7.62 126.73 29.82
Mohammed Siraj 666 958 32 8.63 108.73 16.33
TA Boult 588 861 31 8.79 106.99 18.20
CV Varun 516 694 28 8.07 105.27 20.40
Kuldeep Yadav 642 880 34 8.22 103.72 16.16
RA Jadeja 462 594 23 7.71 102.62 22.21
PP Chawla 360 510 26 8.50 99.76 27.71
Bottom 5
name balls runs wickets economy xra_avg xra_per_100
SM Curran 348 602 20 10.38 -40.28 -11.58
YS Chahal 702 1118 33 9.56 -41.41 -5.90
C Green 312 540 11 10.38 -87.19 -27.95
HH Pandya 432 758 23 10.53 -89.30 -20.67
Avesh Khan 486 867 25 10.70 -100.13 -20.60
Correlation across bowlers: xRA per 100 vs economy -0.720; vs wickets per 100 balls 0.428
Bhuvneshwar Kumar leads with +212 runs saved, from 37 first-innings wickets at an economy of 8.17 — many of them powerplay wickets, which the table prices at nearly 14 runs each. Sunil Narine has the best economy in the group (7.06) and ranks second. Jasprit Bumrah is fourth in total and third per ball (+29.8 per 100). Mitchell Starc is the most striking re-ranking: 35th of 40 by economy (10.18) but 13th by xRA, because 30 wickets in 310 balls is a lot of wickets, and the table pays for each one. Across the 40, xRA tracks economy (correlation −0.72) more than wickets (0.43), but it is the only one of the three that puts both into the same currency.
Women's T20Is — and a warning about context
The same machinery runs on women's T20 internationals with the women's T20 pool table (par 125.3). First, all teams together:
Women's T20Is 2023-26 first innings, ALL teams (1353 innings): top 4 bowlers by xRA
name balls economy wickets xra_avg
T Putthawong 901 4.37 75 413.08
Rosine Irera 585 3.74 37 343.00
MD Bimenyimana 595 4.12 47 337.24
KY Chan 677 4.79 51 243.27
⚠️ Common pitfall: a table that doesn't know the opposition. Most of the 1,353 women's T20I first innings since 2023 involve associate nations, many against much weaker batting sides. A table fitted on the women's pool — dominated by full-member internationals, the WPL and the WBBL — expects far more runs per state than those matches produce, so the bowlers who play most associate cricket "save" hundreds of runs. They may be very good bowlers; the table cannot tell. xRA is only as fair as the comparison inside the table: fit it on matches like the ones you are judging, or restrict the judging to matches like the ones the table was fitted on. (Chapter 26 develops translation factors for exactly this problem.)
Restricted to full member against full member (271 first innings):
name balls runs outs average strike_rate xra xra_avg xra_per_100
S Mandhana 870 1213 32 37.91 139.43 333.78 248.03 28.51
NR Sciver-Brunt 500 711 11 64.64 142.20 283.43 234.15 46.83
L Wolvaardt 824 1083 24 45.12 131.43 310.20 228.99 27.79
Fatima Sana 379 600 13 46.15 158.31 256.42 219.06 57.80
Shafali Verma 650 956 29 32.97 147.08 260.73 196.66 30.26
DN Wyatt 551 822 23 35.74 149.18 238.29 183.98 33.39
HC Knight 502 646 18 35.89 128.69 228.37 178.89 35.64
EA Perry 498 661 20 33.05 132.73 196.03 146.95 29.51
Bowlers, 250+ legal balls: top 6
name balls runs wickets economy xra_avg xra_per_100
Renuka Singh 444 453 31 6.12 158.50 35.70
M Kapp 384 337 20 5.27 152.21 39.64
G Wareham 412 406 22 5.91 98.10 23.81
Nahida Akter 472 524 29 6.66 92.48 19.59
Nashra Sandhu 378 373 15 5.92 90.59 23.97
Rabeya Khan 384 364 19 5.69 86.65 22.57
Smriti Mandhana leads on volume (+248 over 870 balls); Nat Sciver-Brunt has the best rate among the established top order (+46.8 per 100, from an average of 64.64 — she was out only 11 times); Laura Wolvaardt is third. Pakistan's Fatima Sana posts the highest rate of all (+57.8 per 100, strike rate 158.31) from a smaller sample of 379 balls. With the ball, India's Renuka Singh (+158.5) and South Africa's Marizanne Kapp (+152.2, economy 5.27) lead, followed by Australia's Georgia Wareham and three bowlers from Bangladesh and Pakistan. Notice that the women's per-100-ball numbers sit on a similar scale to the men's IPL table even though par is 65 runs lower: xRA is measured against each game's own table, so it travels across formats and genders in a way raw runs do not.
⚠️ Common pitfall: using xRA in a chase. The table assumes a side is trying to maximise its total. A chasing side is trying to reach a target; when it is comfortably ahead it blocks, and when it is well behind it swings at everything. A batter who calmly finishes a chase of 140 with 12 balls to spare will look poor on xRA (he "left runs out there") and excellent on WPA. Use xRA for first innings and WPA (Chapters 9 and 20) for chases. The function computes whatever you give it, so the discipline is yours.
🔄 Check your understanding
- Two batters each score 30 off 20 balls in the powerplay of an IPL first innings. One is dismissed on his 20th ball; the other is not out at the end of the powerplay. Roughly how far apart will their xRA be, and why?
- Why do batters' raw xRA totals in IPL 2023–26 average about −0.08 runs per ball, and how does "xRA above average" fix it?
- Bhuvneshwar Kumar's economy of 8.17 is well above Narine's 7.06, yet his xRA is higher. Give the likely reason.
Answer
- About 14 runs: the dismissal ball is charged the state's price of a powerplay wicket (on average −13.9 runs in IPL 2023–26 first innings), and everything else about their innings is identical.
- Ball values sum to total minus par, and part of every total is extras, which xRA credits to nobody. Taking out the extras leaves the batters' share slightly negative on average. "Above average" subtracts the average batter's rate per ball faced, so a typical batter scores zero.
- Wickets, and when they fell: 37 first-innings wickets in 606 balls, many of them in the powerplay, where the table prices a wicket at around 14 runs. Economy counts runs only; xRA puts runs and wickets into one currency.
19.9 ODIs — and why Tests need a different lens
The cricket question: does the state-space machinery carry over to the 50-over game, and to Test cricket?
ODIs: the same grid, five times bigger
An ODI innings has 300 balls, so 3,000 states — and an order of magnitude fewer innings to fill them than T20. The hybrid table handles that without change: wider smoothing along balls (the default scales with the innings length) and the Markov backstop carry it through the sparse regions. The script code/08_odi_and_tests.py fits tables for men's and women's ODIs between full members since 2016 (Chapter 5's filter):
Men's ODIs (full members, 2016+): 656 complete first innings of 674; par 268.0; all out 37.2%
wkts_lost 0 1 2 3 4 5 6 7 8
overs_bowled
0 268.0 - - - - - - - -
10 247.7 224.8 204.7 172.4 - - - - -
20 215.3 197.5 183.3 165.2 132.9 102.9 - - -
25 - 179.6 165.5 147.9 130.7 102.1 77.0 - -
30 - 161.5 146.0 132.6 116.3 99.9 76.8 - -
40 - - 94.0 92.1 81.1 72.9 61.0 44.7 -
45 - - - 54.8 50.7 46.0 41.1 32.8 26.3
price of a wicket at 10 overs (real wickets mix): 24.7 runs
price of a wicket at 25 overs (real wickets mix): 19.5 runs
price of a wicket at 30 overs (real wickets mix): 17.1 runs
price of a wicket at 40 overs (real wickets mix): 11.3 runs
value of a dot ball, 3 down, start of over 11 / 31 / 46: -0.17 / -0.45 / -1.56
Men's ODI par is 268.0; women's, 228.4 (420 innings; 41.2% all out). A wicket costs about 24.7 runs at ten overs and 19.5 at 25 — two to three times the T20 price at the same stage, because there is so much more innings left to lose. Chapter 5's regression put the ODI price at 20.7, 19.1 and 10.1 runs at 10, 25 and 40 overs; the table says 24.7, 19.5 and 11.3. In ODIs, unlike T20, the two methods agree closely in the middle of the innings — the selection effect matters less when the remaining innings is long enough for conditions to average out. The women's ODI prices are similar: 26.0, 17.1, 14.9 and 9.5 runs at 10, 25, 30 and 40 overs.
The dot ball tells the format story most sharply. Three down at the start of the 11th over, an ODI dot costs 0.17 runs — barely anything; at the start of the 46th, 1.56. In T20, the same three-down dot costs 0.90 at the start of over 11. ODI batters can afford to wait in a way T20 batters cannot, and the table puts a number on how much.
Put T20 and ODI on a common clock — the share of the innings' overs already bowled — and the resources tell you how the formats differ:
Resources remaining (% of par) at the same FRACTION of the innings, 2 and 5 wickets lost:
share of overs bowled T20 men 2 down ODI men 2 down ODI women 2 down T20 men 5 down ODI men 5 down ODI women 5 down
0.2 75.0 76.4 71.3 43.1 43.3 38.9
0.4 63.7 68.4 66.2 42.3 38.4 38.9
0.5 56.9 61.8 60.8 39.1 38.1 38.6
0.6 48.8 54.5 54.5 36.3 37.3 35.1
0.8 28.3 35.1 35.9 23.6 27.2 27.2
0.9 15.3 20.6 19.8 13.6 17.2 17.0

📊 Figure (described): Resources remaining (% of par) against the share of overs bowled, for T20 (blue) and ODI (orange) at 0, 3 and 6 wickets down. With wickets in hand, the ODI curves sit above the T20 curves through the middle of the innings — an ODI side with wickets in hand still has much of its innings' value to come — and the gap closes near the end. With six down, the two formats' curves nearly coincide: once the tail is exposed, the format hardly matters.
Two down at the 80% mark, a T20 side has 28.3% of its resources left; an ODI side, 35.1%. ODI innings are more back-loaded: wickets in hand are a larger share of what remains, because there is time to convert them into a late acceleration. That is why "keep wickets for the last ten overs" is ODI orthodoxy and "the last five overs" carries the same weight in T20 only when the wickets are still there. The DLS method (Chapter 23) uses the same resource curves for both formats, cut at different points; this table suggests why that works — and where the T20 shape might differ.
Tests: the state space breaks
Imran: Run your table on a Test match and tell me what "balls left" means on the first morning.
Nusrat: About 2,700, if there's no rain and nobody's bowled out.
Imran: And nobody bats as if that's the number. The first-innings target in a Test isn't "as many runs as possible". It's "enough runs, quickly enough, to leave time to bowl them out twice". You declare. You have the new ball at 80 overs. The pitch is different on day four. And the result can be a draw, which your table doesn't have a column for.
Imran is right, and the data show why. In men's Tests between full members since 2016, 430 first innings: 82.3% ended all out and 17.0% were declared; the mean total was 330.0 and the mean length 97.8 overs. Here are the runs still to come by wickets lost and overs already bowled:
Test first innings: mean runs still to come by wickets lost (rows) and overs already bowled (cols); cells with 30+ innings
overs_band 0-30 30-60 60-90 90-120 120+
wkts_before
0 330.0 325.4 - - -
1 296.5 309.6 - - -
2 256.1 273.9 263.4 - -
3 210.5 221.0 223.5 184.1 -
4 163.2 167.1 178.0 157.2 -
5 121.0 122.9 129.7 125.8 104.6
6 64.4 81.7 88.5 88.6 77.0
7 - 45.1 58.0 60.1 55.4
8 - 30.2 33.9 33.3 34.6
9 - 15.1 16.7 13.9 13.2
Read across any row and the numbers barely move: three down, the runs still to come are 210, 221, 224 and 184 whether 15, 45, 75 or 105 overs have been bowled. The correlation between overs bowled and runs to come, three down, is −0.083 across 642 innings. In a Test first innings, the "balls left" axis has almost disappeared; wickets are nearly the whole resource. The 90–120 column dips because some of those innings are being declared — the side stops batting by choice, which no runs-to-come table should treat as running out of resources.

📊 Figure (described): Mean runs still to come (vertical) against wickets lost (horizontal) in Test first innings since 2016, one line each for 0–30, 30–60, 60–90 and 90–120 overs already bowled. All four lines fall from about 330 runs with no wicket down to about 15 with nine down, and lie nearly on top of one another: in Tests, how many wickets are left tells you almost everything; how many overs have gone tells you almost nothing.
So the right Test state is not (balls left, wickets left). It is something like (wickets left in this innings, time left in the match, the lead or deficit, which innings it is, the age of the ball, the state of the pitch) — and the objective is not runs but a three-way result: win, draw or lose. That is a different, richer state space, and the book builds pieces of it in Chapter 29 (pitch deterioration and session forecasts) and Chapter 33 (when to declare). The lesson of this section is the one Chapter 5 taught with different evidence: the three formats need three frameworks, and a tool that is exactly right for one can be meaningless in another.
🔄 Check your understanding
- A wicket at 25 overs in an ODI costs about 19.5 runs; at 10 overs in a T20, about 7.4. Is a wicket "more important" in ODIs?
- Why do the table and Chapter 5's regression agree well in ODIs but not in T20?
- Give two reasons a runs-to-come table is the wrong lens for a Test first innings.
Answer
- In runs, yes; in proportion, less so: 19.5 is about 7% of an ODI par of 268, while 7.4 is about 4.4% of a T20I par of 169. The resource view (% of par) is the fairer comparison across formats, and it shows wickets matter more in ODIs through the middle overs, when much of the innings is still to come.
- The disagreement comes from selection: early in a T20 innings, wickets lost and runs scored both signal the conditions, and the regression mixes those signals. With 25 overs left in an ODI, the remaining innings is long enough that the conditions signal in "runs so far" is a smaller part of what happens next; the methods converge.
- There is no fixed ball budget (the clock is the match, not the innings), so balls left carries almost no information; and the side's objective is not to maximise runs but to win, which involves declaring, leaving time to bowl, and avoiding defeat when a draw is available — none of which a runs-to-come table represents. (Also: the second new ball at 80 overs and pitch wear change the scoring environment within an innings.)
19.10 What the state space can't see
Every tool in this chapter rests on one simplification: the future depends on the present only through (balls left, wickets left). Here is what that throws away, in rough order of importance.
- Whose wickets. "Seven wickets in hand" means the openers have gone in one innings and the whole middle order in another. The table describes the league-average batting order. A side with genuine depth — or none — is better or worse off than the table says, and that difference can be 20 runs. The fix is to make the batters part of the state; Chapter 30's batting-order simulator does exactly that with this module's simulator.
- Conditions. The pitch, the ground, the dew, the attack. They push every ball of an innings in the same direction, which is why the plain chain's totals were too narrow (31 runs of spread against a real 38) and why the table's differences mix "what a wicket does" with "what kind of innings loses that wicket". A venue-adjusted table (Chapter 22) or an innings-level tilt estimated from the first few overs (Chapter 27) puts some of that back.
- Who is bowling. A side with Bumrah's two overs still to come at the death faces a different 12 balls from one with its fifth bowler. The state has no column for the bowling resources left; Chapter 31's bowling-plan optimiser does.
- The chase. Everything here is first-innings. In a chase the target is part of the state, and win probability is the currency — Chapter 20.
- Small samples and changing eras. A table resting on 281 innings has noisy differences; a table from the wrong era is centred in the wrong place. Borrow shape from a large pool, refit the level often, and check calibration on recent data.
- The Markov property itself. A new batter's first few balls are harder than a set batter's (Chapter 12 measured the settling-in effect); a bowler on a hat-trick, a side on a run of dots. Those are memories the state does not have. The evidence of §19.4–19.6 is that, averaged over thousands of innings, they matter less than the two big state variables — which is why the chain reproduces par to a tenth of a run — but in a single over they can matter a great deal.
None of these makes the state space wrong. Each says what to add next. That is the right relationship with a model: know what it ignores, measure how much that costs, and decide whether it matters for the question in front of you.
🔷 R corner (not run in this book's build): the counting step of the Expected Runs table in dplyr, assuming a data frame
stateswith one row per delivery and columnsmatch_id,balls_left,wkts_left,runs_to_come,completeandfirst_in_state.
r library(dplyr) er_raw <- states |> filter(complete, first_in_state, balls_left >= 1, wkts_left >= 1) |> group_by(wkts_left, balls_left) |> summarise(n = n(), er = mean(runs_to_come), .groups = "drop")The smoothing and isotonic shaping can be done with base R's
ksmoothandisoreg(unweighted) or theIsopackage.🔄 Check your understanding
- A broadcaster's projection says a side 100 for 2 after 12 overs will make 180. The side's two best hitters are out and a long tail is to come. Which limitation of the state space applies, and in which direction is the projection likely to be wrong?
- Why does the Markov chain reproduce the par total almost exactly even though the Markov property is false?
Answer
- "Whose wickets": the table assumes a league-average batting order behind the two dismissed batters. With the best hitters gone and a long tail, the true expectation is lower than the table's, so the projection is probably too high.
- The violations of the Markov property (momentum, settling in, specific batters) push individual innings up or down but largely average out across thousands of innings; par is an average, so it is reproduced well even when individual innings are not. The omissions show up in the variance — the plain chain's spread was too narrow.
Spaced Review
Before reading each answer, try the question.
From Chapter 5 (The Three Formats). Chapter 5 estimated a "price of a wicket" by regressing the final total on runs and wickets at a checkpoint. What single number did that regression produce for men's T20Is at ten overs, and what assumption about the price did the method build in? — About 5.3 runs, and one price for every wicket at that checkpoint, whether the side was nought down or six down. This chapter's table shows the price at halfway ranges from about 3.6 runs (nought down) to over 14 (six down), and explains why a regression on the same innings gives a smaller average: runs-so-far soaks up part of the conditions signal.
From Chapter 6 (Statistical Thinking). Twelve deliveries in "over 3, five down" produced no wicket. What would Chapter 6 tell you to do with that zero? — Shrink it. A rate estimated from twelve trials is mostly noise; partial pooling towards a similar, better-measured group gives a far better estimate. The Markov chain did exactly that, pooling towards the same over with a band of similar wicket counts, and turned 0.000 into 0.052 per delivery.
From Chapter 9 (Batting Impact and Context). WP v0 was built by "count, smooth, shape". Name the shaping rules for a chase win-probability table, and compare them with this chapter's rules for expected runs. — For a chase: more runs needed never helps, more balls left never hurts, more wickets in hand never hurts. For expected runs: more balls left never means fewer runs, and more wickets left never means fewer runs. Both tables fix the same disease — noisy, sparse cells that break rules the game obeys — with the same cure. And both needed era-specific versions for the IPL from 2023.
Project Checkpoint: states.py
Nusrat's Crease project gets its engine room this chapter. Until now, every Crease module measured something that had happened: a batter's strike rate, a bowler's economy, a chase's win probability from a lookup table. states.py is the first module that models how an innings unfolds — and four later chapters import it.
Its public interface (full docstrings in project/crease/states.py):
load_innings(codes, n_overs=20, since=None, until=None, full_members_only=False, innings=1) -> (balls, games)
innings_states(balls, n_balls=120, innings=1) -> DataFrame # pre/post-ball state for every delivery
ERTable(n_balls=120, backstop="markov").fit(states) # count, smooth, shape, anchor
.predict(balls_left, wkts_left) .resource(balls_left, wkts_left) .par .to_frame(...) .raw_frame(...)
MarkovInnings(n_balls=120).fit(states) # per-ball transitions by (over, wickets lost)
.probs(over, wkts_lost) .summary_table() .expected_runs() .simulate(n, score, balls_left, wkts_left, tilt_sd)
fit_tilt(model, real_totals, grid) # match the real spread of totals
fit_tables(states, key, n_balls=120, shape_from=None) # one table per era / competition
rescale_table(base, par) # a big pool's shape at a thin era's level
run_value_dot(er, u, w) run_value_wicket(er, u, w) outcome_value(er, u, w, runs, wicket, legal)
run_value_grid(er, overs_bowled, wkts_lost, min_weight)
ball_values(states, er) ball_values_grouped(states, tables, key)
xra_table(valued, by="batter" | "bowler", min_balls=0)
The demo code/project_checkpoint.py fits the hybrid table on men's T20 first innings before 2023 with the Newlands match (Anchor A, South Africa v Sri Lanka, 25 January 2017) held out, then reads South Africa's innings from that match:
Hybrid ER table: 5,254 innings, par 158.6
after 10 overs, 1 down: ER 94.3 runs to come, resources 59.5%, wicket costs 4.5, dot costs 1.10
after 15 overs, 3 down: ER 51.2 runs to come, resources 32.3%, wicket costs 2.9, dot costs 1.35
after 15 overs, 5 down: ER 44.5 runs to come, resources 28.0%, wicket costs 6.1, dot costs 1.05
South Africa at Newlands after 15 overs: 119/3; table projects 170.2; simulated median 171, 80% interval 155-189; actual 169
South Africa 169/5: total minus par +10.4
name balls runs strike_rate xra
AB de Villiers 44 63 143.18 9.92
M Mosehle 15 32 213.33 6.50
RR Hendricks 34 41 120.59 2.67
JT Smuts 14 19 135.71 -0.17
WD Parnell 3 3 100.00 -1.58
F Behardien 6 6 100.00 -4.18
DA Miller 4 1 25.00 -6.78
name balls runs wickets xra
PADLR Sandakan 24 23 1 7.57
S Prasanna 18 21 1 3.20
DAS Gunaratne 24 34 1 0.98
KMDN Kulasekara 24 30 1 0.37
ST de Silva 6 10 0 -4.90
I Udana 24 49 0 -15.61
South Africa's 169 for 5 was 10.4 runs above the pre-2023 men's T20 par of 158.6 — the table's way of saying "a good first innings, not a great one". At 119 for 3 after 15 overs the table projected 170.2 and the chain's median was 171; they made 169. AB de Villiers' 63 off 44 added +9.9 runs, Mosehle's late 32 off 15 +6.5; David Miller's 1 off 4 cost −6.8. Among Sri Lanka's bowlers, Lakshan Sandakan's 4 overs for 23 and a wicket saved 7.6 runs; Isuru Udana's 49 off his four cost 15.6. Chapter 9 told you who won Newlands; this tells you who set it up.
Nusrat's note in the project log is short: "Everything that asks 'what happens next?' now calls states.py." Chapter 20 will use ERTable and the chain's simulated totals for its first-innings win probability; Chapter 23 will turn ERTable.resource into a DLS-style resource table; Chapter 27 will run MarkovInnings.simulate live, ball by ball; and Chapter 30 will replace "wickets in hand" with real batting orders inside the same simulator.
Chapter Summary
| Idea | Definition / formula | Key number from this chapter |
|---|---|---|
| State | (u legal balls left, w wickets left) before a delivery | 1,200 T20 states; 1,059 ever visited, 639 by 300+ innings |
| Expected Runs ER(u, w) | mean runs still to come from the state, complete first innings | men's T20 par 159.5; 2 down at halfway 90.8 |
| Par | ER(120, 10) or ER(300, 10) | IPL 163.4 (2008–22) → 190.3 (2023–26); women's T20 125.3; ODI men 268.0, women 228.4 |
| Resources remaining | 100 × ER(u, w) / par | IPL eras differ by 11.0 runs but 1.2 resource points per state |
| Markov innings model | per-ball outcome probabilities by (over, wickets lost), shrunk | par reconstructed 159.4 v 159.5; well-visited states within 1.9 runs |
| Innings tilt | per-innings scoring environment, θ ~ N(0, tilt_sd) | spread 31.1 → 39.1 (real 38.3) at tilt 0.08 |
| Run value | r + ER(after) − ER(before) | IPL 2023–26 six: +4.97 / +4.78 / +4.14 by phase |
| Price of a wicket | ER(u−1, w) − ER(u−1, w−1) | T20 first ball 13.5; halfway (2 down) 6.6; over 20 ≈ 0; ODI 25 overs 19.5 |
| Value of a dot | ER(u−1, w) − ER(u, w) | T20 3 down: over 5 −0.42 → over 20 −2.02; ODI over 11 −0.17 |
| xRA | Σ ball values credited to batter / bowler | Klaasen +279.7, Bhuvneshwar +212.5 (IPL 2023–26, first innings) |
A decision framework for using state-space tools
- Which format and which innings? Limited-overs first innings → expected runs. Chases → win probability. Tests → a different state space (time, lead, innings).
- Which table? Fit on matches like the ones you are judging: same competition, same era, same level. If the era is thin, borrow the shape of a large pool and the level of the era.
- Has it been shaped? Never take differences (run values) from a raw table. Count, smooth the rate, shape, anchor — or use the hybrid.
- Average or distribution? For "what total?" use ER; for "how likely is 200?" simulate — with an innings tilt, or your intervals will be too narrow.
- Is it calibrated? Check the projection and its intervals on recent, held-out innings before you trust it on a broadcast or in a meeting.
- What can't it see? Whose wickets, which bowlers, what conditions. Say so, and let the eye test fill the gap.
What's Next
The expected-runs table answers "how many runs from here?" for the side batting first. Chapter 20 asks the question that decides matches — "who wins from here?" — and replaces Chapter 9's lookup table with fitted models of win probability for both innings, using this chapter's tables to turn a first-innings state into a chance of winning. Its threshold concept is calibration: a probability is only as good as its record of coming true.