Chapter 11 Notes — Batting Matchups

Chapter link: Chapter 11

Overview and learning objectives

Chapter 11 takes the most popular graphic in cricket broadcasting, "batter v bowler", and shows that most of it is noise. The hook is the 2019 Ashes: Warner made 95 runs in ten innings and Broad dismissed him 7 times in 104 balls. Across the whole Test snapshot, though, Warner v Broad is 862 balls and 17 dismissals, and in the 2015 and 2017 series it was 285 balls without a single dismissal. From there the chapter moves down the hierarchy. Head-to-heads (261,942 pairs in the men's T20 pool, median 5 balls) give way to bowling types (six groups from the styles table), then to league hand × type cells, then to a three-level empirical-Bayes model that shrinks each batter's record toward an expectation. The model is tested out of sample (2015–20 → 2021–26) and used to settle the book's Anchor D: Quinton de Kock against off-spin, 1,226 balls, raw SR 112.9, shrunk 115.5 (90% 108.5–122.4) against an expected 125.8. The chapter then reads the 2026 men's T20 World Cup semi-final sheets, covers women's matchups and the bowler's end, and closes with what the model cannot see. The Crease module is matchups.py.

By the end of the chapter students should be able to:

  1. Explain why head-to-heads are the smallest sample in cricket and read a funnel plot with a luck band (per-ball SD 162.4, league SR 125.9).
  2. Describe the league hand × type map. The two big effects are left-handers v off-spin (116.1, index 87.9) and right-handers v left-arm orthodox (117.8, index 89.2).
  3. Compute a shrunk matchup with n ÷ (n + k), using k_sr = 303 and k_dr = 1,956 for men, and explain why the dismissal constant is so much larger.
  4. Interpret an out-of-sample comparison: raw 403.7, ignore matchups 220.3, k ≈ 300 207.7, noise floor 106.5.
  5. Separate an absolute weakness from a relative one using the league-cells SR (de Kock 112.9 against an average left-hander's 120.9 on the same balls; Klaasen's "weakness" at a raw 153.9).
  6. Build a pre-match sheet using only data from before the match, and state its honest effect size (about 0.6 runs an over for Anchor D).

Where students struggle

  • "He's got his number." Students trust dismissal counts more than anything else. Exercise B8 (4 dismissals in 38 balls, expected 1.75, Poisson P ≈ 0.10) is the fastest cure.
  • Containment versus wickets. Left-handers v off-spin score slower and last longer (22.7 balls per dismissal against 19.7 overall). Students assume a matchup means wickets. Anchor D is a scoring matchup: shrunk balls per dismissal 24.1 against an expected 24.4.
  • Leave-one-type-out. Why measure a batter's skill on the other types? If you include the target type, the weakness drags down the baseline it is measured against (Exercise A5). The side effect is that strengths and weaknesses partly mirror each other within a batter (de Kock +15.8 v right-arm pace, −10.4 v off-spin). Always show the league-cells SR as well.
  • Why k_dr is so large. Dismissals are rare (about one per 21–22 balls), and the true spread of dismissal effects is small (SD 0.0047 on a mean of 0.0461). Students need the intuition before any formula.
  • Joining on names. The §11.2 pitfall shows how a name join gives every "Rashid Khan" the Afghan's leg-breaks. Make students pin players by registry id.
  • Look-ahead. Students rebuilding the semi-final sheets will happily use data from after 4 March 2026. Exercise A9 names the error.
  • Relative weaknesses. Klaasen at −14.1 against right-arm pace still scores 153.9 there.

Pacing

50-minute session. - 0–8: Warner–Broad hook; ask whether Broad "owned" Warner, then reveal 2015+2017 (285 balls, 0 dismissals). - 8–18: §11.1 funnel, and why a dismissal count is the noisiest statistic. - 18–28: League map and the decomposition; the productive struggle on de Kock's strike rates. - 28–40: Shrinkage and the out-of-sample test; the extreme-arrows figure (Shepherd v left-arm wrist-spin, 64 balls at 62.5 → shrunk 107.5). - 40–50: Anchor D card and the Eden Gardens over.

75-minute session. Add the bowler's end (§11.7, 10 minutes: off-spin median handedness gap −12.2, left-arm orthodox +20.0, Narine +2.6) and a 15-minute demo. Lab: 45 minutes. Each script takes about 15–20 seconds. On Windows consoles set PYTHONIOENCODING=utf-8 before running, because some output lines contain dashes the console can't print otherwise.

Lecture outline

  1. Warner–Broad: the most dismissals of any Test pair since December 2001; one series' 7 in 104 balls against 0 in 285 before it.
  2. Head-to-heads: 261,942 pairs, median 5 balls, only 677 pairs with 60+ balls; 88.2% of pairs with 12+ balls fall inside the 95% luck band. Repeat r 0.275; against the same-type record, 0.181 (roughly a third of the repeatable part is the type).
  3. Types: six groups; coverage limits (pool 52.2% of balls have both type and hand known; IPL 93.5%, men's T20Is 34.2%).
  4. The league map and when each type bowls (leg-spin 78.4% in the middle overs; off-spin 28.3% in the powerplay; left-arm pace 47.2% in the powerplay).
  5. Three-level model: league cell → batter skill on other types → shrinkage. The run value uses a 6-run wicket cost (Chapter 4's IPL halfway price).
  6. How much real variation exists: τ_sr 9.54 SR points; raw SD of effects 14.9 → shrunk 7.1.
  7. Out-of-sample: shrinkage beats raw by a lot and "ignore matchups" by a little. k ≈ 300 removes about 11% of the reducible error (Exercise B4).
  8. Anchor D: sample size, absolute check, era stability (11–17 points short in each of four eras), breadth (57 off-spinners).
  9. Eden Gardens, 4 March 2026: McConchie's over 2 removed de Kock (10 off 8) and Rickelton (0). The pre-match sheet (data before 4 March) had de Kock v off-spin at −9.7. One over is one data point.
  10. Women's matchups: different type mix (off-spin 23.3% of known balls v 11.9% in the men's pool) and the Shafali Verma card.
  11. What the model cannot see: captains' choices, venues, unknown bowlers.

Live coding demo

Script: code/04_anchor_matchup.py.

  1. Run it unchanged. Expected header: Q de Kock, men's T20 pool 2015-2026 (k_sr = 303, k_dr = 1956). Off-spin row: 1,226 balls, 1,384 runs, 52 dismissals, sr_obs 112.9, sr_exp 125.8, sr_shr 115.5 (108.5–122.4), d_sr −10.4. Right-arm pace row: 2,647 balls, 153.5 raw, +15.8. The footer gives runs per over against off-spin: raw 6.77, shrunk 6.93, expected 7.55.
  2. Live change 1: set NAME = "TM Head" and rerun. The chapter's sheet gives Head's shrunk effects as −9.0 (off-spin) and −11.8 (leg-spin). Case Study 1 shows his leg-spin cell splits into two very different eras.
  3. Live change 2: replace K["k_sr"] in the shrink_matchups call with a literal 0 (raw) and then 3000 (almost all prior). Ask students what each extreme amounts to. Zero means "trust the matchup app"; 3000 means "ignore matchups". Link this to the out-of-sample errors (403.7 and 220.3).
  4. Close on the absolute check: what does an average left-hander score on the same balls? (120.9.)

Alternative: code/03_shrinkage.py prints the fitted constants ("balls for half the matchup signal: SR 303; dismissals 1956") and the out-of-sample table.

In-class activity — "Build the sheet"

Use §11.9's Try it. Groups are New Zealand's think tank with Santner and Ravindra (both left-arm orthodox) to bowl eight overs, facing South Africa's Brevis (right-handed) and Miller (left-handed). Give them the league map (right-handers v left-arm orthodox 117.8) and the relevant shrunk cells from the sheet. Each group must (a) decide who bowls to whom in overs 7–14, (b) estimate the gain in runs per over, and (c) name one thing that would make them abandon the plan on the day. Compare plans. Most should land on "a fraction of a run an over".

Answers and teaching notes for key exercises

  • B1. Raw 105.0; weight 180 ÷ 483 = 0.373; shrunk 121.9; effect −10.1.
  • B2. Raw rate 0.0611 (16.4 balls per dismissal); shrunk 0.0464 (21.6); expected 0.045 (22.2). Eleven dismissals moved the estimate by about 0.6 balls per dismissal. That is the heart of "dismissal matchups are mostly noise".
  • B3. 6.93 against 7.55 runs per over, about 0.62 an over, so about 2.5 runs over four overs if de Kock faced every ball. Realistically it is 1–1.5 runs a match.
  • B4. Reducible error 113.8; removed 12.6; 11.1%. Matchups help, modestly.
  • B7. Shafali Verma: 1.44 against right-arm pace and 0.95 against leg-spin. Leg-spin mostly removes her advantage. She is only 5% below an average right-hander on the same balls, so the chapter reads the cell as a largely relative weakness.
  • B8. Expected 1.75 dismissals; P(≥4) ≈ 0.10. Among thousands of pairs, hundreds will show this by luck.
  • D2 (the coach who has "watched de Kock for years"). A strong answer respects the eye, then gives the three pieces of evidence (1,226 balls, all four eras, below an average left-hander) and the honest size of the effect. It finishes by asking the coach for the mechanism. Wendell's "angle" Eye test is a model reply.

Assessment ideas

  • Calculation quiz: a B1/B2 pair with new numbers. Grade on whether students state the weight n ÷ (n + k).
  • Code task: Exercise C1 (boundary/dot split by type for de Kock). It answers whether his off-spin deficit is fewer boundaries, more dots, or both.
  • Prediction exercise: C4 (rebuild the 2026 final sheet with no look-ahead). Grade the process, not whether the cells "came true".
  • Written: D5 (a responsible broadcast graphic). It must show balls and an expected value.

Format, gender and region diversity notes

  • Women's matchups (§11.8) use real data: women's T20Is, WPL and WBBL, 584,065 balls, 57.7% typed. Off-spin is 23.3% of known balls (men 11.9%), left-arm pace only 3.1% (men 15.1%), and left-handers face 17.8% of balls (men 31.4%). The women's k_dr of 2,905 means dismissal matchups are even noisier. Teach Case Study 2 (Shafali Verma and Laura Wolvaardt) alongside the men's anchor rather than as an appendix.
  • Region: the weakness list includes Shoaib Malik (Pakistan), Tanzid Hasan and Mohammad Naim (Bangladesh), and Andre Fletcher (West Indies). Mehedi Hasan Miraz has the extreme off-spin handedness gap (−23.7). Students from these countries will have strong eye-test views; invite them.
  • Afghanistan: Nabi's bowler split covers franchise cricket only, because Afghanistan men's internationals are not in Cricsheet (Exercise A10). Say so whenever Afghan players come up.
  • Format: the chapter is T20-centred with a Test hook. Exercise D1 asks students to transfer the model to Tests, where the dismissal is the scarce resource.

Connections