Part IV — Match and Team Analytics
Narendra Modi Stadium, Ahmedabad, 29 May 2023: the IPL final. Chennai Super Kings won the toss and chose to field. Gujarat Titans made 214 for 4, the highest total in an IPL final, with B Sai Sudharsan's 96 off 47 at its heart. Chennai's chase had lasted three balls, 4 for 0, when the rain returned. When play resumed the chase had been cut to 15 overs, and the DLS target was 171. Chennai got there off the very last ball: Ravindra Jadeja, needing 10 from two balls against Mohit Sharma, hit a six and then a four.
Now count the decisions that shaped that night without a bat or a ball. A captain chose to field after winning a coin toss. Two selection meetings chose the players. A model put a probability on the screen at every ball. And a rain rule turned "30 balls lost with no wicket down" into a number of runs. None of that shows up in a batting or bowling record, and all of it is a question this part answers with data.
Here is a taste. Build a resource table from 8,908 real men's T20 first innings, as Chapter 23 does, and apply it to that stoppage. It says the 30 lost balls held 17.53% of a T20 innings and sets a target of 177, not 171. A table fitted only on IPL innings played before the final says 175. On either number, Jadeja's finish leaves Chennai short. Was the official target wrong? Not quite. Chapter 23 shows that a defensible alternative disagrees with the official method by a few percent, nearly always in the same direction, and it is honest about where the evidence can't say which is right.
Ahmedabad will keep turning up. Three of the next five chapters open at this ground, and a fourth returns to this very night in a case study.
What this part argues
Parts II and III asked what a batter, a bowler and a fielder contribute. Part IV steps back to the match and the team: where a game stands, who is winning, who should play, what the ground and the coin are worth, and what to do when it rains. It makes five claims:
- A scoreboard is a position, not a score. What matters for everything that happens next is the state of the innings: legal balls left and wickets left. Expected runs, win probability and rain targets are all built on that one grid of states.
- A probability is a promise about frequencies. You can't check a win probability on one match. You check it by pooling many forecasts and counting, on matches the model never saw.
- Value players in one currency, then let the constraints choose. Once batting, bowling and fielding are priced in runs above replacement, the count of bowlers in an XI matters far less than who they are, and a rule change can move the price of a skill overnight.
- Non-player factors are small in white-ball cricket and large in Tests. The toss, the ground, the evening slot and home advantage mostly don't move T20 results. In Tests, where the home side picks the pitch and the pitch wears for five days, they predict results on their own.
- A fair rain rule measures overs and wickets together. The shape of the resource curve is stable across eras, which is why the idea works. Borrowing one format's shape for another is where it goes wrong.
The part comes after batting and bowling because it reuses what they built. Chapter 9's win probability and Win Probability Added (WPA) are the starting point for Chapter 20. Chapter 14's wicket values, Chapter 17's playing XIs and inferred keepers and Chapter 13's replacement level all go into Chapter 21's selection model. Chapter 6's shrinkage turns up everywhere. And it comes before Part V, because pre-match models, live forecasts and tournament simulations all start from a calibrated win probability and an honest account of what the toss, the venue and home advantage are worth.
The questions it answers
- Two sides are both 91 after ten overs. Are they in the same position? What is a wicket, a dot or a six worth at each point of an innings?
- How do you build a win-probability model that stays honest when the game changes under it, as the IPL did in 2023? What does "70%" on a broadcast graphic actually promise?
- How many bowling options should an XI carry, and what did the Impact Player rule do to the value of an all-rounder?
- Does winning the toss help? Does choosing to chase? Does evening dew? How much of a "high-scoring ground" is real?
- How should a rain-shortened target be set, and how close does the official method come to one built from the data?
How the chapters build
Chapter 19 — Expected Runs and the State of the Game. Since the start of the 2023 IPL season, seven sides batting first have been exactly 91 after ten overs, and they finished on totals from 155 to 250. The chapter treats the innings as a walk through a grid of states and builds three tools on it: an Expected Runs table from 8,917 complete men's T20 first innings (par 159.5), shaped so that it obeys the rules any such table must; a Markov chain that simulates innings by the thousand; and a currency of run values. A wicket costs 13.5 runs at the first ball, 6.6 at halfway with two down, and almost nothing at the start of the 20th over. Summed, the run values give Expected Runs Added (xRA): Heinrich Klaasen leads IPL 2023–26 first-innings batters at +279.7 and Bhuvneshwar Kumar the bowlers at +212.5. The quietest finding matters most. IPL par rose from 163.4 (2008–22) to 190.3 (2023–26), yet the two eras' tables differ by only 1.2 points of resources per state. That stability is what Duckworth–Lewis rests on.
Chapter 20 — Win Probability Models. Ahmedabad, 9 April 2023: Kolkata need 28 off five balls, and a model that never saw the match gives them 0.0017. Then Rinku Singh hits five sixes. Was the model wrong? The chapter's threshold concept, calibration, answers that a probability can only be judged over many forecasts. WP v1 is trained on 8,939 men's T20 chases from 9,117 matches and scored only out of time. The features matter more than the model family: adding the target, the league's scoring environment and an Elo gap takes the Brier score from Chapter 9's 0.1252 to 0.1143 and cuts the IPL miss from 13.4 points to 7.7. The chapter redraws the Newlands anchor match, where Sri Lanka's "116 for 2 after 15" turns out to be a coin flip (0.503) before Imran Tahir's over took it to 0.191. It ranks IPL 2026 by wins added (Vaibhav Suryavanshi +2.34) and shows that a men's model over-rates women's chasers by about 9 points.
Chapter 21 — Team Composition and Balance. In the 2026 men's T20 World Cup final, New Zealand walked out with four specialist bowling options and three part-timers by pre-match record, and the part-timers went for 83 in 7 overs. The chapter infers roles from each player's record before the match, then finds that an extra bowling option has no measurable effect on winning within a team-season in any of six competitions (IPL −0.0 points, 90% interval −3.5 to +3.5). It prices batting, bowling and run-outs in one currency, runs above replacement: Kohli leads IPL 2024–26 regulars with 653.5 (14.2 a match), and only 5 of 117 add more than a run a match with both bat and ball. A mixed-integer XI optimiser runs on real IPL 2026 squads. Women's cricket reverses the men's scarcity, with 2.32 all-rounders per T20I XI.
Chapter 22 — Toss, Venue, and Conditions. Australia chose to bowl in the 2023 men's ODI World Cup final and won, yet across the 39 matches of that tournament in the data, toss winners won only 17. The chapter uses the toss as a natural experiment: toss winners won 51.1% of 11,050 decided limited-overs matches and 54.2% of 729 decided men's Tests. It separates the random coin from the non-random decision, shrinks IPL venue effects (a ground needs about 75 games before its own record counts as much as the league average), and measures altitude on the Highveld and home advantage from 63.5% in Tests to 53.0% in men's T20Is. Its final test is the decisive one: a model of IPL results from toss, home side, time slot and venue does worse than a coin flip on later seasons, while "pick the home side" calls 61.0% of decided Tests from 2018 to 2026.
Chapter 23 — The DLS Method. Sydney 1992: South Africa need 22 off 13, rain falls for about twelve minutes, and the scoreboard asks for 22 off 1 ball. A resource table fitted to 1,726 men's ODI first innings sets a target of 233, which is 2 off 1. The chapter fits the published Duckworth–Lewis functional form to the book's data (ODI Z₀ 306.4, b 0.0377; T20 b 0.0532, a faster clock), applies the Standard Edition's rules to every kind of interruption on real matches, and tests the two loudest critiques. A natural experiment, innings in matches shortened before the first ball, shows a T20-fitted table predicting short T20 innings almost exactly (ratio 1.003), while a 50-over shape cut to 20 overs under-predicts them by 3.7%. Then it sets its own target for every clean rain-shortened chase in the data and compares it with the official one.
What you build: Crease's match and team modules
| Chapter | Module | What it gives you |
|---|---|---|
| 19 | states.py |
Innings states, the shaped Expected Runs table, the Markov innings simulator with tilt, run values, the price of a wicket and a dot, xRA |
| 20 | winprob.py |
WP v1 with past-only environment and Elo, first-innings WP via par, WP curves, turning points, WPA, calibration diagnostics |
| 21 | selection.py |
Pre-match roles, runs above replacement, the XI optimiser, marginal values, the all-rounder premium, the price of a sixth bowling option |
| 22 | venue_toss.py |
Toss and decision tables, inferred IPL time slots, shrunk venue effects and run factors, inferred home teams, venue-neutral strike rates |
| 23 | resources.py |
The fitted D/L form, resource tables from any expected-runs model, Standard-Edition target revision, every rain match classified |
states.py is the foundation: winprob.py uses its table to price the first innings, resources.py
turns the same table into percentages, and the innings simulator in
Chapter 27 runs on its
Markov chain. winprob.py is Crease's main engine. It plugs into Chapter 9's WPA functions, gives
Chapter 24 its
probability at ball zero, prices bowling decisions in
Chapter 31 and
becomes prices in
Chapter 35.
selection.py feeds the batting-order and auction work of
Chapter 30 and
Chapter 34.
venue_toss.py supplies the venue and home terms that Chapter 24 tests and the Test simulator in
Chapter 29
needs. resources.py gives Chapter 27 a live "par at this point" and becomes the rain calculator on
the Chapter 39 dashboard.
What overturns conventional wisdom
- In the IPL, the decision after the toss carries no information. Chasers who chose to chase won 54.7%; chasers who were sent in also won 54.7%. Chasing has been a small edge in the IPL, but the captain's call adds nothing to it. The PSL is the exception (59.8% against 45.3%).
- No dew advantage shows up in the results. In evening IPL games (inferred from match order on double-header days, since the data carry no clock) captains chose to field 14.4 points more often. Yet evening chasers won less often: 51.2%, against 55.6% in the afternoon.
- The Impact Player rule halved the all-rounder premium. Across IPL 2026 squads, the value of having a player's batting and bowling in one shirt fell from 0.70 to 0.35 runs a match, and the price of a sixth bowling option from 1.29 to 0.41. Top-order batters' share of IPL overs fell from 26.4% to 18.5% while men's T20Is moved the other way.
- A brilliant ball-by-ball model can be a lookup table in disguise. Split the balls of the same matches at random between training and testing, and a flexible boosted model scores a Brier of 0.0185. Split by match and it scores 0.1933, close to guessing. That is leakage, WP v1's most transferable lesson. Out of time, plain logistic regression also beats boosting, because trees can't extrapolate to scoring environments above anything in their training years.
- The book's rain tables would have asked for more, nearly every time. In 70 clean rain-shortened chases, the book's own-format table would have set a higher target than the official one in 67 and a lower one in none, by a median of 6 runs (4.6% of Team 1's score). In men's T20 the natural experiment backs the book's table. In men's ODIs it doesn't (ratio 0.96), so the honest verdict is mixed.
- "D/L undervalues wickets in hand" is wrong as usually stated, and right in one place. On full-length innings the fitted curve separates "50 for none" from "50 for four or five" at least as sharply as real innings do. What fails is the borrowed shape: a 50-over curve used for T20 is within 2.2 resource points on average but up to 8 points off for a side that has lost early wickets.
Learning paths through Part IV
🏏 Fan Track: This is the part that changes how you watch. Read Chapter 19's hook, §19.1, §19.5, §19.7 and §19.9; Chapter 20's §20.1, §20.6 (calibration) and §20.9 (the Newlands curve); Chapter 21's hook and §21.5–21.7; Chapter 22's §22.1–22.3 and §22.8; and Chapter 23's §23.2, §23.5 and §23.8. Skim the code; the prose restates every number.
📊 Analyst Track: Read and run everything. The heaviest modelling is Chapter 19 §19.3–19.4 (the table and the Markov recursion) and Chapter 20 §20.3, §20.5 and §20.7 (leakage, logistic against boosting, the era test). Chapter 21 §21.4 introduces integer programming. Chapter 22 §22.10 and Chapter 23 §23.6 show how to test a model on the cases it will actually face.
🎰 Betting Track: Chapter 20 §20.4–20.7 is your core: scoring rules and calibration by league. Add Chapter 19 §19.6 for distributions of totals, Chapter 22 §22.1, §22.4, §22.6, §22.8 and §22.10 (markets move on the toss; this says how much they should), and Chapter 23 §23.5 and §23.8, where a revised target is a new line set mid-market.
🏆 Fantasy Track: Chapter 21 §21.3 shows who scores in two ways, and §21.6 why fewer of them now bowl their overs in the IPL. Chapter 22 §22.6 and §22.9 say how much a ground really adds. Treat Chapter 20's WPA leaderboard as the story of a season, not a forecast.
🧑💼 Franchise Track: Read Chapter 19 §19.5, §19.7 and §19.8 (the exchange rate behind "should he have taken that risk?"), Chapter 21 §21.3–21.6 closely, Chapter 22 §22.3, §22.6, §22.9 and Case Study 1, and Chapter 20 §20.10 with its warning about reading season WPA as skill.
Before you begin
- [ ] Your earlier Crease modules run, especially
impact.py(Chapter 9), whose WPA functions WP v1 plugs into,bowling.py(Chapter 14) andfielding.py(Chapter 17). - [ ] The raw Cricsheet JSON archives are in
data/raw/. Chapter 21 reads playing XIs from them, because the delivery tables don't list players who neither batted nor bowled. - [ ] Chapter 20's Elo feature uses
elo_walk_forwardfrombetting.py, which is already in yourproject/crease/folder. You don't need to have read Chapter 35. - [ ] Learn the filters before comparing numbers across chapters. Expected Runs tables use complete first innings only. Win-probability models use 20-over, decided matches with no rain revision. "Decided" removes ties, no-results and Test draws.
- [ ] Cricket notation is not decimal: 34.3 overs is 207 legal balls.
resources.overs_to_balls()converts it. - [ ] Budget time: Chapter 19's simulation takes about half a minute, Chapter 20's first two scripts
about a minute each, and Chapter 21 about two minutes in all. Run Chapter 21's
02_player_value.pybefore03_xi_optimiser.py. - [ ] Refresh shrinkage from Chapter 6 and WP v0 from Chapter 9, and keep Appendix C, Appendix D and Appendix E to hand.
Chapters in This Part
- Chapter 19 — Expected Runs and the State of the Game: Resource Tables, Markov Chains, and the Mathematics of an Innings
- Chapter 20 — Win Probability Models: Building the Curve That Tells the Story of Every Cricket Match
- Chapter 21 — Team Composition and Balance: How Many Batters, How Many Bowlers, and the All-Rounder Premium
- Chapter 22 — Toss, Venue, and Conditions: How Much Do Non-Player Factors Actually Affect Match Outcomes?
- Chapter 23 — The DLS Method: Understanding (and Critiquing) the Rain Rule That Decides Interrupted Matches