Kavya Subramanian has seventy seconds between overs to decide what goes on screen, and the scoreboard has just handed her a number she knows she cannot use.
In This Chapter
- 27.1 What a live forecast has to be
- 27.2 Four ways to project a total
- 27.3 How wrong are projections, really?
- 27.4 Who is batting, where, and who is left to bowl
- 27.5 Honest intervals
- 27.6 The same question in other formats
- 27.7 Will this batter get to fifty? Survival and scoring
- 27.8 Four innings of 2026, over by over
- 27.9 Broadcast-ready statements
- Spaced Review
- Project Checkpoint: live.py
- Chapter Summary
- What's Next
Chapter 27 — In-Match Forecasting: Real-Time Prediction of Scores, Outcomes, and Individual Milestones
Kavya Subramanian has seventy seconds between overs to decide what goes on screen, and the scoreboard has just handed her a number she knows she cannot use.
It is 11 April 2026, Sunrisers Hyderabad against Punjab Kings in New Chandigarh, and Sunrisers have finished the powerplay at 105 for 0. Abhishek Sharma and Travis Head have hit everything. The stadium feed's default graphic, the "projected score at the current run rate", reads 350. Kavya produces the live graphics for The Long Room, a digital cricket outlet, and her rule is that nothing goes on screen that she could not defend in front of a statistician the next morning. Three hundred and fifty is the run rate after six overs (17.5 an over) multiplied by twenty. It assumes the next fourteen overs will go exactly like the first six: no wickets, no spinners, no fielders back on the rope. She has never seen an innings that did that.
Her own model says something different. Fitted only on men's T20 first innings before 2023 and centred on the scoring level of the 2026 IPL, it gives a median of 257, an 80% range of 221 to 298, and a 9.3% chance of 300 or more. It is still a remarkable forecast — only one other complete IPL first innings in the data had passed 100 by the end of the powerplay (125/0, which finished on 266) — but it is a range, and it treats 350 as the tail it is.
Here is what happened next, from the ball-by-ball data:
Over-by-over projections (state at the end of the over):
over score wkts_lost rr q10 q50 q90 p_ge_200 p_ge_250 p_ge_300
6 105 0 350.000 221.0 257.0 298.0 0.982 0.592 0.093
8 120 0 300.000 224.0 257.0 295.0 0.989 0.610 0.075
9 123 2 273.333 205.0 235.0 268.0 0.938 0.283 0.009
10 132 2 264.000 210.0 238.0 269.0 0.966 0.316 0.007
15 176 3 234.667 219.0 237.0 256.0 0.998 0.199 0.000
19 214 5 225.263 221.0 227.0 235.0 1.000 0.000 0.000
overs 1-6 : 105 runs, 0 wkts
overs 7-10: 27 runs, 2 wkts
overs 11-15: 44 runs, 1 wkts
overs 16-20: 43 runs, 3 wkts
Sunrisers made 219 for 6. Abhishek's 74 came off 28 balls; Head made 38 off 23 and Heinrich Klaasen 39 off 33. The last fourteen overs produced 114 runs, about eight an over. The final total fell just below the model's 10th percentile from the end of the powerplay (221). Punjab Kings chased it down with seven balls to spare and six wickets standing.
So was the model wrong? It said that about one innings in ten from that position finishes below 221, and this was one of them. If you only ever see one innings, you cannot tell a good forecast from a bad one. You need thousands, scored honestly, before anyone looked at how they ended. That is what this chapter does.

