Chapter 19 Notes — Expected Runs and the State of the Game
Chapter link: Chapter 19
Overview and learning objectives
Chapter 19 opens Part IV and carries one of the book's threshold concepts: the match as a state space. It opens with seven IPL 2023–26 first innings that all stood at exactly 91 after ten overs and finished anywhere from 155 to 250. The claim is that a scoreboard shows a position (legal balls left, wickets left), not a score. On that grid it builds an Expected Runs table from 8,917 complete men's T20 first innings (par 159.5), a Markov chain that rebuilds par (159.4) and simulates innings, and a run value for every delivery, which adds up to Expected Runs Added (xRA). It shows why each IPL era needs its own table (par 163.4 → 190.3), why the shape of the resource curve barely changes when the level does (the basis of the Duckworth–Lewis idea), and why Tests need a different state. The module is states.py, and Chapters 20, 23, 27 and 30 all import it.
By the end of the chapter students should be able to:
- Define the state (u, w), Expected Runs, par, projected total and resources remaining, and explain why the first-innings score is not part of the state.
- Read the Expected Runs table to project a total (e.g. 72 for 3 after ten overs → 72 + 84.1 = 156.1) and compute the price of a wicket and the value of a dot ball from it.
- Explain the four steps that turn the raw counts into the finished table (count, smooth the rate, isotonic shaping, anchor) and why each one is needed (90 "more balls, fewer runs" violations in the raw table).
- Explain why a plain Markov chain gets the mean right but the spread wrong (sd 31.1 v real 38.3) and what the innings tilt adds.
- Use linear weights to judge a batting risk by phase (a powerplay wicket costs −13.87, roughly 2.8 sixes; a death wicket costs −3.95, less than one six).
- Interpret an xRA leaderboard and name its limits: first innings only, the table must match the competition and era, and the opposition must be comparable.
- Explain, using the Test evidence (correlation −0.083 between overs bowled and runs to come, three down), why (balls, wickets) is the wrong state for a Test.
Where students struggle
- "The score is the state." Students keep wanting to put runs on the board into a first-innings state. Use the 91-after-ten hook: the same score led to finals 95 runs apart. Then point out that chase states (Chapter 9) do include runs needed. The objective decides the state.
- Smoothing the rate, not the total. This is the hardest technical idea in §19.3. Draw the last 12 balls on the board (about 24, 12 and 1.5 runs to come) and show why a symmetric kernel at "1 ball left" can only average upwards.
- Isotonic shaping as "fudging". Some students see the 22-innings cell moving from 17.9 to 22.4 as cooking the books. Reframe it: the shaping rules (more balls or wickets never hurt) are certainly true of the game, a cell resting on 22 innings has a standard error of several runs, and the largest adjustment anywhere with 30+ innings is 4.2 runs.
- Selection inside the table. Six down after eight overs signals a hard pitch as well as lost wickets. The same effect explains the 7.4 v 4.4 disagreement with Chapter 5's regression (runs-so-far coefficient 1.36, not 1).
- Tilt moves spread, not centre. Students expect a tilt to "fix" the 2008–22 chain on 2026 data. It cannot: that chain is 14.2 runs low, and tilting only lifts coverage from 59.2% to 62.0%.
- xRA in chases and against weak opposition. Two separate traps. The finisher who calmly completes a chase looks poor on xRA. In women's T20Is, associate bowlers top the all-teams table (Putthawong +413.08) because the table expects more runs than those matches produce.
- Sign conventions. A wicket ball is negative for the batting side; bowling xRA is "runs saved" (bigger is better).
Pacing
50-minute session. - 0–8: The hook table (seven innings at 91 after ten). Students guess the four productive-struggle states before seeing the table. - 8–20: §19.3, the finished table. Reveal 159.5, 90.8, 62.4, 24.5 and compare with the class's guesses. Read across rows at ten and 18 overs. - 20–30: §19.5, eras and resources. IPL 163.4 v 190.3 par; 11.0 runs but 1.2 resource points. - 30–42: §19.7, run values and linear weights; work the "Optimize this strategy" Try-it together. - 42–50: §19.9, the Test table, and the threshold concept read aloud.
75-minute session. As above, plus a 15-minute live coding demo after §19.3 and a 10-minute pass through §19.6 (simulation and the out-of-time test). Lab time: about 45 minutes for the scripts and checkpoint. Most scripts run in seconds. 01_state_space.py takes about 10 seconds and 05_simulate_innings.py about 27 seconds, so start the simulation script before you explain it.
Lecture outline
- Ninety-one for…: same score, seven futures; last-ten-over runs by wickets down (109.7 with none down v 68.1 with 5+).
- The state (u, w): 1,200 states, 1,059 visited, 639 by 300+ innings. Threshold concept.
- Borrowed from baseball: the 24-state run-expectancy matrix, and why cricket also needs a clock.
- Count, smooth, shape, anchor. Reading the finished table.
- The Markov chain: 24 outcome types; transitions from over 16 with four down; the hybrid table (10 pseudo-innings).
- Eras and resources: IPL par +27 runs while the men's pool barely moved. Borrow the shape, take the level.
- Simulation and overdispersion: tilt 0.08; 91/1 v 91/5 (median 204 v 170); out-of-time coverage 73.2%.
- Run values: the wicket price collapses through the innings but rises with wickets lost; a death single is worth −0.72.
- xRA: Klaasen +279.7, Bhuvneshwar +212.5; women's full-member tables; two context pitfalls.
- ODIs (par 268.0) and Tests (the state breaks).
- What the state space can't see.
Live coding demo
Script: code/02_expected_runs_table.py, then project_checkpoint.py.
- Run
02_expected_runs_table.pyunchanged. Expected: the "start of over 11" comparison (two down: n 2,508, raw 91.66, smoothed 91.57, er 90.78; eight down: n 22, raw 17.86, er 22.35). Then the violations line, 90 of 869 for balls and 17 of 760 for wickets. Then the finished table (par 159.5; ten overs, 0–5 down: 99.4, 95.7, 90.8, 84.1, 76.2, 62.4). - Ask the class why the "er" column sits about 0.9% below "smoothed" (the anchor to the mean total).
- Live change 1: switch the shaping off (
ERTable(..., monotone=False)) and print the ten-over row again. Ask students to find a violation. Don't promise specific numbers. The lesson is that a raw table can't be differenced. - Live change 2: in a scratch cell, compute
run_value_wicketat ten overs for 0, 2, 4 and 6 down and compare with the §19.7 grid (3.56, 6.62, 13.64, 14.45). - Close with
project_checkpoint.py. Expected: "Hybrid ER table: 5,254 innings, par 158.6"; South Africa at Newlands 119/3 after 15, table projects 170.2, simulated median 171, 80% interval 155–189, actual 169; de Villiers xRA 9.92, Udana −15.61.
If time allows, 05_simulate_innings.py prints the real-v-chain spread (sd 38.3 v 31.1) and the 91/1 v 91/5 forecasts.
In-class activity: "Should he swing?"
Groups of three get the §19.7 run-value grid and the IPL 2023–26 linear weights. Each group gets one batting scenario: - (a) start of over 16, two down; - (b) start of over 7, four down; - (c) start of over 19, six down; - (d) a powerplay ball with no wicket down.
Task: using the Try-it method (gain = extra-four share × (four − dot); cost = extra-wicket share × (wicket ball − dot)), decide whether turning 6% of dots into fours at the cost of 3% more wickets is worth it. Groups (a) and (b) can check against the chapter's answers (+0.18 and −0.28 runs per ball). Each group reports a decision and one fact about the batters at the crease that would change it. That fact is the "whose wickets" limitation, and it previews Chapter 30.
Answers and teaching notes for key exercises
- B1. (a) 3.7, 6.7 and 13.8 runs for the 1st, 3rd and 5th wicket. (b) 72 + 84.1 = 156.1. Point out the jump at the fifth wicket: the recognised batting is running out.
- B2. Powerplay 13.87 / 4.97 ≈ 2.8 sixes; death 3.95 / 4.14 ≈ 0.95. This single ratio carries the whole case for phase-dependent risk. Ask students to say it in one sentence to a batter.
- B5. SE ≈ 4.7 points; 73.2% is about 1.4 SE below 80%. It suggests slightly over-confident intervals but isn't strong evidence on 71 innings. Use it to reinforce Theme 3 (small samples).
- B7. Klaasen +34.6 and Rohit −31.2 per 100 balls; SEs ≈ 5.6 and 8.9 under the assumed per-ball SD of 1.6. Stress that the SD is an assumption (Exercise C5 checks it). The chapter's own caution about Rohit's 324 balls ("a large part of it is noise") should appear in any good answer.
- B8. ODI late/early dot ratio ≈ 9× v T20 ≈ 2.2×. ODIs reward building and then accelerating; in T20, dots are expensive throughout.
- D3 (Wendell and openers). There is no single right answer. Good answers note that a powerplay wicket really does remove more of the innings' expected runs, so xRA is measuring a real cost and not just being unfair. They also note that the table assumes a league-average batting order behind the opener, which may not hold. Credit students who propose comparing openers only with openers.
Assessment ideas
- A short write-up using the D1 prompt (a 150-word note to a broadcast producer), graded on the correct table for 2027, honest failure modes and no conflation with a chase.
- Code check: the checkpoint output plus one paragraph on South Africa's +10.4 over par.
- Timed question from quiz 21 (130 for 4 after 15 overs in IPL 2026): project a total and critique "par is 190, so we need 12 an over".
- Exercise C2 (projection worm for any IPL 2026 first innings) works as a take-home with a figure and a five-row "biggest deliveries" table.
Format, gender and region diversity notes
- Formats: the chapter is explicitly three-format. Use the ODI dot-ball contrast (0.17 at over 11, 1.56 at over 46) and the Test table (three down: 210.5, 221.0, 223.5, 184.1 across overs bands) so that students leave knowing the tool is limited-overs and first-innings only.
- Women's cricket: the women's T20 pool par is 125.3, yet its resource shape is within 2.2 points of the men's. The full-member xRA leaders are Mandhana (+248.03), Sciver-Brunt (+234.15, the best rate among the established top order at 46.83 per 100) and Wolvaardt (+228.99); Pakistan's Fatima Sana has the highest rate of all (+57.8 per 100). Bowlers: Renuka Singh and Marizanne Kapp. Case Study 2 is the 2025 Women's World Cup final, with India's 298/7 read through the women's ODI table. Teach it as a main case, not an aside.
- Associates and region: the all-teams women's T20I table (Putthawong, Rosine Irera, Bimenyimana, KY Chan) is a fairness lesson, not a ranking. Ask what a fair table for associate cricket would be fitted on. The pool spans twelve competitions on four continents.
Connections
- Chase win probability v0 and count–smooth–shape: Chapter 9.
- Chapter 5's regression price of a wicket and format differences: Chapter 5.
- Shrinkage of thin cells: Chapter 6; new-batter settling cost: Chapter 12; Bowling Runs Saved: Chapter 14.
- Win probability v1 built on
states.py: Chapter 20; venue-adjusted tables: Chapter 22; resource tables and DLS: Chapter 23. - Live simulation: Chapter 27; Test state spaces: Chapter 29 and Chapter 33.
- Batting orders inside the simulator: Chapter 30; bowling resources: Chapter 31.