Imran Qureshi keeps a folder of scorecards that annoy him. The one on top is from Old Trafford, Manchester, in July 2023, the fourth Test of that summer's Ashes. He runs analytics for Headingley Road CC, a county-standard club side in Leeds, forty...
In This Chapter
- 29.1 The Three Clocks of a Test Match
- 29.2 The Raw Deterioration Curve
- 29.3 Untangling the Curve: Pitch, Batters and Survivors
- 29.4 Day Five Belongs to the Spinners — Measured on the Pitch Clock
- 29.5 Weather Without Weather Data
- 29.6 Session-Level Forecasting
- 29.7 The Fourth Innings: Where Pitch, Time and Weather Meet
- 29.8 A Session-Level Forecasting Framework
- Spaced Review
- Project Checkpoint: test_sim
- Chapter Summary
- What's Next
Chapter 29 — Weather, Pitch Deterioration, and Session-Level Forecasting in Test Cricket
Imran Qureshi keeps a folder of scorecards that annoy him. The one on top is from Old Trafford, Manchester, in July 2023, the fourth Test of that summer's Ashes. He runs analytics for Headingley Road CC, a county-standard club side in Leeds, forty miles across the Pennines, and he says this match taught him more about Test forecasting than any model he has built.
Here is the whole match as the ball-by-ball record gives it:
Old Trafford 2023-07-19: Australia v England, result draw, days 5, overs bowled 269.0, unbowled overs 181.0
innings batting_team runs wickets overs_str start_age
1 Australia 317 10 90.2 0.0
2 England 592 10 107.4 90.3
3 Australia 214 5 71.0 198.0
England first-innings lead 275; Australia 214/5 -> still 61 behind
England bowled Australia out for 317, made 592 at a little under five and a half an over, and had Australia five down and still 61 behind. Then the record simply stops. The match is listed as a five-day draw. Five days at the regulation minimum of 90 overs a day is 450 overs. The record holds 269. One hundred and eighty-one overs, two whole days of cricket, were never bowled. Most of the last two days were lost to Manchester rain.
"Look at what isn't there," Imran says. "There's no weather column in this data. Not one. And yet the weather is the most important thing in the match, and you can see it. It's the hole where 181 overs should be."
That hole is the subject of this chapter, together with two other things a Test forecaster has to reason about and a T20 forecaster never does. The first is the pitch. A Test is played on one strip of turf for up to five days. The ball is replaced every 80 overs; the pitch never is. Everybody in cricket "knows" what happens to it: day one is for batting, days two and three are for both sides, and days four and five belong to the spinners as the surface cracks and the rough deepens. Some of that is true and some of it is folklore, and we can test it on 1.7 million legal balls. The second is time. A Test can be won, lost or drawn, and the draw is a real, often rational result. Whether a side can force a result depends on how many overs remain, and that depends on the weather.
Look again at the last column of the scorecard, start_age. Australia's second innings began after 198 overs had already been bowled on that pitch. That number, the overs already bowled in the match, is the pitch clock, and it's the main tool of this chapter. It also shows us a limit. Divide 269 overs by 90 and you get 2.99: on a 90-over-a-day clock, the last ball fell on "day 3". It actually fell on day 4. Cricsheet records how many days a match lasted, but not which ball was bowled on which day, so any day or session we reconstruct is an approximation. Part of the job is to measure how approximate.
By the end of the chapter you'll have built three things. A deterioration model that separates the pitch getting older from the batting getting weaker. A session forecaster that predicts runs and wickets in the next 30-over block. And a fourth-innings simulator that turns target, overs and pitch into P(win), P(draw) and P(loss), and then gets better when we let it rain. We'll come back to Old Trafford in Section 29.6 and ask what the lost overs were worth.
🏏 Fan Track: Read 29.1–29.5 for the cricket arguments (what the pitch really does, whether the morning session favours bowlers, where it rains) and the two case studies. Skim the code blocks; every result is restated in prose.
📊 Analyst Track: Everything, with special attention to 29.3 (three ways of untangling a confounded curve), 29.6 (a session model scored out of sample) and 29.7 (a Monte Carlo simulator scored against a simpler model, which wins).
🎰 Betting Track: 29.5–29.7. Draw prices in Test markets are weather prices and time prices. The simulator's calibration (29.7) is the section to read twice.
29.1 The Three Clocks of a Test Match
The cricket question: when a commentator says "it's day four, the pitch is breaking up", which clock are they reading?
There are at least three, and in a Test they run at different speeds.
- The innings clock. Innings 1, 2, 3 or 4. It tells you whose turn it is and, roughly, how deep into the match we are. Chapter 10 found that top-order batting averages fall from 41.97 in the first innings to 30.20 in the fourth.
- The ball clock. Overs since the current ball was taken, from 1 to 80 and then a new ball. Chapter 16 showed that pace bowlers take a wicket every 46.53 balls in overs 81–90, about 1.23 times the rate you'd expect, because the second new ball is fresh.
- The pitch clock. Overs already bowled in the match on this surface. It never resets.
The innings clock and the pitch clock are related but not the same. A third innings can begin after 120 overs (two quick first innings) or after 260 (two long ones). That variation is what lets us separate them.
📐 Definition — Pitch age. For any delivery in a Test, pitch age = legal balls bowled in the match before that delivery ÷ 6. It's measured in overs and runs from 0 at the first ball of the match. Innings start age is the pitch age at an innings' first ball.
📐 Definition — Nominal day and nominal session. Nominal day = ⌊pitch age ÷ 90⌋ + 1. Nominal session = which 30-over third of the nominal day the ball falls in (1, 2 or 3). Both assume 90 overs a day and no lost time. They are reconstructions, not facts in the data.
The module function that stamps these clocks on every delivery is short:
def add_clocks(balls, overs_per_day=90, session_overs=30):
b = balls.sort_values(["match_id", "delivery_seq"]).copy()
b["wkt"] = b["is_wicket"] & ~b["wicket_kind"].isin(NOT_DISMISSAL)
legal = b["is_legal"].astype(int)
before = b.groupby("match_id")["is_legal"].cumsum().astype(int) - legal
b["pitch_age"] = before / 6.0
b["innings_start_age"] = b.groupby(["match_id", "innings"])["pitch_age"].transform("min")
w = b["wkt"].astype(int)
b["wkts_down"] = b.groupby(["match_id", "innings"])["wkt"].cumsum().astype(int) - w
b["nominal_day"] = (b["pitch_age"] // overs_per_day).astype(int) + 1
in_day = b["pitch_age"] - (b["nominal_day"] - 1) * overs_per_day
b["nominal_session"] = np.minimum(in_day // session_overs, 2).astype(int) + 1
return b
Two details matter. Wickets for this chapter are every dismissal except retired hurt and retired not out, the same exclusion the book's batting tables use, because here we're asking what the pitch did to the batting side, not which bowler gets the credit. And "runs" means total runs including extras, for the same reason: byes off a ball that bounces unpredictably are part of the pitch's story.
Can we rebuild the day?
The nominal day is only useful if it's usually right. Cricsheet gives us one check. For every Test it lists the dates of play, so we know n_days, the number of days the match lasted. For a match that ended in a result, the last ball was bowled on day n_days. If our clock were perfect, ⌈total overs ÷ 90⌉ would equal n_days every time.
def day_clock_check(games, balls, rates=(80, 82, 84, 86, 88, 90, 92, 95)):
tot = (balls.groupby("match_id")["is_legal"].sum() / 6).rename("overs")
m = games[games["result"] == "win"].merge(tot, left_on="match_id", right_index=True)
rows = []
for r in rates:
imp = np.ceil(m["overs"] / r)
rows.append({"overs_per_day": r, "matches": len(m),
"exact": (imp == m["n_days"]).mean(),
"under": (imp < m["n_days"]).mean(),
"over": (imp > m["n_days"]).mean()})
return pd.DataFrame(rows)
The real output, from code/01_pitch_clock.py:
Men's Tests in the snapshot: 899 matches, 1,715,672 legal balls
Days played (n_days): {2: 9, 3: 137, 4: 284, 5: 468, 6: 1}
Results: {'win': 730, 'draw': 169}
Day-clock check (decided matches): implied last day = ceil(total overs / R)
overs_per_day matches exact under over
80 730 0.664 0.082 0.253
82 730 0.711 0.110 0.179
84 730 0.749 0.141 0.110
86 730 0.773 0.173 0.055
88 730 0.763 0.216 0.021
90 730 0.733 0.263 0.004
92 730 0.671 0.329 0.000
95 730 0.581 0.419 0.000
R = 90: actual day minus nominal day, decided matches:
{-1.0: 3, 0.0: 535, 1.0: 181, 2.0: 9, 3.0: 2}
Median total overs by days played (decided): {2: 142.0, 3: 220.0, 4: 299.8, 5: 369.5, 6: 310.3}
Median total overs, draws: 397.8

📊 Figure (described): Three lines against the assumed overs per day (80 to 95). The "exact" line peaks at about 77% near 86 overs a day. The "too late" line falls to almost zero by 90 overs. The "too early" line rises steadily as the assumed rate goes up. At 90 overs, the clock is exactly right for 73% of decided Tests and almost never runs ahead of the real day.
Read the R = 90 row carefully, because it tells you what kind of instrument you have. The nominal day is exactly right for 535 of 730 decided Tests (73.3%). It's one day early for 181 (24.8%), two or three days early for 11, and late for only 3 (0.4%). The error is almost entirely one-sided. Time in Test cricket is lost (rain, bad light, slow over rates) far more often than it's gained, so a 90-over nominal day is a lower bound on the real day. If the nominal clock says "day 3", it's day 3 or later.
A rate of 86 overs a day scores higher on "exact" (77.3%) because it builds in the typical shortfall. But it overshoots in 5.5% of matches, and an error that can go either way is harder to reason about than one that only goes one way. This chapter keeps 90, which is also the playing-conditions minimum, and treats every "day" and "session" as approximate. Where the clock is exact (the first 30 overs of a match really are the first morning, unless the start was delayed), we'll lean on it.
⚠️ Common pitfall: reading the nominal day as the real day. A table headed "day 4" built from a 90-over clock contains some real day-4 cricket and a quarter or so of real day-5 cricket from rain-hit matches. Late-match differences are therefore blurred, and real day-to-day effects look smaller than they are. When you report "day 4" from Cricsheet, write "nominal day 4 (90-over blocks)" and say the label is a lower bound. If you ever get data with real day and session stamps, re-run this chapter's tables on it.
🔄 Check your understanding 1. A Test's third innings starts at pitch age 212.5. On the nominal clock, which day and session is that? 2. Why does the 90-over clock almost never place the last ball on a day after the real one? 3. Old Trafford 2023 ended with 269 overs bowled in a five-day draw. What does the nominal clock say about the day of the last ball, and what was the truth?
Answer
- ⌊212.5 ÷ 90⌋ + 1 = 3, so nominal day 3. Within the day, 212.5 − 180 = 32.5 overs, which falls in the second 30-over block: nominal session 2.
- To run ahead of the real day, more than 90 overs would have to be bowled in a day on average. Over-rate rules and the 90-over minimum make that rare. Lost time is common, and it pushes the clock behind.
- 268.8 ÷ 90 = 2.99, so nominal day 3. The last ball was actually bowled on day 4, after much of day 4 was lost and day 5 was washed out. The clock was a full day early, the typical rain-hit error.
29.2 The Raw Deterioration Curve
The cricket question: does batting really get harder as a Test goes on, and by how much?
Start with the simplest possible table: every legal ball in 25 years of men's Tests, grouped by nominal day. (There are no women's Tests in this book's data snapshot, so the chapter is about the men's game.)
day = ts.deterioration_table(balls, by=["nominal_day"], width=10_000)
pa = ts.deterioration_table(balls, width=50) # 50-over pitch-age buckets
pc = ts.deterioration_table(balls, by=["conditions"], width=100)
By nominal day (90-over blocks of the match):
nominal_day overs matches run_rate runs_per_wkt balls_per_wkt
1 80742.83 899 3.30 37.41 67.99
2 79765.67 895 3.38 32.87 58.27
3 69673.83 862 3.26 30.53 56.11
4 43396.50 657 3.25 29.30 54.16
5 12366.50 294 2.99 28.27 56.81
By pitch age (overs bowled in the match before the ball), 50-over buckets:
bucket overs matches run_rate runs_per_wkt balls_per_wkt
0 44873.67 899 3.24 37.77 69.95
50 44818.83 897 3.37 36.08 64.24
100 44537.83 894 3.45 33.63 58.44
150 43330.67 886 3.26 31.19 57.43
200 38973.17 842 3.31 30.55 55.44
250 31750.33 716 3.28 30.51 55.83
300 22173.00 549 3.22 28.76 53.56
350 11932.33 332 2.97 27.65 55.89
400 3555.50 149 2.96 28.23 57.19
There's the folklore, apparently confirmed. A wicket costs 37.41 runs on nominal day 1 and 28.27 on nominal day 5, a quarter cheaper. Notice what doesn't move much: the run rate stays between about 3.2 and 3.45 an over until the pitch is 350 overs old, then drops below 3. Batting doesn't get slower; it gets shorter. Wickets fall more often, at about the same scoring speed.
Now split by the book's conditions buckets (from toolkit/venues.py: SENA = South Africa, England, New Zealand, Australia; Subcontinent = India, Pakistan, Sri Lanka, Bangladesh; plus West Indies, UAE and Other):
Runs per wicket by pitch age (100-over buckets) and conditions:
conditions Other SENA Subcontinent UAE West Indies
bucket
0 40.49 35.97 38.89 38.28 33.84
100 31.02 32.03 33.22 42.11 29.99
200 27.20 31.18 30.79 30.67 27.79
300 24.78 27.62 29.78 28.36 29.33
400 18.43 25.91 30.76 24.73 35.29

📊 Figure (described): Left: runs per wicket (solid line) falls from about 38 at the start of a match to about 28 after 350 overs, while the run rate (dashed, right axis) wanders between 3.2 and 3.45 and only drops near the end. Right: the same runs-per-wicket curve for four conditions buckets (cells with at least 1,000 overs). Subcontinent and SENA both fall by roughly a quarter. The UAE line jumps around because it rests on only 31 Tests.
Two surprises are already worth noting. First, the subcontinent curve isn't steeper than SENA's in this raw view: 38.89 → 29.78 against 35.97 → 27.62 by the 300-over bucket. Second, the late subcontinent buckets level off (29.78, then 30.76), which is the opposite of "day five is unplayable". Both are clues that this raw curve is mixing several things together. That's the next section.
🔄 Check your understanding 1. Runs per wicket fall by about a quarter from nominal day 1 to nominal day 5. Does the run rate fall by a similar amount? 2. In the raw table, the subcontinent's runs per wicket rise slightly between the 300 and 400 buckets (29.78 → 30.76). Name one reason that isn't about the pitch.
Answer
- No. The run rate moves only from 3.30 to 2.99 (and stays between about 3.25 and 3.38 for the first four nominal days). Wickets get cheaper; scoring speed barely changes.
- Survivorship: the matches still going after 400 overs are the ones played on pitches where batting stayed possible. The late buckets hold a selected, flatter set of pitches.
🧩 Productive struggle. Before reading on, list every reason you can think of why runs per wicket would fall as pitch age rises, other than the pitch itself getting worse. Aim for at least three. Then, for each one, say which direction it would push the curve if we could remove it. (Hint: think about who is batting at pitch age 350, and about which matches are still going at pitch age 350.)
29.3 Untangling the Curve: Pitch, Batters and Survivors
The cricket question: if the same batters faced the same bowlers on day one and on day four, how much harder would day four be?
That's the question we care about, and the raw curve doesn't answer it. Here are the three confounders, which you may have found in the productive struggle.
- The batting gets weaker. At high pitch age we're more often watching numbers 8–11, because later innings are shorter and the tail bats in every innings. Tailenders are cheaper wickets on any pitch.
- The innings number changes. Pitch age and innings number rise together. The fourth innings carries match-situation pressure (chasing, or batting for a draw) on top of whatever the pitch is doing.
- The surviving matches are different. A Test that's still going after 350 overs is, almost by definition, one where batting was possible for a long time. Flat pitches survive to day five; green tops finish in three. The late buckets hold a selected set of pitches, the flattest ones. That's why the subcontinent curve levels off at the end.
The first two make the raw curve look steeper than the pitch effect. The third makes it look flatter. We can't know the net without separating them. We'll use three methods, each with a different weakness.
Method 1: add controls one at a time
Fit a logistic regression for P(wicket on a legal ball) on pitch age (per 100 overs), then add controls: innings number, ball age (overs 1–10 of a ball versus 61–80), wickets down (a stand-in for batting position), and the batter's career Test average capped at 60 (the same batter-quality control Chapter 16 used).
specs = [
("pitch age only", "y ~ pitch100"),
("+ innings number", "y ~ pitch100 + C(inns)"),
("+ ball age", "y ~ pitch100 + C(inns) + new_ball + old_ball"),
("+ wickets down", "y ~ pitch100 + C(inns) + new_ball + old_ball + C(wd)"),
("+ batter quality", "y ~ pitch100 + C(inns) + new_ball + old_ball + C(wd) + q"),
]
for name, f in specs:
r = smf.logit(f, data=d).fit(disp=0)
Legal balls modelled: 1,715,672; wicket rate per ball 1.684%
Odds ratio for a wicket per +100 overs of pitch age (95% CI):
model OR_per_100_overs lo hi
pitch age only 1.072 1.061 1.084
+ innings number 1.017 0.996 1.039
+ ball age 1.027 1.005 1.050
+ wickets down 0.824 0.805 0.843
+ batter quality 0.849 0.830 0.869
Full model, innings-number odds ratios (v innings 1): {'C(inns)[T.2]': 1.238, 'C(inns)[T.3]': 1.586, 'C(inns)[T.4]': 1.848}
New ball (overs 1-10 of a ball) OR 1.165 | old ball (61-80) OR 0.917 | per +1 run of batter average OR 0.9754
On its own, each extra 100 overs of pitch age multiplies the odds of a wicket by 1.072. Add innings number and the effect almost vanishes (1.017, interval crossing 1). Add wickets down and batter quality and it reverses: 0.849, so older pitch, fewer wickets. Meanwhile the innings dummies carry a large effect: holding everything else fixed, a fourth-innings ball is 1.848 times as likely (in odds) to take a wicket as a first-innings ball.
Does that mean pitches get better with age and the innings number is what matters? No. It means the model has asked a question we didn't intend.
🔍 Why this works (and why the sign flips). Once innings number is in the model, the only variation left in pitch age is within an innings and across matches with different innings lengths. Within an innings, pitch age rises one-for-one with overs in that innings. And an innings only reaches its 90th over if batting has been possible: the pitch is flat, the batters are good, the bowlers are tired. So "high pitch age, holding innings fixed" really means "a long innings", and long innings select for good batting conditions. The coefficient is measuring survivorship within the innings, not the pitch. The deterioration hasn't disappeared; it has been absorbed into the innings dummies (1.238, 1.586, 1.848), because innings number is the cleanest available proxy for "how worn is the pitch at the start of this innings". The general lesson, which comes back in Chapter 33: in observational data, adding a control can change what the remaining variable means. Always ask what variation is left.
Method 2: hold the set of pitches fixed
Survivorship has a simple partial fix: only use matches that lasted at least 300 overs, and only their first 300 overs. Every bucket then contains exactly the same 549 pitches.
Fixed cohort: 549 Tests that reached 300 overs; first 300 overs only
bucket overs run_rate runs_per_wkt balls_per_wkt
0 27450.00 3.23 47.91 89.12
50 27450.00 3.30 42.18 76.60
100 27450.00 3.40 37.71 66.60
150 27450.00 3.17 37.61 71.27
200 27450.00 3.26 36.53 67.28
250 65110.83 3.18 30.60 57.81
(The last bucket folds in everything from 250 to 300 overs and also overs 300+ in these matches, hence its larger size.) On the same pitches, runs per wicket falls from 47.91 to 30.60. These are flatter pitches than average (47.91 in the opening 50 overs against 37.77 for all Tests) because they lasted. The decline is still steep, but it still mixes in the tail and the innings number: overs 0–50 are almost all top-order first-innings batting.
Method 3: the paired design
The cleanest comparison in Test cricket is hiding in the batting order. Without a follow-on, the side that bats first also bats third, and the side that bats second also bats fourth. So within one match we can compare:
- the same team's batting,
- on the same pitch,
- against the same bowling attack,
- with a new ball both times,
in its earlier and later innings. Take the first 30 overs of each, which is mostly the top order facing the new ball, and the main thing that differs is about 170–200 overs of pitch wear. (Match situation differs too, and we'll come back to that.)
def paired_innings(balls, first_overs=30):
e = balls[balls["over"] <= first_overs]
inn = e.groupby(["match_id", "innings"]).agg(team=("batting_team", "first"),
legal=("is_legal", "sum"), runs=("runs_total", "sum"), wkts=("wkt", "sum"),
start=("pitch_age", "min"), conditions=("conditions", "first")).reset_index()
out = []
for a, c in ((1, 3), (2, 4)):
x = inn[inn["innings"] == a].set_index("match_id")
y = inn[inn["innings"] == c].set_index("match_id")
j = x.join(y, lsuffix="_early", rsuffix="_late", how="inner")
out.append(j[j["team_early"] == j["team_late"]].assign(pair=f"{a}v{c}"))
return pd.concat(out)
(The module version also counts spin and typed balls; it's shown trimmed here.) The output:
Paired design (first 30 overs of each innings, same batting team, same pitch):
matches gap_overs rpw_early rpw_late bpw_early bpw_late rr_early rr_late spin_early spin_late bpw_ratio
pair
1v3 795.0 196.167 33.754 30.826 64.824 57.535 3.124 3.215 0.223 0.327 0.888
2v4 642.0 168.917 34.355 30.067 64.981 55.150 3.172 3.271 0.253 0.370 0.849
Bootstrap 95% CI, balls-per-wicket ratio late/early, 1v3: 0.834 to 0.946
Bootstrap 95% CI, balls-per-wicket ratio late/early, 2v4: 0.789 to 0.909
📐 Definition — Paired deterioration ratio. For a set of Tests, the paired deterioration ratio = (balls per wicket in the first 30 overs of the later innings) ÷ (balls per wicket in the first 30 overs of the earlier innings), for the same batting team (innings 1 v 3, or 2 v 4). Below 1 means wickets come faster on the older pitch. It holds team, venue and attack fixed and gives both innings a new ball.
Here's the honest answer to the section's question. For the same top order against the same attack with a new ball, a wicket falls about 11% faster in the third innings than the first (ratio 0.888, 95% interval 0.834–0.946) and about 15% faster in the fourth than the second (0.849, 0.789–0.909), across a pitch-age gap of roughly 170–200 overs. That's real and worth planning around, but it's well short of "unplayable". The scoring rate rises slightly (3.12 → 3.22 and 3.17 → 3.27), and spin bowls far more of those new-ball overs in the later innings (22% → 33%, and 25% → 37%).
Split by conditions and the picture sharpens:
Paired design by conditions:
matches rpw_early rpw_late bpw_early bpw_late bpw_ratio rr_early rr_late spin_early spin_late
pair conditions
1v3 SENA 399.0 32.826 31.724 62.600 58.709 0.938 3.146 3.242 0.084 0.174
Subcontinent 257.0 36.035 31.514 66.724 57.894 0.868 3.240 3.266 0.425 0.567
West Indies 80.0 31.463 27.345 66.352 52.156 0.786 2.845 3.146 0.199 0.260
2v4 SENA 323.0 33.031 31.286 61.922 57.818 0.934 3.201 3.247 0.110 0.226
Subcontinent 201.0 35.436 30.753 64.653 53.599 0.829 3.289 3.443 0.471 0.610
West Indies 69.0 30.964 25.591 63.697 49.636 0.779 2.917 3.093 0.216 0.276

📊 Figure (described): Six pairs of bars, one pair for each combination of conditions (SENA, Subcontinent, West Indies) and innings pair (1 v 3, 2 v 4). The later-innings bar (hatched) is always shorter: fewer balls per wicket. The gap is smallest in SENA (about 6–7%) and largest in the West Indies (about 21–22%), with the subcontinent in between (13–17%).
In SENA conditions the pitch costs a top order only about 6–7% between its two innings. In the subcontinent it's 13–17%. In the West Indies it's about 21%, from smaller samples (80 and 69 Tests). That ordering fits what players say about Caribbean surfaces getting low and slow, though the samples are too small to rank the West Indies above the subcontinent with confidence.
What the paired design doesn't remove: match situation. A third innings is often played to set a target, with licence to attack and get out. A fourth innings may be a chase or a fight for a draw. The slightly higher run rates in the later innings suggest some of the extra wickets are bought deliberately, so the pure pitch effect may be a little smaller than 11–15%. A bowling side also selects its attack for the whole match, so a spinner picked for day four bowls on day one too. Treat these ratios as upper-end estimates of the pure pitch effect and solid estimates of what actually happens, which is what a forecaster needs.
🏏 Eye test: Imran laughed when he saw the SENA number. "Six percent. At Headingley it's often better to bat second time round. The ball does everything on the first morning under cloud, and by day three the pitch has flattened out and the sun's come out." He's not wrong, and Case Study 1 shows it: Headingley's third- and fourth-innings runs per wicket are higher than its first- and second-innings figure (31.88 against 31.39). But notice what he's describing: weather and the new ball on the first morning, not the pitch getting better. The data can see the outcome (early wickets at Headingley) but not the cloud cover that causes it. That's the gap a weather merge (Section 29.5) would fill.
📋 Try it — Settle this debate. "In the subcontinent you must bat first, because the pitch will be a minefield by the fourth innings." Using only the paired-design table and the raw curve, write a three-sentence verdict.
Worked answer
The pitch does wear in the subcontinent: the same top order against the same attack loses wickets about 13% faster in the third innings than the first (balls per wicket 66.7 → 57.9) and about 17% faster in the fourth than the second (64.7 → 53.6). That's roughly twice the SENA effect (6–7%), so batting first does avoid real wear. But "minefield" overstates it: even in the fourth innings the top order lasts about 54 balls per wicket and scores faster (3.44 an over) than in the second, so the toss decision should weigh team composition (do you have the spinners to use the wear?) rather than treat the fourth innings as unplayable. The toss itself is Chapter 22's subject.
🔄 Check your understanding 1. Why does the pitch-age coefficient turn below 1 once innings number and batter controls are added? 2. What does the paired design hold fixed that the fixed-cohort method does not? 3. Give one reason the paired ratios might overstate the pure pitch effect.
Answer
- Within an innings, pitch age moves with innings length, and long innings happen when batting conditions are good, so "older pitch, same innings" means "long innings on a flat pitch". The pitch's wear is absorbed by the innings-number dummies.
- The batting team (and so the batters' quality), the bowling attack, the venue and the ball's age (new ball both times). The fixed cohort holds only the set of pitches fixed, while the batting order and innings number still change across buckets.
- Match situation: third and fourth innings often involve deliberate attacking (setting or chasing a target), which costs wickets for reasons unrelated to the pitch. The slightly higher later-innings run rates are consistent with that.
29.4 Day Five Belongs to the Spinners — Measured on the Pitch Clock
The cricket question: how quickly does a Test turn into a spinners' match, and is it the captain or the pitch that decides?
To answer this we need to know which bowlers are spinners. Cricsheet doesn't record bowling style. The book's reference table data/reference/player_styles.csv does, and it has now been extended to cover most of the pre-2015 Test bowlers that earlier chapters had to leave untyped (Muralitharan, Warne, Kumble, Vettori and many more). The version used here:
Styles table: 2,011 rows (1,421 men); men with high/medium confidence: 1,399
Typed share of Test legal balls: 96.9%
Typed share by year (selected): {2002: 67.6, 2004: 91.3, 2006: 97.0, 2010: 97.8, 2015: 97.8, 2020: 97.0, 2025: 93.0, 2026: 89.1}
So 96.9% of all Test legal balls in the snapshot are bowled by someone we can type as pace or spin. (Chapters 10 and 16 ran on the earlier table and report about 71%.) Coverage is thinnest at the two ends: 2002, where Cricsheet has only a couple of Tests, and 2025–26, where debutants haven't been added yet. Every share below is a share of typed balls.
Spin share of typed legal balls, by pitch age (50-over buckets) and conditions:
conditions Other SENA Subcontinent UAE West Indies
bucket
0 30.0 14.8 50.2 45.4 26.8
50 43.1 22.9 57.2 47.5 33.1
100 43.5 26.5 61.7 59.8 39.1
150 39.0 24.0 58.9 52.2 34.8
200 44.4 31.4 64.3 60.3 40.6
250 43.5 30.6 63.2 54.7 38.5
300 48.3 37.0 67.0 69.4 42.6
350 53.4 35.3 67.0 63.5 50.5
400 63.3 42.2 74.5 64.7 54.6
Spin share of typed bowler wickets:
conditions Other SENA Subcontinent UAE West Indies
bucket
0 19.8 8.7 46.5 40.0 21.0
50 36.6 14.4 54.8 50.5 23.6
100 42.3 20.8 63.5 59.4 31.3
150 37.4 17.9 61.7 47.7 31.6
200 39.7 25.9 67.4 60.0 33.4
250 41.8 26.3 64.9 55.6 29.5
300 54.7 35.3 67.9 72.0 42.8
350 53.4 29.5 66.5 75.6 48.7
400 50.0 31.8 70.8 78.0 57.1

📊 Figure (described): Left: spin's share of balls bowled rises with pitch age in every conditions bucket, from about 15% to 42% in SENA and from 50% to 75% in the subcontinent. Right: spin's share of bowler wickets rises in step, from under 9% to about 32% in SENA and from about 47% to 71% in the subcontinent. A small dip at 150–200 overs shows up in every bucket.
Across all conditions, spin bowls 29.0% of balls in the first 50 overs of a Test and 59.0% after 400; it takes 22.4% of the bowler wickets at the start and 55.0% at the end. So yes, the end of a Test does belong to the spinners. But look at the dip at 150–200 overs in every column. Nothing happens to the pitch at 150 overs. What happens is that the second innings is usually under way, and the new ball it started with is somewhere in its first 50 overs, so captains have gone back to pace. That's the first sign that these shares describe captains' choices as much as pitch behaviour.
⚠️ Common pitfall: reading a share of wickets as a measure of effectiveness. If spinners bowl 75% of the overs, they'll take most of the wickets even if they're no more dangerous than the seamers. A share of wickets follows a share of balls. To ask whether the pitch has helped spin, compare the cost of a wicket, balls per wicket, for each type at each pitch age.
That comparison is in code/03_spin_takes_over.py:
Balls per bowler wicket by region, type and pitch age (100-over buckets):
bowler_type pace spin
region bucket
Asia (Sub + UAE) 0 69.3 76.9
100 66.4 61.0
200 62.5 56.6
300 60.8 57.4
SENA 0 59.2 104.6
100 52.4 73.7
200 52.7 67.3
300 51.7 60.3
WI + Other 0 62.7 93.6
100 55.1 66.9
200 48.7 65.1
300 56.8 55.3

📊 Figure (described): In SENA (left), spin's balls per wicket falls steeply from about 105 in the first 100 overs of a match to about 60 after 300, while pace stays between 52 and 59. In Asia (right), spin starts more expensive than pace (77 against 69) and becomes cheaper by 100 overs. Both lines fall, but spin's falls further.
This is the real deterioration signature, and it's sharper than the shares suggested. In SENA conditions a spinner's wicket costs 104.6 balls in the first 100 overs of a Test and 60.3 after 300, falling by 42%, while a pace bowler's falls only from 59.2 to 51.7 (13%). In Asia spin starts dearer than pace (76.9 against 69.3 balls per wicket), and by the 100-over mark it's cheaper (61.0 against 66.4) and stays cheaper. Pace wickets get cheaper too as the match goes on, which is a reminder that some of this is the batting order (tailenders are cheap for everyone) and not only the pitch. But the gap between the two lines is what a captain acts on, and it moves strongly towards spin in every region.
How to read this as a forecaster: the pitch clock tells you who will bowl (captains respond to wear, and they respond more than the cost data strictly justifies in the subcontinent) and how expensive spin wickets will be. That's the input you'd want for a bowling plan, the subject of Chapter 31, and for any session forecast that knows which bowlers a side has. Chapter 18 treats spin against pace across all formats and conditions; this section adds the time dimension that only Tests have.
🔄 Check your understanding 1. Spin takes 46.5% of subcontinent bowler wickets in the first 50 overs of a Test and 70.8% after 400. Does that alone prove the pitch helps spin more as it ages? What extra number do you need? 2. Why do spin shares dip at 150–200 overs of pitch age in every region? 3. In SENA conditions, by what percentage does the cost of a spin wicket fall between the first 100 overs and 300+? And for pace?
Answer
- No. Spin's share of balls rises too (50.2% → 74.5%), so the wicket share could rise just because spinners bowl more. You need the cost of a wicket by type, balls per wicket, at each pitch age.
- The second innings usually starts around 90–110 overs in, with a new ball. In the 150–200 bucket that ball is still fairly new, so captains bowl more pace. It's a ball-clock effect showing through the pitch clock.
- Spin: 104.6 → 60.3 balls per wicket, a fall of about 42%. Pace: 59.2 → 51.7, about 13%.
29.5 Weather Without Weather Data
The cricket question: the forecast says rain on day five. What is that worth?
Cricsheet has no weather. No rainfall, no cloud cover, no humidity, no wind, no light. It's the biggest gap in the public data for Test analysis, and it's worth being precise about what we can do without it.
We can measure the shadow the weather leaves on the scorecard. Rain, bad light and wet outfields stop play; stopped play means overs not bowled. Slow over rates do the same thing more mildly. So:
📐 Definition — Unbowled overs (weather proxy). For a drawn Test, which used all of its time, unbowled overs = 5 × 90 − overs bowled. For a decided Test, unbowled overs = max(0, (days played − 1) × 90 − overs bowled), the shortfall on the days before the last one. It's a lower bound on time lost: it can't see time lost on a final day, it can't see time lost in a match that was going to end early anyway, and it counts slow over rates as if they were rain.
def lost_overs_table(games, balls, overs_per_day=90, scheduled_days=5):
tot = (balls.groupby("match_id")["is_legal"].sum() / 6).rename("overs_bowled")
m = games.merge(tot, left_on="match_id", right_index=True, how="left")
draw = m["result"] == "draw"
sched = np.where(draw, scheduled_days, m["n_days"] - 1) * overs_per_day
m["min_lost_overs"] = np.maximum(0, sched - m["overs_bowled"])
m["month"] = m["start_date"].dt.month
m["year"] = m["start_date"].dt.year
return m
The output from code/04_weather_proxy.py:
Minimum unbowled overs by result:
count mean std min 25% 50% 75% max
result
draw 169.0 89.1 94.2 0.2 20.8 52.2 130.8 448.3
win 730.0 8.7 22.7 0.0 0.0 0.0 2.2 208.5
Decided Tests losing 90+ overs before their final day: 11 of 730 (1.5%)
Draws losing 90+ overs: 62 of 169 (36.7%); 150+: 35
Median overs in a Test decided on day 5: 369.5
{'full-length draw': 101, 'time-starved draw': 68}
The contrast is the whole story. Only 11 of 730 decided Tests (1.5%) lost a full day's 90 overs before their final day. Sixty-two of the 169 draws (36.7%) did, and 35 lost 150 or more. Put differently: of the Tests that lost a full day, 62 were drawn and 11 still produced a result.
A useful split for forecasting: a Test decided on day five uses a median of 369.5 overs. A draw that bowled fewer overs than that didn't have the time a typical result needs. Call it a time-starved draw. A draw with at least that many overs had the time and still didn't produce a winner, because of a flat pitch, a defiant rearguard or cautious captaincy. Call it a full-length draw. The snapshot has 68 time-starved draws and 101 full-length ones.
The most time-starved:
start_date venue team1 team2 overs_bowled
2009-02-13 Sir Vivian Richards Stadium, North Sound, Antigua West Indies England 1.7
2016-08-18 Queen's Park Oval, Port of Spain, Trinidad West Indies India 22.0
2015-11-14 M Chinnaswamy Stadium, Bengaluru India South Africa 81.0
2015-07-30 Shere Bangla National Stadium, Mirpur Bangladesh South Africa 88.2
2016-08-19 Kingsmead, Durban South Africa New Zealand 99.7
2010-12-01 Pallekele International Cricket Stadium Sri Lanka West Indies 103.5
⚠️ Common pitfall: assuming every unbowled over is rain. The top row is the Antigua Test of February 2009, abandoned after ten balls because the sandy outfield was unfit for play, not because of weather (a replacement Test was arranged at the old Antigua Recreation Ground). The proxy can't tell rain from a bad outfield, a wet patch after the rain has stopped, bad light, or a slow over rate. Use it for climatology (which grounds, which months, how often) and treat any single match with care.
Where and when time is lost
By host country (25+ Tests): % of Tests losing a full day (90+ overs), mean unbowled overs
tests draw_pct mean_lost lost_day_pct
host_country
Zimbabwe 31 9.7 6.3 0.0
UAE 31 25.8 8.1 0.0
South Africa 98 8.2 17.7 2.0
Australia 121 14.0 14.7 5.0
Sri Lanka 89 18.0 26.8 6.7
India 99 23.2 19.5 7.1
Pakistan 36 33.3 29.5 8.3
New Zealand 83 21.7 22.1 9.6
West Indies 86 29.1 32.0 11.6
Bangladesh 68 17.6 33.7 13.2
England 154 17.5 33.1 14.3

📊 Figure (described): For eleven host countries (25+ Tests each), paired bars show the share of Tests that lost at least 90 overs and the share that were drawn. England (14.3%), Bangladesh (13.2%) and the West Indies (11.6%) lose a full day most often; the UAE and Zimbabwe never did in this snapshot. Draw rates don't line up neatly with lost time: the UAE drew 25.8% of its Tests without ever losing a day.
England is the wettest Test host in the snapshot: 14.3% of its 154 Tests lost at least a full day. Bangladesh (13.2%) and the West Indies (11.6%) follow. The UAE and Zimbabwe never lost a day. Notice that draws and lost time don't line up. The UAE drew a quarter of its Tests (8 of 31) without ever losing a day; South Africa drew only 8.2%. Those UAE draws are full-length draws, a pitch story, and the first column alone can't tell you which kind of draw you're looking at.
For England we can go one step further, by month:
England by month of the Test's first day:
tests draw_pct mean_lost lost_day_pct
month
5 20 15.0 32.0 10.0
6 28 21.4 44.7 21.4
7 47 19.1 24.9 8.5
8 49 16.3 32.3 16.3
9 10 10.0 44.5 20.0
June Tests in England lost a full day 21.4% of the time (6 of 28), July Tests only 8.5% (4 of 47). With 10 to 49 Tests per month these are small samples. A June-versus-July gap of this size could easily be partly noise (the shrinkage methods of Chapter 6 apply), but the direction is what a forecaster would use as a starting point before looking at an actual weather forecast.
Is the vanishing draw a weather story?
Year by year in this snapshot, the draw rate in men's Tests fell from 36.6% in 2009 to 4.0% in 2024 (7.5% in 2025). Did the weather change? The proxy can answer that:
By era:
tests draw_pct starved_pct full_pct mean_lost mean_overs run_rate balls_per_wkt
era
2001-09 217 25.35 8.29 17.05 24.91 328.43 3.34 62.99
2010-15 252 24.21 10.71 13.49 25.29 333.91 3.23 63.17
2016-19 177 12.99 7.91 5.08 23.74 315.20 3.22 57.92
2020-26 253 11.86 3.56 8.30 21.36 295.42 3.38 53.75

📊 Figure (described): Four stacked bars, one per era. Total draws fall from about 25% of Tests (2001–09, 2010–15) to about 12–13% (2016–19, 2020–26). Both kinds of draw shrink; full-length draws fall from 17.1% to 8.3% and time-starved draws from 8.3% to 3.6%. Annotations show balls per wicket falling from 63 to 54 across the eras.
The weather didn't change: mean unbowled overs stayed between 21 and 25 per Test in every era. What changed is that wickets got cheaper (63 balls per wicket in the 2000s, 54 in 2020–26) and matches got shorter (328 overs on average down to 295). Full-length draws halved, because fewer pitches and batting line-ups now hold out for five days. Time-starved draws also fell, from 8.3% to 3.6% of Tests, even though time lost to weather didn't, because a faster game can now produce a result in the time that's left. A Test that loses a day in 2025 is more likely to finish than one that lost a day in 2005. That's a direct input to the simulator in Section 29.7: the value of time depends on the era's tempo.
How you would merge real weather data
This book's data snapshot doesn't include weather, so here we describe the method rather than run it. Everything below is freely available at the time of writing, but services change, so check each provider's current documentation and terms.
- Build a venue table. For each Test ground, its latitude and longitude, and its time zone. Cricsheet gives venue and city names; the coordinates have to come from a gazetteer or a map. About 100 grounds cover almost every Test in the snapshot, so this is an afternoon's careful work, not a big project.
- Get the dates.
start_dateplusn_daysgives the days played (Cricsheet'sdateslist, which the toolkit reduces to these two fields). - Fetch historical weather. Free options include the Open-Meteo historical archive (an open API serving reanalysis-based hourly variables such as precipitation and cloud cover for any coordinates), NOAA's GHCN-Daily station records (daily rainfall from real gauges, sparser coverage), and national meteorological services, some of which require registration. Reanalysis gives you every ground on a grid; stations give you real measurements but may be kilometres from the ground.
- Aggregate to playing hours. Rain at 3 a.m. under the covers matters little; rain at 11 a.m. matters a lot. Convert to local time and sum precipitation within each session's hours. Playing hours differ by country and series (and day-night Tests are different again), so take them from the published match schedule rather than assuming them.
- Validate against the proxy. The unbowled-overs measure is your ground truth. If your rain variable doesn't predict unbowled overs, something is wrong with the merge.
A sketch of step 3 with only the standard library. It isn't run in this book's build and prints no results here; check the provider's documentation for the current parameter names before using it:
# Sketch only, not run in this book's build. Requires network access.
import json, urllib.parse, urllib.request
def daily_rain(lat, lon, start, end):
"""Daily precipitation (mm) for one ground and date range from Open-Meteo's archive API."""
q = urllib.parse.urlencode({"latitude": lat, "longitude": lon, "start_date": start,
"end_date": end, "daily": "precipitation_sum", "timezone": "auto"})
with urllib.request.urlopen(f"https://archive-api.open-meteo.com/v1/archive?{q}") as r:
return json.load(r)["daily"]
Once merged, the forecasting use is clear. Section 29.7's simulator takes a distribution of overs lost; a real weather forecast would replace the host country's historical distribution with one conditioned on the forecast for this match.
🏏 Eye test: "The thing your data really can't see," Imran says, "is cloud. At Headingley the first question isn't the pitch, it's whether it's overcast. A Dukes ball under cloud on the first morning does things it won't do in sunshine on day three." Weather isn't only about lost time; it changes how the ball behaves when play is possible. The scorecard shows the effect (cheap early wickets on certain mornings) but not the cause. A cloud-cover merge (step 3 again) is the obvious test. Until then, when a coach says "it'll swing today because it's overcast", the data has nothing to say either way, and the honest analyst says so.
🔄 Check your understanding 1. A drawn Test bowled 300 overs. What's its unbowled-overs figure? Is it a time-starved or a full-length draw? 2. A Test ended in a result on day four with 250 overs bowled. What's its unbowled-overs figure, and what can't the proxy see? 3. Draws fell from 25.35% of Tests (2001–09) to 11.86% (2020–26). Name the evidence that this isn't mainly a weather change.
Answer
- 450 − 300 = 150 unbowled overs. 300 is below the 369.5-over median of a day-five result, so it's a time-starved draw.
- max(0, 3 × 90 − 250) = 20 overs lost on days one to three. The proxy can't see any time lost on day four, or whether the 20 overs were rain or slow over rates.
- Mean unbowled overs barely moved (24.91 → 21.36), while balls per wicket fell from 62.99 to 53.75 and mean overs per Test from 328.43 to 295.42. Faster results, not drier weather.
29.6 Session-Level Forecasting
The cricket question: it's lunch on day two. What will happen between now and tea?
A Test is played in sessions, three blocks of about two hours separated by lunch and tea. Commentators, coaches and in-play betting markets all think in sessions: "England need to win this session", "the morning session favours the bowlers". A session is also the natural unit for a Test forecast, because it's long enough for something to happen (a typical session has about three wickets) and short enough that the state at its start (score, wickets, pitch, ball) is still informative.
Cricsheet doesn't mark sessions, so we use the nominal session from Section 29.1: each 30-over third of each 90-over nominal day. A session can contain an innings change, so the session table first builds (match, session, innings) slices, then aggregates them, keeps the state at the session's start, and drops each match's final, usually incomplete, session.
slices = ts.session_table(balls, q) # one row per (match, nominal session, innings)
sess = ts.sessions_full(slices) # whole nominal sessions of 29+ overs
Session slices: 12,408; whole nominal sessions (29+ overs): 9,109
Mean per session: 98.5 runs, 2.89 wickets (variance 4.42); 25.9% contain an innings change
Mean runs and wickets by nominal day and session:
runs wickets
nominal_session 1 2 3 1 2 3
nominal_day
1 94.88 100.78 101.49 2.63 2.49 2.81
2 101.43 104.48 98.30 3.00 3.12 3.03
3 97.44 97.93 96.53 3.10 3.03 2.98
4 99.11 97.13 88.31 2.99 3.00 2.69
5 86.56 88.02 66.00 2.51 2.43 3.00
The typical nominal session produces 98.5 runs and 2.89 wickets. The variance of wickets (4.42) is well above the mean, so session wicket counts are over-dispersed: more blank sessions and more collapses than a simple Poisson count would produce. Partly that's because a quarter of sessions contain an innings change, which brings a new ball and a fresh top order, and partly it's real clustering of wickets.
📐 Definition — Nominal session. A nominal session is a 30-over block of a 90-over nominal day (overs 0–30, 30–60, 60–90 of pitch age within the day). It approximates a real session when no time has been lost. Within a nominal day, any overs beyond 90 fold into session 3.
The morning-session belief
"The morning session favours the bowlers": moisture in the pitch, fresher bowlers, heavier air. It's one of the most repeated claims in Test cricket. The day × session table shows no morning bulge. On nominal day 2 the first session has 3.00 wickets against 3.12 and 3.03; on day 3 it's 3.10 against 3.03 and 2.98. But those cells mix innings, ball ages and batting positions. A cleaner test uses the one place the clock is exact and compares like with like: the first 30 overs of an innings, with a new ball, by the nominal session in which the innings started, for innings that began on nominal days 1–2 (where the clock is most accurate).
First 30 overs of an innings (new ball) that began on nominal day 1 or 2, by the nominal session it began in:
innings_n legal wk runs balls_per_wkt run_rate
innings start_sess
1 1 899 161179 2360 84942 68.30 3.16
2 1 247 44447 656 24302 67.75 3.28
2 312 55993 848 30680 66.03 3.29
3 329 58978 902 30857 65.39 3.14
3 1 49 8747 179 4631 48.87 3.18
2 110 19727 361 10931 54.65 3.32
3 192 34277 666 18033 51.47 3.16
4 3 35 5367 125 3154 42.94 3.53
The first morning of a Test, the one session label that is essentially exact, yields a wicket every 68.30 balls in the first 30 overs. Second innings that began in a morning session lose a wicket every 67.75 balls; those that began in the afternoon or evening, every 66.03 and 65.39. If anything, the new ball is slightly less dangerous in the morning. The third-innings row has one morning cell lower (48.87 balls per wicket) but it rests on only 49 innings, and the afternoon and evening cells (54.65 and 51.47) bracket nothing clear.
The session model below, which controls for innings, pitch age, ball age, wickets down, batter quality and conditions, agrees: compared with session 1, session 2 has a wicket rate ratio of 0.995 (95% interval 0.962–1.029) and session 3 has 0.967 (0.934–1.000).
So the data doesn't support a general morning effect. Two cautions keep that from being a strong negative claim. First, the nominal clock blurs sessions after day 1; a real effect concentrated in real mornings would be diluted, especially later in matches. Second, the claim may be true in particular conditions: overcast English mornings, a damp pitch after overnight rain, a seaming Dukes ball. An average over 25 years of Tests on five continents is the wrong instrument for a claim about Headingley in May. This is another place where the weather merge would earn its keep.
🧩 Productive struggle. Suppose a true morning effect exists: on real mornings the wicket rate is 10% higher than at other times. Suppose too that our nominal "session 1" label is right only 60% of the time on days 2–5, and the other 40% of nominal session-1 balls were really bowled in afternoon or evening sessions. Roughly how big would the measured effect be? What does that imply about the 0.995 rate ratio for session 2 and the 0.967 for session 3? Work it out before you read the answer in the Check your understanding block below.
A session model, scored out of sample
The session forecaster is a pair of Poisson regressions, one for wickets in the session and one for runs (with log overs as an offset), on the state at the start of the session:
SESSION_FORMULA = ("C(inns) + pitch100 + wd + I(wd**2) + new_ball + q_pair + C(cond) + C(sess)"
" + innings_change")
wk = smf.glm("wickets ~ " + SESSION_FORMULA, data=d, family=sm.families.Poisson()).fit()
rn = smf.glm("runs ~ " + SESSION_FORMULA, data=d, family=sm.families.Poisson(),
offset=d["log_overs"]).fit()
Here q_pair is the mean career average (capped at 60) of the two batters at the crease when the session starts, and innings_change flags sessions that contain the end of one innings and the start of the next. We train on 2002–2021 and test on 2022–2026, which is the honest way to score a forecaster: on matches it has never seen.
Train sessions 7,383, test sessions 1,726
Wickets model, rate ratios:
Intercept 3.273
C(inns)[T.2] 1.173
C(inns)[T.3] 1.283
C(inns)[T.4] 1.601
C(cond)[T.SENA] 1.113
C(cond)[T.Subcontinent] 1.070
C(cond)[T.UAE] 1.012
C(cond)[T.West Indies] 1.077
C(sess)[T.2] 0.995
C(sess)[T.3] 0.967
innings_change[T.True] 2.730
pitch100 0.895
wd 1.063
I(wd ** 2) 0.984
new_ball 1.082
q_pair 0.987
95% CI pitch100: [0.868, 0.922] | session 2: [0.962, 1.029] | session 3: [0.934, 1.0]
Test 2022-26 wickets MAE: model 1.464 v constant 1.794; runs MAE: model 21.01 v constant 21.77; log score -1.921 v -2.250
Mean wickets per session: train 2.80, test 3.29; forecast mean on test 2.73
Mean runs per session: train 96.9, test 105.2
Mean wickets per whole session by era: {'2001-09': 2.76, '2010-15': 2.73, '2016-19': 2.92, '2020-21': 2.93, '2022-26': 3.29}
The coefficients repeat Section 29.3's lessons at session scale. A fourth-innings session costs 1.601 times as many wickets as a first-innings session with the same state. Pitch age within the innings structure has a rate ratio below 1 (0.895 per 100 overs), the same survivorship signal as before. Each run of the batting pair's career average lowers the expected wickets by about 1.3%. A session with an innings change in it has 2.73 times the wickets, because the end of an innings is when the tail falls.
As a forecaster it's useful but not sharp. Its mean absolute error on 2022–26 wickets is 1.464 per session, against 1.794 for a constant guess, about 18% better. For runs the gain is small (21.01 against 21.77). Runs in a session depend on who is batting and how they choose to play, much of which the model can't see.
The biggest problem is in the last three lines. The game moved under the model. Wickets per nominal session ran at 2.73–2.93 from 2001 to 2021 and jumped to 3.29 in 2022–26. A model trained on the past forecasts 2.73 a session for a period that delivered 3.29. Its calibration chart shows the consequence:
Calibration, P(3+ wickets in the session), test 2022-26 deciles:
pred actual n
0.257 0.295 173
0.319 0.329 173
0.358 0.355 172
0.391 0.405 173
0.429 0.448 172
0.471 0.578 173
0.534 0.645 172
0.722 0.827 173
0.865 0.930 172
0.934 0.971 173

📊 Figure (described): Ten points, one per decile of forecast P(3+ wickets in a session), plotted against the observed share. The lower deciles sit on the diagonal; from a forecast of about 0.45 upwards the points sit clearly above it (forecast 0.534, observed 0.645; forecast 0.722, observed 0.827). The model ranks sessions well but under-predicts busy sessions in the faster modern game.
The model ranks sessions well: the observed share of 3+-wicket sessions climbs steadily from 0.295 to 0.971 across the deciles. But for the busier sessions it's about ten points too low. This is Chapter 20's calibration lesson in a Test setting. A model can discriminate well and still be badly calibrated when the environment shifts. A linear year trend doesn't fix it either (we tried; the jump is concentrated after 2021, not spread across two decades). The practical fixes are recency weighting and frequent refits, the same answer Chapter 24 gives for pre-match models.
⚠️ Common pitfall: training a Test model on "all the data". Twenty-five years of Tests sounds like a large sample, but Test cricket's tempo has changed within it. The run rate in 2024 was 3.66, the highest in the snapshot, and balls per wicket hit their lowest. A model fitted on 2002–2026 equally weighted describes an average era that no longer exists. Score on the most recent seasons, weight recent seasons more, and check calibration every year.
Back to Old Trafford: the overs the rain took
Now we can ask the hook's question. Australia were 214/5, 61 behind, when play ended for good at Old Trafford. The session simulator in the module rolls the session model forward. Each simulated session draws wickets and runs from the model's means given the state, caps wickets at those remaining, and moves the pitch and ball clocks on by 30 overs:
Old Trafford, last ball bowled: over 71 of innings 3, pitch age 268.8; at the crease C Green and MR Marsh (career-average proxy mean 31.6)
Simulated next six sessions of Australia's second innings (start 214/5, 61 behind):
session p_innings_over mean_runs runs_p10 runs_p90 mean_wkts_down
1 0.057 95.977 83.0 109.0 7.057
2 0.276 184.729 155.5 210.0 8.400
3 0.524 248.734 156.5 305.0 9.150
4 0.743 289.402 156.5 396.0 9.612
5 0.862 311.461 156.5 478.0 9.811
6 0.927 322.964 156.5 545.0 9.908
(The model used here is fitted on all sessions, 2002–2026, because this is a description of one past match rather than a forecast to be scored. mean_runs is runs added to 214. The 10th percentile sticks at 156.5 because in the lowest tenth of simulations the innings is already over by session 2.)
On the model's average-Test assumptions, giving England back one full day (three sessions) would have finished Australia's innings in only about half of the simulations (P = 0.524), and England would then have needed time to chase. Two full days (six sessions, the 181 overs actually lost) would have finished the innings 92.7% of the time, with Australia adding about 249 runs on average by the end of the first day and leaving England a target of roughly 190 on a pitch some 350 overs old.
So England were in a strong position, but "the rain robbed England of a certain win" is an overstatement on these numbers: they needed most of the lost time just to finish the third innings. That's the value of a session forecaster: it turns "England were on top" into "England needed about a day to take five wickets, and then a chase". The model doesn't know that this was a specific attack against specific batters in specific Manchester conditions, which a real forecaster would add. Chapter 33 picks up the decisions that follow from that kind of arithmetic.
📋 Try it — Predict this match. It's the start of a session in the fourth innings of a subcontinent Test. The pitch has had 300 overs bowled on it, the chasing side is 2 down, the ball is 25 overs old, and the two batters at the crease average about 35 in Tests. Use
ts.session_forecast(or reason from the coefficients) to forecast the session: expected wickets, expected runs and P(3+ wickets). Then usets.simulate_sessionsfor the next three sessions: how likely is it that the innings is over by the close of the third?
Worked answer
From
code/project_checkpoint.py(model fitted on all sessions):
text exp_wickets exp_runs p_0_wkts p_1_2_wkts p_3plus_wkts 2.731 86.937 0.065 0.421 0.514 session p_innings_over mean_runs runs_p10 runs_p90 mean_wkts_down 1 0.008 86.853 75.000 99.0 4.712 2 0.098 174.600 157.000 193.0 6.894 3 0.334 250.508 199.967 283.0 8.398About 2.7 wickets and 87 runs in the session, with a slightly better-than-even chance (0.514) of three or more wickets. Over three sessions the chasing side is bowled out in a third of simulations (0.334) and adds about 250 runs on average. If they need 250, it's close to a three-way contest, which is where Section 29.7 takes over. Remember the 2022–26 calibration result: in the modern game, nudge the wicket forecast up.
🔄 Check your understanding 1. (From the productive struggle.) With a true 10% morning effect and a 60%-accurate morning label, roughly what effect would you measure, and what does that say about the measured 0.995 and 0.967? 2. The session model's wickets MAE on 2022–26 is 1.464 against 1.794 for a constant. Why can a model with a good MAE still be badly calibrated? 3. Why does the session model's rate ratio for
innings_changecome out so large (2.73)?
Answer
- Nominal session 1 would be 0.6 × 1.10 + 0.4 × 1.00 = 1.04 times the true non-morning rate, so the visible effect shrinks from 10% to about 4%. The real morning balls that leak into nominal sessions 2 and 3 raise those a little, shrinking the contrast further. So a true 10% effect would show up as session 2 and 3 rate ratios of roughly 0.96–0.97. The measured 0.995 (interval 0.962–1.029) sits at the edge of that, and session 3's 0.967 (0.934–1.000) is inside it. Honest verdict: the data can rule out a large general morning effect, but the blurred clock can't rule out a modest one. That's why the cleaner first-30-overs comparison (where the day-1 label is exact) carries more weight here.
- MAE rewards getting the ranking and rough size right. Calibration asks whether the forecast probabilities match observed frequencies. If the whole game shifts (3.29 wickets a session instead of 2.80), forecasts can stay well ordered but be biased downwards everywhere.
- A session with an innings change contains the end of an innings (the tail) and the start of a new one (a new ball against openers), the two cheapest periods for wickets in Test cricket.
29.7 The Fourth Innings: Where Pitch, Time and Weather Meet
The cricket question: a side needs 300 to win with a day and a half left. What are its chances of winning, drawing and losing?
The fourth innings is where everything in this chapter comes together: the most worn pitch, the clock running out, and the weather deciding how much clock there is. It's also where the draw becomes a real option. Start with what has actually happened. Cricsheet stores no target for Tests, so the module derives one from the innings totals: the opponents' runs in innings 1–3, minus the chasing side's, plus one.
Fourth innings with a derived target: 660; outcomes {'loss': 329, 'win': 231, 'draw': 100}
Outcome for the chasing side by target (% of chases):
outcome chases win draw loss
target
1-150 142 94.4 2.1 3.5
151-200 53 75.5 5.7 18.9
201-250 51 39.2 23.5 37.3
251-300 81 24.7 28.4 46.9
301-350 66 10.6 24.2 65.2
351-400 82 9.8 24.4 65.9
401+ 185 1.1 12.4 86.5
Successful chases of 350+: 10 of 269
Targets up to 150 are nearly always chased (94.4%). Between 200 and 250 the three results are close to evenly split. Above 300 the chasing side wins about one time in ten, and above 400 almost never (2 of 185). The ten successful chases of 350 or more in the snapshot include Headingley 2019 (359) and Edgbaston 2022 (378), the two England chases in Case Study 2, plus West Indies' 395 against Bangladesh at Chattogram in February 2021 and South Africa's 414 against Australia at the WACA in December 2008.
Notice the draw column. It peaks in the 251–300 band (28.4%) and stays around 24% up to 400, then falls to 12.4% above 400, because big targets are usually set with enough time to bowl the chasing side out, which is exactly the declaring captain's aim. The draw depends on target and time, and the table only shows target. To bring in time, we simulate.
The chase simulator
The simulator plays the fourth innings one over at a time. For each over it needs two things, given the state at the start of the over: the probability of a wicket and the expected runs. We fit both on real fourth-innings overs from 2002–2018 and keep 2019–2026 for testing. The state variables are the required run rate (runs needed ÷ overs left, capped at 12), wickets down, pitch age, a subcontinent/UAE flag, and a new-ball flag.
📐 Definition — Overs available (fourth innings). Overs available = 5 × 90 − overs bowled before the fourth innings began. It's an upper bound on the time the chasing side really has, because any time already lost to weather or slow over rates is invisible in the data. A real forecaster watching the match knows the true time left; our backtest has to estimate it.
The heart of the simulator is a short vectorised loop over overs, running thousands of simulated chases at once:
for k in range(int(limit.max())):
alive &= k < limit # each simulation has its own overs limit
need = target - sc
rrr = np.clip(need / np.maximum(limit - k, 1), 0, 12)
w = np.clip(wd, 0, 9)
xw = (bw["const"] + bw["rrr"] * rrr + bw["rrr2"] * rrr ** 2 + bw["wd"] * w + bw["wd2"] * w ** 2
+ bw["pitch100"] * pa + bw["sub"] * sub + bw["new_ball"] * nb + shift)
xr = (br["const"] + br["rrr"] * rrr + ...) # same terms, runs model
wk = (rng.random(n) < 1 / (1 + np.exp(-xw))).astype(int)
runs = rng.poisson(np.exp(xr))
sc, wd = np.where(alive, sc + runs, sc), np.where(alive, wd + wk, wd)
won = alive & (sc >= target); lost = alive & ~won & (wd >= 10)
res[won], res[lost] = 1, -1
alive &= ~(won | lost)
(The full function in test_sim.py also draws an occasional second wicket in an over, at the observed rate.) Two optional ingredients make it more honest. The limit array lets each simulation draw its own lost overs from a supplied history: the host country's unbowled-overs record from Section 29.5. And shift adds a per-simulation frailty, a random nudge to the wicket log-odds, standing for "this pitch and this batting side, today, are better or worse than the average".
The fitted models are themselves informative:
Chase model fitted on 26,651 overs from 443 chases (2002-2018); P(2+ wickets | 1+ wicket in an over) = 0.055
Wicket logit coefficients: {'const': -2.13, 'rrr': -0.067, 'rrr2': 0.003, 'wd': 0.023, 'wd2': 0.005, 'pitch100': -0.059, 'sub': 0.008, 'new_ball': 0.262}
Runs (log) coefficients: {'const': 1.152, 'rrr': -0.123, 'rrr2': 0.009, 'wd': -0.046, 'wd2': 0.005, 'pitch100': 0.08, 'sub': -0.014, 'new_ball': 0.032}
Expected runs per over at required rate 2/3/4/5 (2 down, pitch age 300, SENA): [3.03, 2.81, 2.65, 2.55]
P(wicket in over) at the same states: [0.086, 0.082, 0.079, 0.076]
Look at the runs: as the required rate goes up from 2 to 5, expected runs per over go down, from 3.03 to 2.55. Wickets go down too. On average, Test sides chasing don't accelerate when the target gets harder. They do the opposite.
🔍 Why this works. The model is learning behaviour, not ability. A side needing 2 an over is cruising and plays its normal game. A side needing 5 an over in a Test has usually given up on winning and is batting for the draw: blocking, leaving, scoring slowly and losing fewer wickets. Each over in the training data was played by a team that had already chosen a plan, and the plan depended on the state. So the simulator reproduces how Test chases have actually gone, including the switch to survival mode. What it can't do is imagine a side that keeps attacking at 5 an over. When you use it for a decision (should we go for this?), remember that the simulated chasing side behaves like the average past side in that position. It's the same selection logic as Chapter 16's tired-bowler illusion: the data show what captains chose, not what would happen under a different choice.
Scoring the simulator honestly
We simulate every 2019–2026 chase (217 of them) from its first ball, 2,000 times each, and score the three-way forecasts with the multi-class Brier score: the sum over win, draw and loss of (forecast − outcome)², averaged over chases. A perfect forecaster scores 0; always predicting the 2002–18 average shares scores about 0.59. Alongside the simulator we fit the simplest serious rival: a direct multinomial logistic model of the outcome on target, target², overs available and the Asia flag, trained on the same 2002–18 chases.
Backtest on 217 chases, 2019-2026 (multi-class Brier, lower is better):
constant (2002-18 shares) 0.5920 mean P(win/draw/loss) 0.323 / 0.178 / 0.499
direct multinomial (target, overs) 0.2996 mean P(win/draw/loss) 0.375 / 0.108 / 0.517
simulator, no weather 0.3267 mean P(win/draw/loss) 0.485 / 0.032 / 0.483
simulator + host-country weather 0.3178 mean P(win/draw/loss) 0.448 / 0.115 / 0.437
simulator + weather + frailty 0.5 0.3316 mean P(win/draw/loss) 0.462 / 0.118 / 0.420
actual shares 2019-26: {'loss': 0.498, 'win': 0.406, 'draw': 0.097}
Three lessons, in order of importance.
First, the weather matters, and the proxy captures it. Without weather, the simulator gives the draw a 3.2% average probability. In reality 9.7% of these chases were drawn, because the simulator believes every chase gets the full upper-bound overs. Letting each simulation draw its lost overs from the host country's 2001–18 record lifts the average draw forecast to 11.5% and improves the Brier score from 0.3267 to 0.3178. (England's history, for example: 59% of its Tests lost nothing, and the mean was 28.3 overs.) The weather proxy built from unbowled overs, with no weather data at all, makes the forecast better.
Second, frailty didn't help. Adding per-simulation uncertainty about the pitch (frailty 0.5) made the score worse (0.3316). Not every intuitive refinement improves a model; test each one.
Third, the simple model won. The direct multinomial model, five coefficients fitted to 443 rows, scores 0.2996, better than any version of the simulator. For the single question "what are the chances at the start of the fourth innings?", a well-specified small model beats an elaborate Monte Carlo built on 26,651 overs. That's Theme 6 in its purest form: complexity isn't accuracy. The simulator earns its place elsewhere. It can start from any state (210/4 after 61 overs with 95 overs left), which a start-of-innings model can't. And it can answer what-if questions (what if we lose 40 overs to rain? what if the pitch is 50 overs older?) that a direct model never saw in training.
The calibration of the weather simulator:
Calibration of the weather simulator (2019-26):
win: [{'pred': 0.031, 'actual': 0.035, 'n': 57}, {'pred': 0.169, 'actual': 0.1, 'n': 40}, {'pred': 0.418, 'actual': 0.265, 'n': 34}, {'pred': 0.592, 'actual': 0.545, 'n': 11}, {'pred': 0.806, 'actual': 0.786, 'n': 28}, {'pred': 0.965, 'actual': 0.957, 'n': 47}]
loss: [{'pred': 0.016, 'actual': 0.033, 'n': 61}, {'pred': 0.186, 'actual': 0.391, 'n': 23}, {'pred': 0.408, 'actual': 0.357, 'n': 28}, {'pred': 0.602, 'actual': 0.721, 'n': 43}, {'pred': 0.815, 'actual': 0.872, 'n': 47}, {'pred': 0.934, 'actual': 1.0, 'n': 15}]

📊 Figure (described): Two calibration lines against the diagonal. At the extremes (forecasts below 0.1 or above 0.8) both P(win) and P(loss) lie close to the diagonal. In the middle, P(win) sits below the diagonal (forecast 0.418, observed 0.265, from 34 chases) and P(loss) above it (forecast 0.602, observed 0.721, from 43). In mid-range chases the simulator is too optimistic about the chasing side.
At the extremes the simulator is well calibrated. In the middle, where the interesting decisions live, it's too optimistic about the chasing side: chases it gave about 42% were won only 26.5% of the time (34 chases). The likely reasons are ones we can name. Overs available is an upper bound, even with the weather draw. Real chasing sides are often the weaker team (they conceded a first-innings lead, after all), which the simulator doesn't know. And a specific fourth-innings pitch may be worse than the average for its pitch age. Each is a column to add, and a reason the direct model's simplicity wins for now.
The outcome map: the bridge to declarations
Run the simulator over a grid of targets and overs available, with SENA conditions and a pitch 280 overs old, and you get the map every declaring captain carries in their head:
p_draw (rows target, cols overs available; SENA, pitch age 280, no weather):
overs 40 60 80 100 120 150 180
target
150 0.99 0.02 0.00 0.00 0.00 0.00 0.0
200 0.99 0.90 0.00 0.00 0.00 0.00 0.0
250 1.00 0.94 0.65 0.00 0.00 0.00 0.0
300 0.99 0.93 0.76 0.30 0.00 0.00 0.0
350 0.99 0.94 0.78 0.49 0.10 0.00 0.0
400 1.00 0.94 0.81 0.51 0.27 0.00 0.0
450 1.00 0.95 0.79 0.53 0.29 0.05 0.0

📊 Figure (described): Three panels share axes (target on the vertical axis, overs available on the horizontal). P(win) is high only in the bottom-right corner (small targets, lots of time). P(draw) fills the left side, where time is short, and its boundary moves right as the target rises. P(loss) dominates the top right (big targets, lots of time). The draw region has a sharp edge because the simulated chasers score at about 3 an over whatever the target.
Read it from the declaring side. With 100 overs to bowl, a target of 300 gives the chasing side only a 14% chance of winning, a 30% chance of surviving, and a 56% chance of losing. At 120 overs, a target of 350 gives a 76% chance of bowling them out against 14% for the chase. The draw region's sharp edge is partly the model's "about 3 an over" behaviour, but the shape is right: the declaring captain's main enemy is the left side of this map, not the chasing side's batting. That's where Chapter 33 begins, with real declarations, their leads and their outcomes.
⚠️ Common pitfall: treating "overs available" as known. In the data, overs available is 450 minus what's been bowled, an upper bound. In a real match the time left depends on time already lost and the forecast for the rest. That's not a detail: in the backtest it's the gap between a 3.2% and an 11.5% average draw forecast. If your Test model has no weather input at all, its draw probabilities are too low.
🔄 Check your understanding 1. Why does the chase model predict fewer runs per over when the required rate is higher? 2. The direct multinomial model beats the simulator on Brier score. Give two things the simulator can do that the direct model can't. 3. In the outcome map, a target of 250 with 80 overs available gives P(draw) 0.65. What single change would most reduce the draw chance for the declaring side?
Answer
- Because sides facing a high required rate in Tests usually switch to batting for a draw. The model learns that behaviour from the data; it isn't saying batters can't score faster.
- Start from any mid-innings state (score, wickets, overs left), and answer what-if questions about lost overs or pitch age that weren't in the training data. It also gives a whole distribution of outcomes (overs used, scores), not just three probabilities.
- More overs. At 100 overs available, the 250 target's draw chance is 0.00 in the grid (P(win) 0.63, P(loss) 0.37). At that end of the map, time matters more than runs, which is why captains declare earlier rather than bat on for a bigger target.
29.8 A Session-Level Forecasting Framework
The cricket question: if you were the analyst on a Test broadcast or in a dressing room, what would your forecast system look like?
Put the pieces of this chapter together and you get a layered framework, each layer feeding the next:
- Before the toss: the conditions prior. Venue and conditions (Case Study 1 shows how much a venue really wears, after shrinkage), the time of year (the unbowled-overs climatology of Section 29.5) and, if you've merged it, the actual weather forecast. Output: expected deterioration, expected spin share, expected lost overs.
- Each session: the session forecast. At every break, rebuild the state (innings, pitch age, ball age, wickets down, the batters in, conditions) and forecast the next session's runs and wickets with uncertainty. Refit often and weight recent seasons, because the game's tempo has moved (Section 29.6).
- Each innings: the result forecast. From the third innings on, simulate the rest of the match: for the fourth innings, the chase simulator with weather draws; for a third innings, the declaration question of Chapter 33. Report P(win), P(draw) and P(loss) and how they move.
- Always: calibration. Score every forecast after the fact. The two backtests in this chapter found the same failure from different directions: models trained on an older, slower game under-predict wickets and over-predict the chasing side.
What the framework still lacks with public data is worth listing plainly, because it's what separates this chapter from a professional system:
- Weather, beyond the proxy: rain, cloud, humidity, light.
- Pitch reports: grass cover, moisture, cracks, and the curator's own expectation.
- Team strength in the simulator: who is batting and who is bowling. The session model uses batter quality; the chase simulator doesn't yet. Chapter 24's team ratings or Chapter 25's player projections are the natural inputs.
- Real session and day labels, which some commercial ball-by-ball feeds carry and Cricsheet doesn't.
- Women's Test data. There are no women's Tests in this snapshot, so none of these models can yet be checked on the women's multi-day game.
🏏 Eye test: Wendell Baptiste, who bowled seam in Caribbean first-class cricket on pitches that "went to dust by the third afternoon", read the framework and asked one question: "Where's the groundsman?" It's a fair one. Pitches are prepared by people, usually with the home side's attack in mind. That shows up in our data only indirectly, as home advantage and as venue effects. A forecaster who knows the curator's track record, or has seen the strip on the morning of the match, has information no ball-by-ball table contains. The framework is built to absorb that information as a prior, not to pretend it doesn't exist.
🔷 R corner (not run in this book's build). The pitch clock and nominal day in
dplyr, assuming a data frameballswith Cricsheet columnsmatch_id,delivery_seq,is_legal(logical) andruns_total:
r library(dplyr) balls <- balls |> arrange(match_id, delivery_seq) |> group_by(match_id) |> mutate(pitch_age = (cumsum(is_legal) - is_legal) / 6, nominal_day = floor(pitch_age / 90) + 1) |> ungroup() balls |> group_by(nominal_day) |> summarise(run_rate = 6 * sum(runs_total) / sum(is_legal))📋 Try it — Build this metric. Design a single number that tells a broadcaster "how much this pitch has deteriorated so far", usable during a match. Use only what's in Cricsheet plus the conditions bucket. Say how you'd calibrate it and what it would show at the start of the third innings.
Worked answer
One option: a live deterioration index = (balls per wicket so far in this match, top six only) ÷ (expected balls per wicket for this conditions bucket and these innings numbers, from the whole snapshot), shrunk towards 1 with a prior worth, say, 15 wickets. Wickets are scarce, so per-match numbers are noisy (Chapter 6). To calibrate, check across past matches whether the index at the end of the second innings predicts the paired deterioration ratio (Section 29.3) in the third and fourth innings. At the start of the third innings it would show whether this pitch has played harder or easier than a typical pitch at the same stage in the same conditions, which is the comparison commentators make by eye.
🔄 Check your understanding 1. Which layer of the framework would change first if you were handed a reliable weather forecast for the match? 2. Why does the framework insist on scoring every forecast against a simpler rival, not just against a constant?
Answer
- Layer 1, the conditions prior: the host-country lost-overs history would be replaced by a distribution conditioned on the forecast. That flows straight into layer 3, because the chase simulator draws its lost overs from that distribution.
- Because beating a constant is easy (the constant scored 0.592 in the chase backtest). The useful question is whether the extra machinery beats the best simple model, and in Section 29.7 it didn't for the start-of-innings forecast. Without that comparison, complexity looks like progress when it isn't.
Spaced Review
Answer each question before you open it.
From Chapter 10: Top-order batting averages in Chapter 10 fell from 41.97 in the first innings to 30.20 in the fourth. How much of that fall should you attribute to the pitch, given this chapter's paired design?
Answer
Some, but not all. The paired design (same team, same pitch, new ball) shows wickets falling about 11% faster in innings 3 than innings 1, and about 15% faster in innings 4 than innings 2. Chapter 10's 28% fall in average also includes match situation (chasing, setting targets), more not-outs in the fourth innings (15.5%), and different batting sides in different innings. The pitch is a real part of the story, probably less than half of it.
From Chapter 16: Chapter 16 found pace bowlers taking wickets 1.23 times as fast as expected in overs 81–90 (the second new ball). Which of this chapter's three clocks is that, and how would it show up in a pitch-age table?
Answer
The ball clock. In a pitch-age table it appears wherever innings commonly reach their 80th over and wherever a new innings starts with a new ball, such as the dip in spin share at 150–200 overs of pitch age. That's why the session model and the chase model include a new-ball flag alongside pitch age.
From Chapter 6: A venue with 15 Tests shows a late/early runs-per-wicket ratio of 1.13. Should you call it a pitch that gets better?
Answer
Not on that evidence. Fifteen Tests means only a couple of hundred wickets in each half of the match, and a ratio of runs per wicket is noisy. Shrink towards the conditions-bucket mean first: in Case Study 1, Hagley Oval's raw 1.13 shrinks to 0.96. Chapter 6's rule holds: small samples regress to the mean, and the shrunk number is the forecast.
Project Checkpoint: test_sim
Nusrat has been looking forward to this module, because the first Test she ever watched at the ground was at Mirpur and she wanted Crease to tell her what she'd seen. This chapter adds project/crease/test_sim.py, built on Chapter 16's test_bowling.load_test_balls and add_bowler_type.
What the module provides:
| Function | What it does |
|---|---|
add_clocks(balls) |
pitch age, innings start age, wickets down, nominal day and session for every delivery |
day_clock_check(games, balls, rates) |
how often a ⌈overs ÷ R⌉ day clock matches the days played |
deterioration_table(balls, by, width, clock) |
run rate, runs per wicket, balls per wicket by clock bucket |
type_share_table(balls, by, width) |
spin share of typed balls and bowler wickets by pitch age |
paired_innings(balls, first_overs) |
same team, same pitch, new ball: innings 1 v 3 and 2 v 4 |
batter_quality, model_frame, fit_wicket_model |
the per-ball wicket model with controls |
lost_overs_table(games, balls) |
the unbowled-overs weather proxy per match |
session_table, sessions_full |
nominal-session slices and whole sessions |
fit_session_model, session_forecast, simulate_sessions |
Poisson session forecasts and a multi-session simulator |
innings_table, fourth_innings_table, over_states |
innings totals, derived targets, over-by-over chase states |
fit_chase_model, simulate_chase, backtest_chase, multiclass_brier |
the fourth-innings simulator and its scoring |
overs_notation(legal_balls) |
646 → "107.4" |
Nusrat's demo, code/project_checkpoint.py, runs every function on Bangladesh's home Tests:
bd = balls[(balls["host_country"] == "Bangladesh")]
det = ts.deterioration_table(bd, by=["innings"], width=10_000)
pr = ts.paired_innings(bd, first_overs=30)
lo = ts.lost_overs_table(games, balls)
p1 = ts.simulate_chase(model, 280, 120, pitch_age=280, conditions="Subcontinent",
lost_overs=lo.loc[lo["host_country"] == "Bangladesh", "min_lost_overs"].to_numpy())
2. Tests in Bangladesh: 68
innings overs run_rate runs_per_wkt balls_per_wkt
1 7277.33 3.26 37.80 69.53
2 6661.67 3.28 33.79 61.87
3 4630.50 3.37 28.62 50.88
4 2657.67 3.39 28.59 50.62
Spin share of typed balls / bowler wickets by pitch age (100-over buckets): [(0, 56.8, 51.4), (100, 63.1, 62.5), (200, 66.1, 67.1), (300, 71.7, 72.0), (400, 79.2, 78.1)]
Paired 1v3 in Bangladesh (60 Tests): balls per wicket 67.5 -> 54.9
Paired 2v4 in Bangladesh (48 Tests): balls per wicket 59.2 -> 56.6
3. Bangladesh home Tests losing 90+ overs: 9 of 68; by month (Tests, mean unbowled overs): {1: (5, 16.4), 2: (8, 3.4), 3: (5, 2.6), 4: (5, 5.1), 5: (7, 47.5), 6: (1, 265.7), 7: (2, 295.4), 8: (1, 0.0), 9: (1, 0.0), 10: (14, 48.9), 11: (12, 1.3), 12: (7, 37.0)}
5. Chase 220 in 120 overs at pitch age 280, Subcontinent: P(win/draw/loss) 0.76/0.00/0.24; with Bangladesh weather draws 0.65/0.14/0.21
5. Chase 280 in 120 overs at pitch age 280, Subcontinent: P(win/draw/loss) 0.46/0.00/0.54; with Bangladesh weather draws 0.37/0.17/0.46
5. Chase 280 in 90 overs at pitch age 280, Subcontinent: P(win/draw/loss) 0.03/0.48/0.49; with Bangladesh weather draws 0.02/0.61/0.37
"So Mirpur really does turn," Nusrat said. In Tests in Bangladesh, spin bowls 56.8% of typed balls in the first 100 overs and 79.2% after 400. In the paired comparison, a side's third-innings top order loses wickets faster than its first-innings top order (balls per wicket 67.5 → 54.9 across 60 Tests). The second-to-fourth comparison is much smaller (59.2 → 56.6 across 48 Tests), which with samples this size is a reminder to quote intervals rather than single ratios. And the weather line explained something she remembered from home. Tests in the monsoon months are rare, but when they happen they get washed out: the two July Tests lost an average of 295.4 overs. Adding Bangladesh's lost-overs history to a 280-run chase with 120 overs left moves the draw from 0% to 17%, mostly taken out of the chasing side's loss column (0.54 → 0.46). Rain helps the side that's behind.
Later chapters build on test_sim. Chapter 33's declaration model reads the outcome map from the declaring side, and Chapter 39's dashboard gives Tests a page where the session forecast and the three-way result probabilities update at every break.
Chapter Summary
Headline numbers (men's Tests in Cricsheet, December 2001 – October 2026; 899 matches, 1,715,672 legal balls):
| Measure | Value | Definition / filter |
|---|---|---|
| Nominal day correct (R = 90) | 73.3% exact; 24.8% one day early; 0.4% late | Decided Tests (730): ⌈total overs ÷ 90⌉ v days played |
| Runs per wicket by nominal day | 37.41 → 32.87 → 30.53 → 29.30 → 28.27 | All balls, 90-over blocks |
| Run rate by nominal day | 3.30 → 3.38 → 3.26 → 3.25 → 2.99 | Same |
| Paired deterioration ratio, 1 v 3 | 0.888 (95% CI 0.834–0.946), 795 Tests | Balls per wicket, first 30 overs, same batting team |
| Paired deterioration ratio, 2 v 4 | 0.849 (0.789–0.909), 642 Tests | Same |
| By conditions (1 v 3 / 2 v 4) | SENA 0.938 / 0.934; Subcontinent 0.868 / 0.829; West Indies 0.786 / 0.779 | Same |
| Spin share of typed balls | 29.0% (pitch age 0–50) → 59.0% (400+) | Styles table covers 96.9% of Test balls |
| Spin balls per wicket, SENA | 104.6 (0–100) → 60.3 (300+); pace 59.2 → 51.7 | Typed bowler wickets |
| Draws losing 90+ overs | 62 of 169 (36.7%); decided Tests 11 of 730 (1.5%) | Unbowled-overs proxy |
| Time-starved v full-length draws | 68 v 101 | Below/above 369.5 overs (median day-5 result) |
| Hosts losing a full day most often | England 14.3%, Bangladesh 13.2%, West Indies 11.6% | 25+ Tests |
| Draw rate by era | 25.35% (2001–09) → 11.86% (2020–26); mean unbowled overs 24.91 → 21.36 | All Tests |
| Wickets per nominal session | 2.89 mean (variance 4.42); 2022–26: 3.29 | Whole sessions, 29+ overs |
| Morning effect | None detectable: session 2 RR 0.995 (0.962–1.029) | Session Poisson model |
| Fourth-innings outcomes | Win 94.4% (targets ≤150) … 1.1% (401+); 10 of 269 chases of 350+ succeeded | 660 derived targets |
| Chase forecast Brier (2019–26) | Direct model 0.2996; simulator + weather 0.3178; no weather 0.3267; constant 0.5920 | 217 chases |
Decision framework for a Test forecast:
- Name your clock. Innings number, ball age or pitch age, and say which. Treat any reconstructed day or session as a lower bound.
- Untangle before you conclude. Raw curves by pitch age mix the pitch, the batting order and the surviving matches. Use the paired design for pitch effects.
- Ask who bowls, then what it costs. Shares follow captains' choices; balls per wicket by type measures what the pitch gives.
- Price the weather. Use the host country's unbowled-overs history as the default, and replace it with a real forecast when you have one. A Test model without weather under-prices the draw.
- Forecast sessions, then results. Session models for the next two hours; a simulator from any state for the result, scored against a simple direct model.
- Check calibration every season. The game has sped up. Models trained on the past under-predict wickets and over-predict chasing sides.
What's Next
This chapter completes Part V's forecasting toolkit. Part VI turns forecasts into decisions, starting with Chapter 30's question of who should bat where. The fourth-innings outcome map you've just built comes back in Chapter 33, where the captain of the other side has to decide when to declare: how many runs, how many overs, and how much faith to place in the weather.