📊 Figure (described): Over-by-over projections for Sunrisers Hyderabad's innings on 11 April 2026. A green band (the model's 80% range) and a green line (its median) sit far below a grey dashed line, the scoreboard's run-rate projection, which climbs to 350 after six overs. The median peaks at 257 after the powerplay and drifts down as wickets fall; a dotted black line marks the actual final, 219, which sits just under the band from overs 6 to 8 and inside it afterwards. The run-rate line only meets reality in the last few overs.
This chapter builds the live layer of Crease: a projected total with an honest range, the probability that a batter reaches a fifty or a hundred, and a short line of text a broadcaster can put on screen without embarrassment. Along the way we test a claim that shows up in coaching manuals and commentary boxes: that after the powerplay a good model can predict a T20 total "within ±15 runs, typically." It cannot, and we will measure by how much.
🏏 Fan Track: Read the hook, §27.3 (how wrong projections really are), §27.8 (four real milestone chases from 2026) and §27.9 (what a fair on-screen statement looks like). Skip the code blocks; the figures carry the argument.
📊 Analyst Track: Everything, especially §27.2 (four projection methods side by side), §27.5 (intervals and why the Monte Carlo ranges were too narrow) and §27.7 (the structural milestone model versus the learned one).
🎰 Betting Track: §27.3, §27.5 and §27.9. In-play "total runs" lines are projections with a margin. If you know how wide the honest range is at each over, you know how much a line can be wrong before it is mispriced. Chapter 35 builds the market side.
27.1 What a live forecast has to be
The cricket question. Halfway through an innings, a captain, a broadcaster and a punter all ask some version of where is this going? The captain wants to know what to aim for. The broadcaster wants a number that is interesting and true. The punter wants to know whether the market's line is fair. They are all asking for a forecast: a statement, made before the outcome is known, about something that has not happened yet.
That sounds obvious, and it is where most live forecasting goes wrong. A model that is fitted on whole matches and then "tested" on the same matches has seen the future. A projection that uses a batter's season average when the season is not over has seen the future. Chapter 37 showed how easily a broadcast stat pack leaks: KL Rahul's 2026 IPL line on the morning of 8 April was 1 run in 2 innings, not the 593 runs he finished with. Every feature in this chapter is something an analyst could have known at that ball, and every model is tested on years it never saw.
📐 Definition — projected total, projection interval, as-of. At the end of over k of a first innings, with score S and W wickets down, the projected total is a forecast of the final total T: a single number (we use the median of the forecast distribution, or the model's mean where only a mean exists). A projection interval at level L (for example 80%) is a range [lo, hi] that the model says contains T with probability L. A feature is as-of if it uses only information available before that ball: earlier matches, earlier balls of this match, and the match's pre-match context.
The data. We use the same pool as Chapters 19 and 20: men's T20 first innings from 12 competitions (T20 internationals plus the IPL, BBL, PSL, CPL, SA20, ILT20, MLC, BPL, LPL, the T20 Blast and the Syed Mushtaq Ali Trophy), in 20-over matches decided without a rain rule. Of 9,117 such first innings, 8,917 ran their full course (all out or all 120 balls bowled); those are the innings whose final total is a fair target. Every model is fitted on the 5,255 innings before 2023 and tested on the 3,662 innings from 2023 to 2026, 281 of them in the IPL. This is the book's standard out-of-time split (Chapters 9 and 20), and it is a hard test: the IPL's Impact Player era began in 2023, and scoring rose almost everywhere.
Two ingredients come from earlier chapters, and we will lean on them all the way through:
- The scoring environment,
env_par, from Chapter 20: the mean first-innings total of the previous 60 matches in the same competition (T20 internationals split into full member against full member, and everything else), shrunk toward the pool. It is past-only, so it is legal live. For the SRH–PBKS match it was 186.4; for the 2026 men's T20 World Cup final it was 173.6. - The Expected Runs table and the Markov chain from Chapter 19: the average runs still to come from every state (balls left, wickets left), and a ball-by-ball model that can play the rest of an innings out thousands of times. The hybrid table fitted on pre-2023 innings has a par of 158.6.
What does a live forecast have to be? Three things, and the chapter measures all three:
- Accurate — small errors on average (we report mean absolute error, MAE, in runs).
- Honest about uncertainty — an "80% range" should contain the real total about 80% of the time. This is calibration, the threshold concept of Chapter 20, applied to ranges instead of win probabilities.
- Sayable — a statement a viewer understands in four seconds without being misled.
🔄 Check your understanding 1. Why must the scoring environment be computed from previous matches only? 2. A model's 80% ranges contain the real total in 95% of innings. Is that good news?
Answer
1. Because live, the current match's own total is unknown — using it (or later matches) would leak the answer into the forecast and make the back-test look better than any live system could be. 2. No. The ranges are too wide: the model is under-confident. An honest 80% range is wrong one time in five. Ranges that are never wrong are not saying much.
27.2 Four ways to project a total
The cricket question. Sri Lanka's analyst in the dressing room at Newlands in January 2017 (Anchor A) watches South Africa reach 79 for 1 after ten overs. What total should Sri Lanka plan to chase? There are several sensible answers, and they get steadily more sophisticated (§27.9 gives this match's live numbers).
1. The run-rate projection. Current run rate times 20 overs. It is the number every scoreboard shows, and it needs nothing but the score.
📐 Definition — run-rate projection. RRP = S × 120 / b, where S is the score and b the legal balls bowled. It ignores wickets, ignores the fact that T20 scoring accelerates at the death, and treats the first over as a sample of the whole innings.
2. The Expected Runs table. Score plus the average runs still to come from this state (balls left, wickets left), counted from history: Chapter 19's ER table. It knows wickets and it knows the innings accelerates.
3. The table rescaled to the environment. Chapter 19 found that the IPL's two scoring eras differ by about 11 runs per state but only about one point of resources — the shape of an innings barely changed even though the level jumped. So we keep the shape and change the level: multiply the runs to come by env_par / par. This is the projection behind Chapter 20's first-innings win probability (winprob.ParWP).
4. A learned model. Fit a regression of the runs still to come on the state and the environment (and, in §27.4, on who is batting, where, and who is left to bowl). One model per checkpoint, so the over-6 model can weigh wickets differently from the over-15 model.
5. Monte Carlo. Chapter 19's Markov chain plays the rest of the innings out ball by ball, 12,000 times, from the current state. We centre it on the environment by tilting its run-scoring probabilities. Chapter 19 gave each simulated innings its own random tilt to widen the spread; here we choose the average tilt so that the chain's expected total from the first ball equals env_par. The output is a whole distribution, so medians, ranges and "chance of 200+" all come out of one simulation.
The module crease.live wraps all five. The core of the back-test looks like this:
from crease import live, states as st
s, g = live.load_first_innings() # states + env_par, 12 men's T20 comps
sn = live.snapshots(s, g, overs=range(1, 20)) # one row per innings per over
sn = sn[sn["complete"]]
train = s[(s["year"] < 2023) & s["complete"]]
er = st.ERTable(120, backstop="markov").fit(train) # Chapter 19 hybrid table
chain = live.LiveChain(tau=0.0, tau_future=0.07).fit(train)
te = sn[sn["year"] >= 2023].copy()
te["rr"] = live.rr_projection(te["score"], te["legal_before"])
te["table"] = live.table_projection(er, te["score"], te["balls_left"], te["wkts_left"])
te["env"] = live.table_projection(er, te["score"], te["balls_left"], te["wkts_left"], te["env_par"])
te["linear"] = live.ProjectionModel("linear", live.BASE_FEATURES, er).fit(sn[sn["year"] < 2023]).predict(te)["mean"]
te["chain"] = chain.project(te)["q50"] # median of the simulated totals
Full script: code/02_projection_backtest.py. The two settings in LiveChain (tau and tau_future) control how wide the simulated ranges are; §27.5 explains where the values come from.
⚠️ Common pitfall: projecting from the scoreboard's run rate. The run-rate projection is not just noisy; it is biased low for most of the innings, because T20 scoring accelerates. Across all 2023–26 test innings it was on average 10.2 runs too low after 10 overs and 8.3 too low after 15. In the very first overs it can be wildly high (after one over its mean absolute error is 71.8 runs). If you must show a run-rate line, show it as what it is ("at this rate") and never as a forecast.
27.3 How wrong are projections, really?
The cricket question. Commentators say "they're heading for 190" with total confidence. How far from 190 do such innings actually finish?
Here are the real, out-of-time errors at the three checkpoints most broadcast graphics revolve around — the end of the powerplay (6 overs), halfway (10) and the start of the death (15):
ALL men's T20, 2023-26: n innings at over 6/10/15 = 3662/3654/3600
mae:
over 6 10 15
method
run-rate x20 27.6 20.9 13.6
ER table (era-blind) 25.2 19.4 12.3
ER table x environment 23.7 18.5 11.9
linear (state+env) 22.8 17.6 11.5
Monte Carlo chain 23.7 18.5 11.9
within_15:
over 6 10 15
method
run-rate x20 34.9% 45.0% 63.1%
ER table (era-blind) 37.1% 47.0% 67.0%
ER table x environment 40.0% 48.4% 68.8%
linear (state+env) 41.0% 51.1% 71.0%
Monte Carlo chain 40.6% 50.4% 70.1%
Read the second table first. After the powerplay, the best method lands within 15 runs of the real total in 41% of innings. Not "typically" — less than half the time. The ±15 band only holds for half of innings from over 10, and for 80% of innings only from over 17:
The '±15 after the powerplay' claim (ALL men's T20, test years):
over 6 linear : MAE 22.8 median |err| 18.5 within ±15 41.0% half-width for 80% of innings ±37 for 90% ±47
over 10 linear : MAE 17.6 median |err| 14.6 within ±15 51.1% half-width for 80% of innings ±29 for 90% ±37
over 15 linear : MAE 11.5 median |err| 9.8 within ±15 71.0% half-width for 80% of innings ±18 for 90% ±23
IPL only, over 6, linear: MAE 20.8, within ±15 43.4%, 80% half-width ±36
first over at which ±15 holds for at least half / 80% of innings: 10 / 17
So the honest version of the claim is: after the powerplay, a good projection is typically about 20–23 runs out, and to be right four times in five you need a range of about ±37 runs. "Within ±15" is roughly a 40% statement after 6 overs, a 50% statement after 10, and a 70% statement after 15.

📊 Figure (described): Two grouped bar charts of mean absolute error (runs) at overs 6, 10 and 15, one for all men's T20 and one for the IPL, both 2023–26. In every group the grey run-rate bar is tallest; the era-blind table is next (and much worse in the IPL after 6 overs, 26.8); the environment-scaled table, the linear model and the Monte Carlo chain are close together. A dotted line at 15 runs sits well below every bar at overs 6 and 10 and just above them at over 15.

📊 Figure (described): Three histograms of projection minus actual (runs) for the linear model after 6, 10 and 15 overs, with a grey band marking ±15. After 6 overs the histogram is wide (most errors between −50 and +50) and only 41% of innings fall in the band; after 10 overs it narrows (51%); after 15 overs most of the mass is inside the band (71%). The tails are long on both sides at every checkpoint.
What do the methods tell us about the game?
- The run-rate projection is the worst method at every checkpoint, by 4–5 runs of MAE after the powerplay. It is also the most volatile: in §27.9 we will see it move twice as much per over as the model's median.
- The era problem is real. In the IPL, the era-blind table was on average 20.1 runs too low after 6 overs (2023–26). Rescaling to the environment removed almost all of that bias (−3.0) and cut the MAE from 26.8 to 20.6. Across the whole pool the era-blind table's bias was only −2.4 runs after 6 overs, because most competitions' scoring moved far less than the IPL's.
- Beyond the environment, sophistication buys little. The linear model, the environment-scaled table and the Monte Carlo chain are within about one run of each other. The chain and the environment table give almost identical medians, because the chain is a ball-by-ball version of the same history.
- The IPL is slightly more predictable than the pool, not less: 20.8 runs MAE after 6 overs against 22.8 overall. The pool includes associate T20 internationals, where mismatches make totals swing wildly (§27.5).
What would the pre-match forecast alone have done? Using nothing but env_par, the MAE is 31.9 runs. Six overs of watching cuts that to about 23; ten overs to about 18; fifteen to under 12.

📊 Figure (described): Mean absolute error by over (1 to 19) for the five methods, 2023–26 men's T20. Four lines start near 31 runs after one over and fall steadily to about 4 runs after 19 overs, close together throughout; the run-rate line starts off the chart's scale (71.8 after one over), falls steeply, and stays the highest line until the last overs. A dotted line at 15 runs is crossed at about over 11 by the model lines and about over 13 by the run-rate line.
🏏 Eye test: Wendell Baptiste, who coaches the Port of Spain Pelicans, watched the SRH innings on a phone in the nets. "One-oh-five for none. Every coach in the world knows what happens next: the captain goes to his spinners, puts five men back, and dares you to keep going. Three-fifty was never on." He is right about the mechanism. The model does not know about fielders on the rope, but it has seen thousands of innings where the powerplay ended and the scoring rate fell, and that is why its median was 257, not 350. Where the coach adds something the data cannot is this captain, these spinners, this boundary. The data adds the base rate a single memory cannot hold: from 105/0, totals between 221 and 298 cover 80% of what has happened.
🔄 Check your understanding 1. After 10 overs the linear model's median absolute error is 14.6 runs. Roughly what share of innings finish within ±15 of the projection? 2. Why did rescaling to the environment matter so much more in the IPL than across the whole pool?
Answer
1. About half — the median absolute error is the error that half the innings beat. The table says 51.1%. 2. Because IPL scoring jumped after 2023 (Impact Player era), so a table fitted before 2023 sat about 20 runs too low after the powerplay. In competitions whose level did not move much, the old table's level was already about right.
27.4 Who is batting, where, and who is left to bowl
The cricket question. Two sides are 80 for 2 after ten overs. In one, a proven hitter has just walked in; in the other, a bowler who bats a bit is padded up next because the top order has been shuffled. Every commentator would project them differently. So would every coach. Does the data agree, and by how much?
A state-only projection treats those two innings as identical. A richer model can add four kinds of live information, every piece of it as-of:
📐 Definition — live context features. - Crease quality (
c_sr,c_out): the two batters at the crease, described by their shrunk career strike rate and shrunk dismissals per ball across all men's T20 in the data before this match. Shrinkage adds 100 pseudo-balls at the league rate to the strike rate and 554 to the dismissal rate — the balls at which each statistic is about half signal, half noise (Chapter 6). Also their runs and balls so far in this innings and how many of the two are new (fewer than 10 balls faced). - Venue (venue_eff): the ground's past-only effect — the average of (first-innings total −env_par) in earlier matches there, shrunk with 30 pseudo-matches of zero. - Momentum (rr_last3): runs in the previous three overs. - Attack still to come (att_rel): the quota-weighted, shrunk economy (487 pseudo-balls, the Chapter 25 constant) of the bowlers who have already bowled and still have overs left, with the league economy for overs that must come from someone else; divided by the league economy.
We add each group to the state-and-environment model, refit before 2023 and test on 2023–26. Both a linear regression and gradient-boosted trees (xgboost) get the same chance:
B = live.BASE_FEATURES # score, wkts_lost, env_par, er_env
GROUPS = {"state+env": B, "+venue": B + live.VENUE_FEATURES, "+momentum": B + live.MOMENTUM_FEATURES,
"+crease": B + live.CREASE_FEATURES, "+attack": B + live.ATTACK_FEATURES,
"all": B + live.VENUE_FEATURES + live.MOMENTUM_FEATURES + live.CREASE_FEATURES + live.ATTACK_FEATURES}
for kind in ("linear", "xgb"):
for name, feats in GROUPS.items():
m = live.ProjectionModel(kind, feats, er).fit(train_snaps)
pred = m.predict(test_snaps)["mean"]
MAE, test 2023-26, scope = all:
over 6 10 15
kind features
linear state+env 22.76 17.64 11.49
+venue 22.59 17.57 11.46
+momentum 22.76 17.60 11.47
+crease 22.37 17.35 11.28
+attack 22.58 17.47 11.43
all 22.11 17.11 11.21
xgb state+env 22.88 17.80 11.63
all 22.08 17.32 11.34
Best model per checkpoint (all men's T20) and gain over linear state+env:
over 6: xgb all MAE 22.08 (gain 0.68 runs), within ±15 42.4%
over 10: linear all MAE 17.11 (gain 0.53 runs), within ±15 52.8%
over 15: linear all MAE 11.21 (gain 0.27 runs), within ±15 72.0%
Full script and the IPL-only table: code/03_features.py.
The context helps, in the direction every coach would predict, and by about half a run of MAE. The batters at the crease are the most useful group; venue and the remaining attack add a little; momentum (the last three overs) adds almost nothing once the score and wickets are known. The trees do no better than a straight line except at over 6, and only by 0.03 runs there.
What did the linear model learn? Expressed as the effect of a one-standard-deviation change in each feature on the runs still to come:
Effect of a 1-sd change (train sd) on runs to come:
c_sr over 6: +3.5 (sd 9.01) over 10: +2.5 (sd 8.94) over 15: +1.7 (sd 8.8)
venue_eff over 6: +1.9 (sd 3.56) over 10: +1.0 (sd 3.56) over 15: +0.3 (sd 3.55)
att_rel over 6: +1.4 (sd 0.0204) over 10: +1.2 (sd 0.0266) over 15: +0.6 (sd 0.0282)
rr_last3 over 6: +0.0 (sd 8.63) over 10: +1.5 (sd 7.46) over 15: +0.6 (sd 8.79)
A pair at the crease whose career strike rates are 9 points above average (one standard deviation) is worth about 3.5 extra runs from the end of the powerplay. A pair 18 points above average — two genuine hitters rather than two accumulators — is worth about 7. Real, but small next to the 37-run half-width of an honest 80% range.
In the IPL the gain disappears: the linear model with everything (20.85 MAE after 6 overs) is no better than state and environment alone (20.76). With only 281 test innings, that is within noise either way; but it is a warning against assuming that a richer model is automatically a better one.

📊 Figure (described): Two horizontal bar charts (linear and xgboost) showing how many runs of MAE each feature group saves compared with the linear state-and-environment model, at overs 6, 10 and 15 (2023–26, all men's T20). Every bar is under one run. "+crease" is the largest single group; "all" is largest overall at about 0.5–0.7 runs; "+momentum" is close to zero; for xgboost the state-and-environment bar is slightly negative (trees are a little worse than the line on the same inputs).
🔍 Why this works (and why it does not work better): After ten overs, most of what will decide the total has not happened yet. The two batters at the crease will probably face only part of the remaining 60 balls: the Kaplan–Meier curve in §27.7 shows that only 18% of T20 batters last more than 30 balls. Then come batters whose order we do not even know (Cricsheet records who batted, not who was listed to bat next), bowlers whose sequence the captain has not chosen, and 60 deliveries of luck. Knowing the present perfectly shrinks the error only a little, because the future is most of the error. That is the deep reason the ±15 claim fails: it is not that our models are crude, it is that the remaining innings is genuinely uncertain.
🔄 Check your understanding 1. A pair at the crease with career strike rates 18 points above average is worth about how many extra runs from the end of the powerplay, according to the linear model? 2. Momentum (runs in the last three overs) added almost nothing once score and wickets were known. Give a cricket reason why.
Answer
1. About 7 runs (3.5 per standard deviation of 9 points, times two) — real, but a fifth of the honest 80% half-width (±37). 2. The last three overs are already inside the score, and a hot spell is usually followed by a bowling change or a field change; what is left of "momentum" after that is mostly noise.
27.5 Honest intervals
The cricket question. A broadcast graphic says "80% of similar innings finish between 165 and 200". Is that sentence true — do 80% of them?
The Monte Carlo chain gives intervals for free: simulate the rest of the innings thousands of times and read off the 10th and 90th percentiles. Chapter 19 found that the raw chain's simulated totals were too narrow (a spread of 31.1 runs against the real 38.3) until each innings got its own scoring "tilt". Live, we have more information than Chapter 19 did, and a natural idea about how to use it.
🧩 Productive struggle. Before reading on, decide what you believe. A team is 60/0 after six overs where the environment says a typical side would be about 48/1. Should the model expect more runs from here than it would for a side at a normal 48/1 with the same wickets, because the high score suggests a flat pitch, a short boundary or weak bowling? If yes, by how much? Write down a number of extra runs before you look at the answer below.
The idea is a Bayesian update of the innings' tilt. Each innings has its own unknown scoring level θ (the pitch, the ground, the two teams). Before the first ball θ sits at the environment's level. Every run scored above or below what the chain expected for the balls and wickets used is evidence about θ, and with the chain's per-ball variance the update has a closed form (it is in the LiveChain docstring). A second, separate setting lets the rest of the innings differ from the part already played: new batters, the death bowlers, an older ball. That one is not revealed by watching; it just widens the range.
📐 Definition — the two spread settings, and pinball loss.
tau(τ) is the prior standard deviation of the innings' tilt that the score so far can update;tau_future(τ_f) is an extra, independent tilt for the remaining balls. Both are chosen by pinball loss on training innings only. For a forecast quantile q at level τ_q and outcome y, the pinball loss is τ_q(y − q) if y ≥ q and (1 − τ_q)(q − y) otherwise. Summed over the 10th, 50th and 90th percentiles it rewards ranges that are both narrow and honest — a proper scoring rule for quantiles, the way the Brier score is for probabilities.
We tuned both on 5,000 snapshots from before 2023 (code/04_intervals.py):
Tuning on 5,000 pre-2023 snapshots (overs 6/10/15):
tau_future 0.00 0.03 0.05 0.07 0.09
tau
0.00 15.335 15.242 15.175 15.115 15.134
0.01 15.306 15.234 15.170 15.124 15.136
0.02 15.281 15.229 15.171 15.133 15.154
0.04 15.488 15.446 15.391 15.366 15.406
0.06 16.166 16.128 16.089 16.067 16.109
Best (lowest pinball): tau = 0.0, tau_future = 0.07 (pinball 15.115, training 80% coverage 77.8%)
The update did not help. The best score is at τ = 0: once the chain knows the environment, the balls left and the wickets lost, letting the runs already scored push the tilt makes the forecast slightly worse. Larger values are clearly worse (15.37 at τ = 0.04). What the data rewarded instead was the future spread: τ_f = 0.07 lifted training coverage from 71% to 78%.
This is a useful negative result, and an honest answer to the productive-struggle question. The fast start does carry information: the linear model in §27.4 gives about 0.32 extra runs to come per run already scored at over 6, holding wickets and environment fixed (code/03_features.py), so 12 runs ahead is worth roughly 4 more. But the chain's state already carries most of what a fast start says, through the wickets column — sides at 60/0 are also sides with all ten wickets in hand — and the extra signal is too weak and too noisy for the ball-by-ball model to use well. The tuning tells us so before we ever touch the test years. We keep the update in the code (with τ = 0 as the default) because a franchise with a better chain — one that knows the real batting order — might find it pays.
Now the test. How often did the real 2023–26 totals fall inside each model's 80% range?
Nominal 80% intervals, test 2023-26, scope = all:
coverage width
over 6 10 15 6 10 15
method
Chapter 20 par projection 0.736 0.749 0.756 66.509 53.950 36.081
chain, no extra spread 0.641 0.667 0.681 53.474 43.637 29.055
chain, tuned 0.726 0.733 0.732 63.381 50.704 32.289
linear + residual quantiles 0.746 0.755 0.769 64.099 51.783 34.306
Nominal 80% intervals, test 2023-26, scope = ipl:
coverage width
over 6 10 15 6 10 15
Chapter 20 par projection 0.847 0.854 0.879 77.506 63.606 42.780
chain, no extra spread 0.744 0.769 0.768 59.673 48.861 31.668
chain, tuned 0.843 0.840 0.829 73.085 57.918 36.221
linear + residual quantiles 0.765 0.779 0.825 64.099 51.783 34.306
Three findings:
- Chapter 19's chain, unwidened, is over-confident. Its 80% ranges caught only 64–68% of real totals. Narrow ranges look impressive on screen and are wrong one time in three.
- Widened, every method lands in the low-to-mid 70s across the whole pool — still short of 80%. The linear model with residual quantiles (the empirical spread of its training errors, over by over) does best on average, at 75–77%.
- In the IPL the tuned chain is honest (83–84%), and Chapter 20's par projection is slightly too wide (85–88%). The pool's shortfall comes from somewhere else.
Where? The coverage of the tuned chain's 80% range at over 10, by competition group:
Tuned chain, over 10, 80% coverage by competition group (n >= 100):
size mean
env_group
t20s_male_assoc 1548 0.649
sat 118 0.712
t20s_male_fm 303 0.756
bpl 171 0.784
ntb 469 0.825
ipl 281 0.840
Associate T20 internationals — 1,548 of the 3,654 test innings, 42% of the sample — are covered only 65% of the time. Since the ICC extended T20I status to all its members (2018 for women, 2019 for men), the data are full of mismatches: a side making 250 against a side that cannot bowl, and the reverse. The environment knows the average level of associate cricket, not that tonight's opponent is the weakest in the group. For full-member franchise leagues the tuned ranges are about right.

📊 Figure (described): Nominal interval level (50%, 80%, 90%) on the horizontal axis against the share of real 2023–26 totals inside the interval, for four methods across all men's T20. Every line sits below the dotted diagonal of perfect calibration. The unwidened chain is lowest (40%, 66%, 78%); the tuned chain, the linear model with residual quantiles and the Chapter 20 par projection cluster a few points below the diagonal (about 45%, 73–76%, 84–87%).
⚠️ Common pitfall: tuning the spread on the test years. It would have been easy to pick τ_f so that test coverage came out at exactly 80%. That number would be a lie: the test years would no longer be a test. We chose the setting on pre-2023 innings and report what happened afterwards, shortfall and all. If you want to fix associate coverage, choose a separate, wider setting for associate cricket using associate innings from the training years (Exercise C4), then test it on years it has not seen.
🔄 Check your understanding 1. The tuned chain's 80% ranges cover 84% of IPL totals and 65% of associate T20I totals. What would you change for each? 2. Why is pinball loss a better tuning target than "coverage closest to 80%"?
Answer
1. Nothing urgent for the IPL (slightly wide is the safer error). For associates, a wider spread fitted on associate training innings, or better information about team strength (an Elo gap, as Chapter 20 used for win probability) so the centre moves for mismatches. 2. Because coverage alone can be gamed by any range of the right width placed anywhere; pinball loss also rewards getting the centre right and keeping ranges narrow. It is minimised by the true quantiles.
27.6 The same question in other formats
The cricket question. Is the ±15 claim any closer to true in women's cricket, where totals are lower, or in ODIs, where there is more time for things to even out?
We repeat the back-test for women's T20 (T20Is, WPL and WBBL) and for ODIs between full members, men's and women's, with the same methods and the same 2023 split (code/05_formats.py). ODI checkpoints are after 10, 20, 30 and 40 overs.
Women's T20 (T20Is, WPL, WBBL): complete first innings train 1,055 / test 1,528; test mean total 124.6 (sd 43.3)
after 6 overs (n 1528): MAE env 22.4 | linear 19.5 | chain 22.4 (15.6% of mean total); within ±15 (linear) 46.2%
after 10 overs (n 1525): MAE env 16.8 | linear 14.6 | chain 16.9 (11.7% of mean total); within ±15 (linear) 58.5%
after 15 overs (n 1483): MAE env 9.7 | linear 8.8 | chain 9.7 (7.1% of mean total); within ±15 (linear) 82.7%
women's full-member T20Is only, after 6: n 267, MAE linear 19.7, within ±15 41.9%
Men's ODIs (full members): complete first innings train 1,518 / test 228; test mean total 270.7 (sd 73.9)
after 10 overs (n 228): MAE env 50.6 | linear 49.0 | chain 49.8 (18.1% of mean total); within ±15 (linear) 22.8%
after 20 overs (n 227): MAE env 38.1 | linear 36.7 | chain 37.5 (13.6% of mean total); within ±15 (linear) 30.0%
after 30 overs (n 220): MAE env 28.5 | linear 27.4 | chain 28.0 (10.1% of mean total); within ±15 (linear) 37.3%
after 40 overs (n 200): MAE env 17.3 | linear 17.0 | chain 17.1 (6.3% of mean total); within ±15 (linear) 51.5%
Women's ODIs (full members): complete first innings train 308 / test 173; test mean total 240.7 (sd 75.4)
after 10 overs (n 173): MAE env 47.2 | linear 43.4 | chain 47.2 (18.0% of mean total); within ±15 (linear) 19.1%
after 40 overs (n 151): MAE env 19.3 | linear 18.1 | chain 19.2 (7.5% of mean total); within ±15 (linear) 48.3%

📊 Figure (described): Left: mean absolute error in runs against the share of the innings completed, for men's T20, women's T20, men's ODIs and women's ODIs (linear model, 2023–26). The two ODI lines start near 45–50 runs and finish near 17–18; the two T20 lines start near 20–23 and finish near 9–11. Right: the same errors as a share of the mean first-innings total — now the four lines almost lie on top of each other, from about 18% of the total a sixth of the way in to about 6–8% three-quarters of the way in.
The right-hand panel is the lesson. In proportion, every format is about equally predictable at the same fraction of the innings: about 18% of the total a fifth of the way in (ODIs after 10 overs), 14–16% at 30–40% of the way (T20 after 6 overs, ODIs after 20), 10–12% from halfway to 60%, and 6–8% with a quarter of the innings or less to go. A fixed "±15 runs" means very different things: in women's T20 after 15 overs it is an 83% statement (totals are lower, so 15 runs is a larger share), in a men's ODI after 30 overs it is a 37% statement.
Two other things stand out:
- Women's cricket gains more from learning. The linear model beats the environment table by 2.9 runs after 6 overs in women's T20, against 0.9 in men's. A likely reason (we have not tested it): early wickets cost more in the women's game, where batting depth varies more between teams, and a regression fitted on women's innings learns that weighting, while the chain had only 1,055 training innings to learn its shape from.
- Women's T20 intervals were the least honest (66–71% coverage for nominal 80% with the men's spread setting). Case Study 2 works through why and what a women-specific setting does.
🔄 Check your understanding 1. "Within ±15 runs" is an 83% statement after 15 overs of a women's T20 innings but only a 37% statement after 30 overs of a men's ODI. Why? 2. If you had to give a format-free rule of thumb for projection error, what would it be?
Answer
1. Because 15 runs is a much larger share of a women's T20 total (mean 124.6 in the test years) with five overs left than of a men's ODI total (mean 270.7) with twenty overs left. Error scales with the runs still to come. 2. As a share of the total: roughly 18% a fifth of the way in, about 11% at halfway, about 7% with a quarter to go — in men's and women's T20 and ODIs alike.
27.7 Will this batter get to fifty? Survival and scoring
The cricket question. A top-order batter is on 35 off 24 after ten overs. What is the chance they make fifty? A hundred? Commentators say "he's set, he'll go big" or "she needs to kick on". The honest answer combines two things: how long a batter on this score typically survives, and how fast he scores while he does.
📐 Definition — milestone probability. For a batter on r runs with n legal balls left in the innings, P(milestone m) is the probability that the batter's final score in this innings is at least m. It depends on (a) survival — how many more balls the batter will face before being dismissed or the innings ending — and (b) scoring — runs per ball faced while batting.
Survival first. Chapter 10 measured Test batting survival with the Kaplan–Meier estimator, which handles censoring: a batter who is not out when the innings ends has not "failed to survive"; we just stopped watching. The same tool works in T20, where censoring is common (the 20 overs run out):
from lifelines import KaplanMeierFitter
kmf = KaplanMeierFitter().fit(km["faced"], km["out"].astype(bool))
Kaplan-Meier (men's T20 first innings 2023-26, 27,956 batter innings, 83.5% dismissed):
P(face more than 10 balls) = 0.598
P(face more than 20 balls) = 0.329
P(face more than 30 balls) = 0.176
P(face more than 40 balls) = 0.089
P(face more than 50 balls) = 0.039
median balls survived 13; naive share facing >30 balls 0.139
P(survive to 40 | survived 20) = 0.270

📊 Figure (described): A Kaplan–Meier survival curve for men's T20 first-innings batters, 2023–26: the probability of still batting after a given number of balls faced. It falls steeply — 60% after 10 balls, 33% after 20, 18% after 30, under 10% after 40 — with a shaded confidence band too narrow to see at this sample size.
The median T20 innings lasts 13 balls. Only 17.6% of batters face more than 30, and the naive count (13.9%) understates even that, because it treats not-out batters who ran out of overs as if they had been dismissed. Survival conditional on having lasted is better than the raw curve suggests: of batters who reach 20 balls, 27% go on past 40.
Now two ways to get a milestone probability.
The structural model builds the answer from parts: each ball the batter faces is a dismissal with probability h (their shrunk career dismissal rate, times the league's multiplier for the overs that remain: dismissals are 2.58 times as likely in the 20th over as on average), and otherwise yields runs from the league's mix (34.3% dots, 41.4% singles, 11.3% fours, 4.9% sixes on non-dismissal balls) tilted to the batter's strike rate. The batter faces about half of the balls that remain. That defines a small dynamic programme over (runs still needed, balls still to face), solved exactly — live.milestone_prob(...).
The direct model skips the mechanism. It is a logistic regression of "reached the milestone" on runs, balls faced, balls left in the innings, wickets down, the batter's shrunk strike and dismissal rates, and the environment, fitted on every batter-over state before 2023 (live.MilestoneModel).
We test both on 2023–26 (353,860 batter-over states overall; code/06_milestones.py). One in ten T20 batter innings reaches fifty (9.80% in the test years), and fewer than one in a hundred reaches a hundred (0.876%):
P(reach 50) — test rows with 0 <= runs < 50: n 136,328, base rate 0.212; training base rate 0.226
Platt map: logit(p') = 0.225 + 0.907 x logit(p)
structural Brier 0.1299 log loss 0.4068 mean p 0.176
structural+ Brier 0.1285 log loss 0.4006 mean p 0.217
direct Brier 0.1284 log loss 0.3998 mean p 0.220
direct-xgb Brier 0.1290 log loss 0.4005 mean p 0.219
P(reach 100) — test rows with 40 <= runs < 100: n 14,439, base rate 0.144; training base rate 0.104
Platt map: logit(p') = 0.030 + 0.643 x logit(p)
structural Brier 0.0968 log loss 0.3402 mean p 0.085
structural+ Brier 0.0932 log loss 0.3048 mean p 0.132
direct Brier 0.0922 log loss 0.3012 mean p 0.128
direct-xgb Brier 0.0939 log loss 0.3080 mean p 0.124

📊 Figure (described): Two reliability diagrams (forecast probability against observed share) for P(fifty) from 0–49 and P(hundred) from 40–99, men's T20 2023–26. The grey structural line sits above the diagonal everywhere — what it calls 30% happens about 40% of the time, what it calls 50% about 60%. The recalibrated structural line and the direct logistic and xgboost lines hug the diagonal for fifties and run slightly above it for hundreds in the 10–40% range.
The structural model is systematically too pessimistic. When it said 34.5% for a fifty, 40.6% happened; when it said 44.2% for a hundred, 57.7% happened. Two ingredients are wrong in the same direction:
- Set batters are better than their career averages. A batter on 35 has already shown that today is a good day — the pitch suits them, they are seeing it well. Using their career dismissal rate for every remaining ball ignores that. (Chapter 10 found the same thing in Tests: per-ball risk falls once a batter is in.)
- Probably, set batters also get more than half the strike. The structural model gives them exactly half the remaining balls. A set batter can farm the strike at the ends of overs, and new partners are often told to give it to them. We have not measured this here (Exercise C6 asks you to); Chapter 12 found the faster scorer of an IPL pair faces 50.4% of the balls, so the effect is real but may be small.
A one-line correction fixes most of it. Platt scaling — a logistic regression of the outcome on the structural model's log-odds, fitted on training rows — gives logit(p') = 0.225 + 0.907 × logit(p) for fifties and 0.030 + 0.643 × logit(p) for hundreds, and the recalibrated model ("structural+") is then as good as the direct model. The direct logistic is the best of the four on both milestones, though not by much. Hundreds have also become more common: the base rate from 40-plus states rose from 10.4% before 2023 to 14.4% after, and every model under-forecasts a little in the middle of the range for that reason.
⚠️ Common pitfall: milestone odds in a chase. Every number in this section is first-innings. In a chase the innings can end because the target is reached, and a batter on 92 with four needed cannot make a hundred whatever their form. The structural model ignores this (it would happily give that batter 60%); a chase model must cap the batter's runs at the runs needed plus whatever the last ball yields. Fit chase milestones separately, or say on screen that the odds assume the match goes on.
🔄 Check your understanding 1. Why does a naive count of "batters who faced more than 30 balls" understate survival? 2. The structural model's Platt slope for hundreds is 0.643. Is the uncorrected model too confident or not confident enough when it gives a high probability?
Answer
1. Because batters who were not out when the overs ran out are counted as if they had stopped. Kaplan–Meier treats them as censored: they survived at least that long. 2. A slope below 1 means the corrected log-odds are pulled toward the intercept: extreme forecasts are shrunk. But the intercept and the level matter too — here the structural forecasts were too low on average (mean 0.085 against 0.144 observed), so the corrected probabilities are higher across most of the range.
27.8 Four innings of 2026, over by over
The cricket question. What do milestone odds look like live, through an innings, for the kind of knock a broadcaster wants to build a graphic around?
We fitted the direct models on every first innings before 2026 in the right pool — men's T20 (12 competitions) or women's T20 (T20Is, WPL, WBBL) — and ran them over by over through four innings from 2026 (code/07_milestone_innings.py). Two made the hundred and two fell just short.
KL Rahul (Delhi Capitals v Punjab Kings, 25 Apr 2026) — final 152*; pre-match shrunk SR 137.9
over runs balls wkts_lost balls_left p50 s50 p100 s100
0 0.0 0.0 0 120 0.341 0.297 0.041 0.024
9 49.0 25.0 1 66 0.985 0.940 0.209 0.144
13 73.0 39.0 1 42 1.000 1.000 0.420 0.372
14 92.0 44.0 1 36 1.000 1.000 0.795 0.751
V Suryavanshi (Rajasthan Royals v Sunrisers Hyderabad, 27 May 2026) — final 97; pre-match shrunk SR 203.0
3 36.0 10.0 0 102 0.840 0.654 0.494 0.168
4 54.0 16.0 0 96 1.000 1.000 0.762 0.277
7 71.0 23.0 0 78 1.000 1.000 0.880 0.422
NR Sciver-Brunt (Mumbai Indians v Royal Challengers Bengaluru, WPL, 26 Jan 2026) — final 100*
14 75.0 41.0 1 36 1.000 1.000 0.368 0.256
16 77.0 43.0 2 24 1.000 1.000 0.194 0.143
18 90.0 51.0 2 12 1.000 1.000 0.380 0.355
19 99.0 55.0 3 6 1.000 1.000 0.920 0.812
SFM Devine (Gujarat Giants v Delhi Capitals, WPL, 11 Jan 2026) — final 95
6 65.0 27.0 0 84 1.000 1.000 0.856 0.301
9 91.0 38.0 1 66 1.000 1.000 0.979 0.716
10 94.0 40.0 1 60 1.000 1.000 0.973 0.783
(p = direct model, s = structural model; the over column is overs completed before the state. Full tables in code/07_output.txt.)

📊 Figure (described): Four panels, one per innings, showing P(50) (blue) and P(100) (orange, solid = direct model, dashed = structural) over by over, with the batter's score annotated. Rahul's hundred chance creeps from 4% to about 21% at 49 off 25, then jumps to 80% at 92 off 44. Suryavanshi's direct P(100) leaps to 76% within four overs while the structural model stays below 45% throughout. Sciver-Brunt's hundred chance rises to 37%, falls to 19% as the overs run out, then shoots to 92% at 99 off 55 with an over left. Devine's reaches 98% after nine overs; she was out for 95.
Four lessons, one from each innings.
Rahul: the hundred is mostly decided late. After nine overs Rahul was 49 off 25 and the direct model gave him 21% for a hundred: a fine start is still well short of a hundred in a format where the median innings lasts 13 balls. It took the 14th over (19 runs to him: 73 to 92) to make the hundred likely. He went on to 152 not out off 67; the structural model put 150 at 20% when he was 126 off 54 with four overs left, and 49% at 145 off 63 with one over left. Delhi Capitals made 264 and still lost (Punjab Kings chased it; Chapter 36 studies the same night from the fantasy side).
Suryavanshi: when two models disagree by nearly 50 points, say so. At 54 off 16 after four overs, the direct model said 76% and the structural model 28%. They disagree because this state is almost off the map: very few batters have ever been 54 off 16, and the logistic regression extrapolates its strike-rate terms while the structural model uses Suryavanshi's shrunk career strike rate of 203 and a league-average share of the remaining strike. Which was right? One innings cannot tell you, but the calibration check on similar states can. For fast starts (50 to 99 runs at the start of any of the first eight overs; 484 test states from 261 innings), the real hundred rate was 27.3%; the direct model's average forecast was 26.9% and the raw structural model's 18.8%. On average the direct model is right; at the very edge, neither has much evidence. He was out for 97 off 29.
Sciver-Brunt: the clock matters as much as the score. On 75 off 41 after 14 overs, her hundred chance was 37%. Two overs later she had added only two runs and it was 19%: not because she was batting worse but because the innings was running out of balls. Then nine runs off four balls in the 19th over took her to 99 off 55, and 92% with one over to come. She finished 100 not out.
Devine: 97% is not 100%. On 94 off 40 with ten overs left, the direct model gave Sophie Devine 97.3% for a hundred. She was out for 95. That is not a model failure; it is the 2.7%. In the P(hundred) calibration table, the states the direct model put above 90% (122 of them) came true 91.8% of the time: about one in twelve did not.
🪞 Learning check-in. Pause and take stock of how your thinking about live numbers has changed. (1) Before this chapter, if a commentator said "he'll get his hundred from here", what probability would you have heard? After §27.7–27.8, what would you need to know before agreeing — the score, the balls faced, the overs left, or all three? (2) Which surprised you more: that projections after the powerplay are typically 20+ runs out, or that adding the batters at the crease improves them by only half a run? Write one sentence on why. (3) Look back at the 🧩 problem in §27.5. Did you predict that a fast start would add runs? What did you get right, and what did the tuning teach you? (4) Name one number in this chapter you would be confident explaining to a coach who does not speak statistics, and one you would not yet be. Revisit the second one before Chapter 28.
📋 Try it — Settle this debate: "Devine choked." A pundit argues that Sophie Devine's dismissal on 95, after being 94 off 40, shows she "can't close out a hundred". Using the chapter's numbers, settle it.
Worked answer
The model gave 97.3% at 94 off 40 with 60 balls left; failure was a 2.7% event. Across the 2023–26 test states where the direct model gave more than 90%, about one in twelve failed (observed 91.8% against an average forecast of 95.8%). One failure at 97% is exactly the kind of thing that happens a few times a season across all batters, and a single innings is no evidence about a player's "closing" ability. To test the pundit's claim you would need many of Devine's own 80s and 90s and a comparison with what the model expected for each — and with a few dozen such innings in a career, even a real tendency would be hard to separate from noise (Chapter 6's small-samples problem). Verdict: not supported.
27.9 Broadcast-ready statements
The cricket question. Kavya wants one line on screen at the end of the over. What makes a line honest?
The test is the same as for any probability: when you say X%, it should happen X% of the time. At the end of every over of every 2023–26 first innings, the tuned chain made four statements, P(total ≥ 160 / 180 / 200 / 220). We kept the ones anybody would bother to say (between 2% and 98%) and checked them (code/08_broadcast.py):
Threshold statements P(total >= T), T in (160, 180, 200, 220), overs 1-19, 2023-26 — IPL (15,370 statements):
n stated happened
[0.05, 0.15) 1977 0.098 0.092
[0.15, 0.25) 1773 0.200 0.200
[0.25, 0.35) 1554 0.299 0.292
[0.45, 0.55) 1323 0.499 0.561
[0.65, 0.75) 1307 0.699 0.741
[0.85, 0.95) 1690 0.903 0.919
Brier 0.1530; mean stated 0.481 vs happened 0.503
... all men's T20 (159,056 statements):
[0.15, 0.25) 21566 0.197 0.245
[0.45, 0.55) 11317 0.499 0.544
Brier 0.1593; mean stated 0.345 vs happened 0.383
In the IPL the statements are close to honest — "a 20% chance of 200" came true 20.0% of the time — with a mild tendency to undersell the middle (statements of about 50% came true 56% of the time). Across the whole pool, the chain undersells big totals by about 4 points throughout, the same shortfall §27.5 traced to associate mismatches and to scoring that kept rising after the environment was measured.

📊 Figure (described): Two reliability diagrams of "chance of T+" statements made at the end of every over, 2023–26: stated probability against the share that came true, one line each for 160+, 180+, 200+ and 220+. For all men's T20 (left) the lines run a few points above the diagonal — big totals happened a little more often than stated. For the IPL (right) they lie close to the diagonal, slightly above it in the middle.
How does that compare with the scoreboard's run-rate line? After six overs of the 2023–26 IPL:
IPL 2023-26 first innings: 200+ in 42.0% of 281
after 6 overs, innings given >= 50% for 200+: 86; made it: 80.2%
after 6 overs, run-rate projection said >= 200: 102; made it: 70.6%
after 6 overs, innings given >= 50% for 220+: 26; made it: 80.8%
after 6 overs, run-rate projection said >= 220: 66; made it: 53.0%
When the run-rate projection said 220 after the powerplay, the team got there barely half the time. Viewers who see "projected 220" on screen and then watch a side finish on 195 learn to distrust every number on the screen.
Volatility. A graphic that changes its mind every over is hard to watch:
Volatility (all men's T20, 2023-26, overs 2-19): mean |change| per over — median projection 5.6 runs,
run-rate projection 11.2 runs; median projection moved 10+ runs in 18.3% of overs
overs with a wicket: median moves 8.5; without: 4.4
IPL: mean |change| in P(200+) per over 0.062; largest single-over swing 0.821
(Royal Challengers Bengaluru v Chennai Super Kings, 03 May 2025, over 19: 192/5, final 213)
The model's median moves half as much as the run-rate projection, and mostly when something happens (a wicket). Big swings in a threshold probability are not a flaw: at 192/5 with an over left, "chance of 200+" should swing hugely on the next six balls.
Kavya's rules for the screen. She talked them through with Nusrat Jahan, who builds Crease and had asked why the graphics engine rounds everything.
Nusrat: The model says 62.7%. Why does the engine print "about 65%, about 3 in 5"?
Kavya: Because 62.7 claims I know the difference between 62 and 63, and I don't. Our ranges are off by a few points in some competitions. If I show a decimal, I'm promising a precision the back-test doesn't support. Nearest five per cent, nearest five runs.
Nusrat: And "3 in 5"?
Kavya: Half the audience hears "62%" as "probably". "Three in five" sounds like what it is: two times in five it doesn't happen. And I always show a range before I show a point. "Heading for about 175 — 80% of similar innings finish between 150 and 205." The range is the forecast. The 175 is just where the range is centred.
Nusrat: What never goes on screen?
Kavya: The run-rate projection as a forecast. Anything from a model we haven't back-tested in this competition. And last-ball win probability. Chapter 20's model gave a side needing four off the final ball about 8% when 34% of them did it. If the producer wants a number there, the honest number is the base rate from the real cases, or nothing.
crease.live.broadcast_line does the rounding. For Anchor A — South Africa batting first at Newlands, 25 January 2017, with the match left out of the fit:
over score wkts_lost rr q10 q50 q90 p_ge_150 p_ge_170 p_ge_190
6 48 1 160.000 137.0 166.0 199.0 0.759 0.433 0.169
10 79 1 158.000 152.0 176.0 203.0 0.916 0.627 0.247
13 107 1 164.615 162.0 182.0 204.0 0.990 0.788 0.322
15 119 3 158.667 155.0 170.0 189.0 0.966 0.528 0.084
19 148 5 155.789 153.0 159.0 166.0 0.999 0.028 0.000
after 6: Heading for about 165 — 80% of similar innings finish between 135 and 200; 170+ about 45% (about 1 in 2).
after 10: Heading for about 175 — 80% of similar innings finish between 150 and 205; 170+ about 65% (about 3 in 5).
after 15: Heading for about 170 — 80% of similar innings finish between 155 and 190; 170+ about 55% (about 1 in 2).
(The project_total lines simulate afresh with 20,000 innings, so their probabilities differ by a point or two from the banked table above.)

📊 Figure (described): South Africa's innings at Newlands projected live. The green 80% band starts wide (125–209 after one over) and narrows steadily; the median rises to 182 at 107/1 after 13 overs, falls to 170 when two wickets go in overs 14–15, and ends at 159 with an over left. The dotted actual total, 169, lies inside the band throughout except after over 19, when South Africa's last over (21 runs, from 148) took them above the model's 90th percentile of 166.
So the answer to the question at the start of §27.2: at 79 for 1 after ten overs, Sri Lanka's analyst should have planned for a chase of about 175, with 150 to 205 as the honest range. South Africa made 169. The last over alone went for 21, and with an over left the model gave 170+ only a 2.8% chance — the kind of thing that a forecaster has to live with.
After the innings break. In the chase the question changes from "what total?" to "who wins?", and the right tool is win probability, not a projection. Chapter 20's WP v1 has Sri Lanka at 0.503 after 15 overs of the chase (116/2) and 0.191 after Imran Tahir's two-wicket 16th over. The graphics engine should hand over from live.project_total to winprob at the innings break, and the honesty rules carry over unchanged.
In Tests. There is no fixed number of balls, so there is no "projected total" in the T20 sense; Chapter 29 forecasts sessions and results instead. Milestone odds do carry over, through survival. Chapter 10's milestone ladder for top-order Test batters gave 56.2% from 50 to 75 and 60.8% from 75 to 100: chained together, a Test batter on 50 has about a 34% chance of a hundred (0.562 × 0.608), which agrees with Chapter 10's pooled conversion rate of 33.7%. A T20 batter's chance from 50 is lower and depends far more on the clock: in our test years it was 14.4% from all states of 40–99, and 27.3% for batters already past 50 early in the innings.
📋 Try it — Predict this match. Bangladesh batted first against Zimbabwe in Bulawayo on 17 July 2026 and were 84 for 0 after 10 overs. The scoring environment (full-member men's T20Is, from the previous 60 such matches) was 177.7. Use
live.project_totalwith a chain fitted on all complete first innings before that day. What range would you put on screen, and what is the run-rate projection?Worked answer
Fromcode/project_checkpoint.py: median 201, 80% range 173–232, P(160+) 0.98, P(180+) 0.83; run-rate projection 168. Screen text: "Heading for about 200 — 80% of similar innings finish between 175 and 230; 160+ is all but certain (over 95%)." Bangladesh finished on 186/5 — inside the range, 15 runs below the median, and 18 above the run-rate projection, which as usual undersold a side with all ten wickets in hand.🔄 Check your understanding 1. In the IPL test years, threshold statements of about 50% came true 56% of the time. Is that under- or over-confidence, and in which direction is the error? 2. Why should the graphics engine switch from projected totals to win probability at the innings break?
Answer
1. The model under-forecast big totals in that band: it said 50% and the event happened more often. It is a level problem (scoring kept rising), not a confidence problem. 2. Because in a chase the total is capped by the target, so "projected total" stops being the interesting quantity; the question viewers care about — who wins — needs a model of the chase (Chapter 20).
Spaced Review
Before reading each answer, try to answer the question from memory.
- Chapter 19 — the Markov chain's spread. Why were Chapter 19's simulated full-innings totals too narrow, and what fixed them there? Answer: The chain treats every innings as an average innings in its state, so all the innings-to-innings differences (pitch, ground, teams) were missing: the simulated spread was 31.1 runs against 38.3 for real totals. Giving each simulated innings its own random scoring tilt (0.08) restored the spread. In this chapter the same problem appears conditionally: even after centring on the environment, the rest of an innings needs its own extra tilt (τ_f = 0.07) or the 80% ranges cover only about two-thirds of real totals.
- Chapter 20 — calibration as the threshold concept. What does it mean for a forecast to be calibrated, and why is it the property a broadcaster needs most? Answer: Of all the times it says X%, X% happen. A viewer cannot judge accuracy from one match, but a broadcaster who is calibrated over a season can be trusted every night; one who is not is misleading even when the number "feels right". §27.5 and §27.9 apply exactly this test to ranges and to "chance of 200+" lines.
- Chapter 10 — Kaplan–Meier. What does Kaplan–Meier do with a not-out batter? Answer: Treats the innings as censored: the batter survived at least that many balls. Counting not-outs as failures understates survival (in T20, 13.9% naive versus 17.6% KM for "more than 30 balls").
- Chapter 6 — shrinkage. The crease-quality feature shrinks each batter's career strike rate with 100 pseudo-balls. Why 100? Answer: It is about the number of balls at which a T20 strike rate is half signal and half noise; a batter with 100 career balls gets half their own rate and half the league's.
Project Checkpoint: live.py
Nusrat's Crease now has a live layer. project/crease/live.py depends on states.py (Chapter 19's ER table and Markov chain), winprob.py (Chapter 20's scoring environment) and venue_toss.py (venue names), and exposes:
| Function / class | What it does |
|---|---|
load_first_innings(codes, n_overs=20) |
first-innings states with the past-only env_par attached |
player_form_asof(codes) |
every batter's shrunk SR and dismissal rate, and every bowler's shrunk economy, before each match |
snapshots(states, games, overs, bat_form, bowl_form) |
one row per innings per checkpoint, with crease, venue, momentum and attack features |
rr_projection, table_projection |
the scoreboard projection; score + ER table (× environment) |
ProjectionModel(kind, features, er_table) |
linear or xgboost projection, one model per over, residual-quantile intervals |
LiveChain(tau, tau_future) |
the environment-centred Markov chain; .simulate(...), .project(snaps, thresholds) |
simulate_innings(chain, score, balls_left, wkts_left, env_par, n) |
the rest of an innings, simulated n times |
project_total(score, legal_balls, wkts_lost, env_par, chain) |
median, mean, 80% range, P(total ≥ T), run-rate projection |
error_table, coverage_table, pinball |
the back-test tools |
milestone_frame, MilestoneRates, milestone_prob, MilestoneModel |
milestone data, the structural survival × scoring model, the direct model |
broadcast_line(proj, threshold), odds_phrase(p) |
the honest one-liner |
Nusrat chose her own country for the demo: Bangladesh's most recent first innings in the data, against Zimbabwe in Bulawayo, with every model fitted only on matches before that day.
chain = live.LiveChain(tau=0.0, tau_future=0.07).fit(s[(s["start_date"] < day) & s["complete"]])
pr = live.project_total(score, 6 * ov, wkts, gm["env_par"], chain, thresholds=(160, 180))
print(live.broadcast_line(pr, 160))
sim = live.simulate_innings(chain, score=84, balls_left=60, wkts_left=10, env_par=gm["env_par"], n=5000)
Match: Bangladesh v Zimbabwe, Queens Sports Club, Bulawayo, 17 Jul 2026 (id 1538302); Bangladesh batted first: 186/5; winner Bangladesh
Chain fitted on 8,698 earlier innings; its own par 159.7; env_par for this match 177.7
After 6 overs: 54/0 | median 200, 80% 165-240, P(160+) 0.93, P(180+) 0.77, run-rate projection 180
After 10 overs: 84/0 | median 201, 80% 173-232, P(160+) 0.98, P(180+) 0.83, run-rate projection 168
After 15 overs: 121/1 | median 186, 80% 169-205, P(160+) 0.98, P(180+) 0.67, run-rate projection 161
Heading for about 185 — 80% of similar innings finish between 170 and 205; 160+ is all but certain (over 95%).
simulate_innings from the 10-over state: 5000 innings; mean 202.3, sd 23.7, all out in 1.5%
Tanzid Hasan: 42 off 27 after 10 overs -> P(50) structural 0.70, direct 0.78; actually made 58
Saif Hassan: 35 off 33 after 10 overs -> P(50) structural 0.44, direct 0.51; actually made 55
Bangladesh finished on 186: inside every range the engine showed, and very close to the 15-over median. Both openers reached fifty, one from a 78% position and one from a coin flip.
Where it plugs in: Chapter 30 (batting order) will replace the chain's "wickets lost" index with real batters, using simulate_innings as the engine it modifies; Chapter 39's dashboard calls project_total, broadcast_line and MilestoneModel for its live tab, and winprob once the chase starts. The full demo is code/project_checkpoint.py.
Chapter Summary
| Quantity (men's T20 first innings, fitted < 2023, tested 2023–26) | After 6 overs | After 10 | After 15 |
|---|---|---|---|
| MAE, run-rate projection | 27.6 | 20.9 | 13.6 |
| MAE, best model (linear with live context) | 22.1 | 17.1 | 11.2 |
| Share within ±15 runs (best model) | 42% | 53% | 72% |
| Half-width for 80% of innings (linear state+env) | ±37 | ±29 | ±18 |
| 80% range coverage, tuned chain (all / IPL) | 73% / 84% | 73% / 84% | 73% / 83% |
| Gain from batters at crease + venue + attack + momentum | 0.7 runs | 0.5 | 0.3 |
Other formats, MAE as a share of the mean total: about 14–18% early, 10–14% at the middle checkpoints, 6–8% three-quarters of the way through — almost the same in men's and women's T20 and ODIs.
Milestones (men's T20, 2023–26): the median innings lasts 13 balls (Kaplan–Meier); 9.8% of batter innings reach 50 and 0.88% reach 100. The structural survival × scoring model is too pessimistic until Platt-recalibrated; the direct logistic model is calibrated (Brier 0.1284 for fifties, 0.0922 for hundreds from 40+).
Decision framework for a live forecast
- Centre on the environment, not on a table from another era. The era-blind table was 20 runs low in the IPL after the powerplay.
- Show a range before a point. After the powerplay the honest 80% range is roughly ±35–40 runs in T20; "±15" is a 40% statement.
- Do not expect live context to transform accuracy. The batters at the crease, the venue and the attack still to come are worth about half a run of MAE. Use them, but do not oversell them.
- Test the spread out of time, by competition. Ranges that are honest in the IPL can cover only 65% in associate cricket.
- Calibrate milestone odds on held-out data; structural models need recalibrating.
- Round for the screen (nearest 5 runs, nearest 5%) and phrase odds as "k in n".
- Never show the run-rate projection as a forecast, an un-back-tested model, or last-ball win probability from a model with a known end-game weakness.
- Switch tools at the innings break: projected total for the first innings, win probability for the chase.
What's Next
Chapter 28 zooms out from one innings to a whole tournament: the match-level models of Chapter 24 and the in-match machinery of this chapter become the engine of a simulator that plays an IPL season or a World Cup 10,000 times. The lesson of this chapter carries straight over — honest ranges beat confident points — and it gets harder, because a team plays only 14 league matches and luck decides more than talent.