Chapter 27 Exercises — In-Match Forecasting

Difficulty: ⭐ recall and reasoning · ⭐⭐ calculation and interpretation · ⭐⭐⭐ build or extend code · ⭐⭐⭐⭐ open research.

All numbers below come from the chapter's scripts (code/01–08, the case studies and project_checkpoint.py), run on the book's data snapshot (Cricsheet, November 2026). Models are fitted on men's T20 first innings before 2023 and tested on 2023–26 unless stated otherwise.


Part A — Conceptual ⭐

A1. In one sentence each, define a projected total, a projection interval and an as-of feature. Then give one example of a feature that looks harmless but is not as-of.

A2. The scoreboard's run-rate projection was on average 10.2 runs too low after 10 overs of 2023–26 men's T20 first innings, yet after one over it was wildly too high (mean absolute error 71.8). Explain both facts with one idea about how T20 innings are shaped.

A3. Why does the chapter fit every model on innings before 2023 and test on 2023–26, rather than holding out a random 20% of innings? Name two ways a random split would flatter the models.

A4. "The model's 80% ranges contained the real total in 84% of IPL innings." Is that a problem? What about 65% in associate T20 internationals? Which is the worse error for a broadcaster, and why?

A5. The chapter found that adding the two batters at the crease, the venue and the bowling still to come improved the projection by only about half a run of MAE. Give two cricket reasons why knowing the present so well helps so little.

A6. What does Kaplan–Meier do with a batter who is not out when the innings ends? Why does a naive count of "batters who faced more than 30 balls" (13.9%) understate the Kaplan–Meier figure (17.6%)?

A7. The structural milestone model (survival × scoring) was too pessimistic: when it said 34.5% for a fifty, 40.6% happened. Give two reasons why using a batter's career dismissal rate for every remaining ball understates their chances once they are set.

A8. Explain pinball loss to a coach in three sentences, without formulas. Why is it a better tuning target for a range than "make the coverage exactly 80%"?

A9. Sophie Devine was on 94 off 40 with ten overs left and the direct model gave her 97.3% for a hundred; she was out for 95. Was the model wrong? What evidence would show that a model's 97% statements are wrong?

A10. Why should a live graphics engine stop showing "projected total" for the side batting second, and what should replace it?


Part B — Calculation & Interpretation ⭐⭐

B1. The linear model's errors after 6 overs (all men's T20, 2023–26): MAE 22.8, median absolute error 18.5, 41.0% within ±15, 80% half-width ±37, 90% half-width ±47. (a) Write the honest version of the claim "after the powerplay the model predicts the final score within ±15 runs typically." (b) What half-width would you need for a "nine times in ten" statement?

Answer

(a) "After the powerplay a good projection is typically about 20 runs out; it lands within ±15 runs only about four times in ten, and you need about ±37 runs to be right four times in five." (b) About ±47 runs.

B2. The run-rate projection for Sunrisers Hyderabad at 105/0 after 6 overs was 350. Show the calculation. The model's median was 257 and the final 219. Compute both errors and the share of the run-rate projection's error that the model removed.

Answer

RRP = 105 × 120 / 36 = 350. Errors: run-rate +131, model +38. The model removed (131 − 38) / 131 ≈ 71% of the error — but its own error was still more than twice the "±15" band, and the final sat just below its 10th percentile (221).

B3. In the IPL test years the era-blind ER table had a bias of −20.1 runs after 6 overs; rescaled to the environment the bias was −3.0 and the MAE fell from 26.8 to 20.6. (a) What share of the MAE fall could be explained by removing the bias alone, if errors were otherwise unchanged? (Hint: for a roughly symmetric error distribution, shifting the centre by b changes the MAE by at most b.) (b) Why does the MAE fall by less than the bias change?

Answer

(a) The bias moved by 17.1 runs; the MAE fell by 6.2. So the MAE fell by about a third of the bias change. (b) Removing a bias only helps the innings on the wrong side of the centre; innings already above the biased projection get worse as the projection rises. With a spread as wide as T20 totals (sd ≈ 37 runs), a 17-run shift improves the MAE by much less than 17.

B4. The linear model with live context gives +3.5 runs to come per standard deviation (9.01 SR points) of crease strike rate after 6 overs. Two pairs are 80 for 1 after 6 overs in the same environment; pair A's mean shrunk career SR is 145, pair B's is 118. Estimate the difference in projected totals. Is that difference large relative to an honest 80% range?

Answer

Difference = (145 − 118) / 9.01 × 3.5 ≈ 3.0 sd × 3.5 ≈ 10.5 runs. The 80% half-width after 6 overs is about ±37 runs (a range 74 runs wide), so a 10-run shift is real but small — about a seventh of the range.

B5. Coverage of nominal 80% ranges at over 10 (tuned chain): IPL 84.0% (281 innings), associate T20Is 64.9% (1,548). (a) Give an approximate 95% interval for the IPL figure (binomial standard error). (b) Is the IPL's coverage distinguishable from 80%? Is the associates'?

Answer

(a) SE = √(0.84 × 0.16 / 281) ≈ 0.022, so roughly 79.7% to 88.3%. (b) The IPL interval just includes 80% — not clearly distinguishable. Associates: SE ≈ √(0.649 × 0.351 / 1548) ≈ 0.012, interval ≈ 62.5% to 67.3%, far below 80%. The associate shortfall is real.

B6. Platt map for the structural P(hundred), fitted on training rows: logit(p′) = 0.030 + 0.643 × logit(p). Convert a structural forecast of p = 0.10 and p = 0.60 to recalibrated probabilities. What does the correction do at each end?

Answer

logit(0.10) = −2.197 → 0.030 + 0.643 × (−2.197) = −1.383 → p′ ≈ 0.20. logit(0.60) = 0.405 → 0.030 + 0.643 × 0.405 = 0.290 → p′ ≈ 0.57. Low forecasts are raised a lot (0.10 → 0.20), high ones are pulled in slightly (0.60 → 0.57): the slope below 1 shrinks extremes toward the middle, and because most forecasts are low, the net effect is to raise the average (from 0.085 to 0.132 in the test rows).

B7. Chapter 10's ladder: 56.2% of top-order Test batters on 50 reach 75, and 60.8% of those on 75 reach 100. (a) Estimate P(100 | 50). (b) Compare it with Chapter 10's pooled conversion rate (33.7%). (c) For T20 batters already past 50 early in the innings (start of overs 1–8), the observed P(100) was 27.3%. Why is T20 conversion lower even for fast starters?

Answer

(a) 0.562 × 0.608 ≈ 0.342. (b) Almost identical to 33.7% — two different routes to the same number, a good consistency check (both assume not-outs between steps are set aside). (c) Because T20 has a hard clock: a T20 batter on 50 after 8 overs has at most 72 balls left in the innings and will face only some of them, and the per-ball dismissal risk rises sharply at the death (2.58× the average in the 20th over). A Test batter is limited only by survival.

B8. Volatility, men's T20 2023–26, overs 2–19: the model's median projection moves 5.6 runs per over on average (8.5 after overs with a wicket, 4.4 without); the run-rate projection moves 11.2. A producer wants a graphic that "doesn't jump around". Which would you show, and what would you tell the producer about the overs with wickets?

Answer

The model's median — it moves half as much and is more accurate. Overs with a wicket should move it more (about twice as much), because a wicket changes the remaining resources; a graphic that did not move after a wicket would be wrong. Smoothing it artificially would trade honesty for calm.


Part C — Code It ⭐⭐–⭐⭐⭐

C1. ⭐⭐ Build this metric — "within ±X" curves. Extend code/02_projection_backtest.py so that, for each over 1–19, it reports the smallest X such that the linear model is within ±X of the real total for 50%, 80% and 90% of innings. Output: a 19 × 3 table and a line chart of the three curves. Check: at over 6 your 80% value should be 37 and at over 15 it should be 18. Hint: group the test snapshots by over, take np.quantile(abs_err, [0.5, 0.8, 0.9]). Then answer in words: from which over could a broadcaster honestly say "within 20 runs, four times in five"?

C2. ⭐⭐ Analyze this match — your team's season. Pick one team and one season from 2023–26 (any competition). For every first innings they batted, plot the tuned chain's 80% band and median over by over, with the real total. Report how many of their innings finished inside the band at overs 6, 10 and 15. Inputs: live.load_first_innings, live.snapshots(..., overs=range(1, 20)), LiveChain.project. Expected output: one small-multiple figure and a 3-row coverage table. Hint: with one team-season you will have only 7–16 innings, so expect coverage anywhere from about 50% to 100% by chance alone; compute a binomial interval before you conclude anything about the model.

C3. ⭐⭐⭐ Predict this match — a venue-aware chain. The chain is centred on env_par. Add the venue: centre it on env_par + venue_eff instead (both as-of). Re-run the back-test and report the change in MAE and 80% coverage at overs 6/10/15, overall and for the IPL. Expected: a 2 × 3 table of changes. Does the venue help the chain more than it helped the linear model (§27.4)? Hint: venue_effect_asof(games) is already in the module; pass env_par + venue_eff wherever the chain takes env_par (the project method reads the column from the snapshot frame, so add a new column and point to it). Keep the tuning (τ, τ_f) fixed so the comparison is fair.

C4. ⭐⭐⭐ Optimize this strategy — a separate spread for associates. §27.5 found 80% ranges covering only about 65% of associate T20I totals. Tune tau_future separately for (a) associate T20Is and (b) everything else, using only pre-2023 training snapshots of each group and pinball loss. Then report 2023–26 coverage and pinball for each group with its own setting versus the shared 0.07. Expected output: a 2 × 4 table (group × {chosen τ_f, coverage before, coverage after, pinball change}). Discuss whether a better centre (team strength — try Chapter 20's walk-forward Elo gap as a feature in the linear model) helps more than a wider range. Hint: winprob.team_strength(games) returns pre-match Elo ratings within each competition; the batting side's Elo minus the bowling side's is an as-of feature. Associate mismatches should show the largest gains.

C5. ⭐⭐⭐ Build this metric — chase milestones. Write milestone_frame_chase() for second innings, with one extra column: runs still needed by the team. Fit MilestoneModel with that feature on pre-2023 chases and test on 2023–26. Report Brier and a calibration table for P(fifty). Then find the 2023–26 chase innings that ended not out between 90 and 99 because the target was reached, and say how many there were. Hint: the chase version of milestone_frame needs target_runs from the deliveries table; a batter's ceiling is their runs plus the team's runs still needed plus at most a six off the winning ball.

C6. ⭐⭐⭐ Evaluate this player — the strike share. The structural model assumes a batter faces half of the remaining balls. Measure the real share: for every batter-over state in 2023–26 first innings, compute (balls the batter actually faced from here) / (legal balls left), separately for batters on 0–19, 20–39 and 40+ runs, and by phase. Then re-run milestone_prob with your measured shares and report how much of the structural model's pessimism (Platt intercept, mean forecast vs observed) disappears. Expected: a 3 × 3 table of shares and a before/after Brier comparison. Hint: censoring matters here too — a batter dismissed on the next ball faced only one more ball, so compute the share among batters who were not dismissed before the innings ended, and separately for all, and discuss which is the right input for the dynamic programme.

C7. ⭐⭐ Settle this debate — "the update should help". In code/04_intervals.py, the tuned prior for the Bayesian update was τ = 0. Re-run the tuning separately for over 6 and over 15 only. Does the update help at one checkpoint but not the other? Report the pinball table for each and explain the result in cricket terms. Hint: after 6 overs the score so far is a small sample of 36 balls; after 15 it is 90 balls but there are only 30 left to apply the information to. Which effect should dominate?


Part D — Judgment & Format Transfer ⭐⭐⭐

D1. Tests. There is no fixed number of balls in a Test innings. Which parts of crease.live transfer to Test cricket (projected total? intervals? milestone odds?) and which do not? Sketch what a "projected first-innings total" would have to condition on in a Test (declarations, follow-on, weather, the second new ball), and say why Chapter 29 forecasts sessions instead.

A strong answer includes: milestone odds transfer (Chapter 10's survival curves are the same idea with no clock); projected totals do not, because the innings length is a choice (declaration) or an event (all out) rather than a fixed number of balls; intervals transfer as a principle but need a different target (runs by the close of play, or a result).

D2. The Hundred. The Hundred is 100 balls with ten-ball ends. Which of the chapter's checkpoints would you use, and how would you set up the Markov chain (Chapter 19's chain indexes six-ball blocks)? Predict whether the "share of the total" error curve of §27.6 would hold, and say what result would surprise you.

A strong answer includes: checkpoints at 25 balls (end of the powerplay), 50 and 75; a chain indexed by ten-ball or five-ball blocks rather than overs; a prediction that error as a share of the total at 30%, 50% and 75% of the innings is close to the T20 curve; and a note that the 2026 change in The Hundred's no-ball penalty (two runs through 2025, one in 2026) is the kind of shift the environment term must absorb.

D3. Eye test vs data. Wendell says: "When a side is 105 for none after six, any coach knows the spinners come on and the fielders go back." The model's median fell from the run-rate projection's 350 to 257 without knowing anything about fielders. Is the model "seeing" the field placements? What would the model need in order to use the captain's actual plan (for example, the fact that a team's two best spinners have not yet bowled)?

A strong answer includes: the model sees the consequences of the usual plan in its history (scoring slows after the powerplay), not the plan itself; to use the plan it needs bowler identities and remaining quotas as features (the chapter's att_rel is a first step) and, ideally, a model of who bowls which over (Chapter 31).

D4. The broadcaster's dilemma. A sponsor wants "Projected Score" on screen every over with one number, no range. Using the chapter's evidence (§27.3, §27.9), write the 150-word memo you would send. Include the one number you would agree to show, and the conditions.

A strong answer includes: the run-rate projection's bias and volatility (§27.3, §27.9); an offer of the model's median with its 80% range, rounded; the condition that the model has been back-tested in this competition; and a fallback (no number at all) for the first two overs, when the honest range is more than 100 runs wide.

D5. Women's cricket. Women's T20 projection ranges with the men's spread setting covered only 66–71% (Case Study 2). Is it better to fit a women's chain on 1,055 training innings, or to borrow the men's shape and re-scale? Argue both sides using Chapter 19's finding that innings shapes travel between eras better than levels.

A strong answer includes: the variance–bias trade-off (1,055 innings is thin for a ball-by-ball chain with 24 outcome types × 20 overs × 10 wicket states); the evidence that women's death-over bowling and batting depth differ (Chapter 26: spin bowls most WPL death balls); and a test you could run — Case Study 2's "Your turn" — rather than an opinion.


Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐

M1. (Chapters 19 + 27) ⭐⭐ Chapter 19's chain had a simulated full-innings spread of 31.1 runs against a real 38.3, fixed by a per-innings tilt of 0.08. This chapter's tuned future tilt is 0.07 and the update prior is 0. Explain why the unconditional tilt (Chapter 19) and the conditional future tilt (this chapter) are similar in size, and why the update prior could be zero without contradiction. Hint: the unconditional tilt describes how much innings differ from each other before a ball is bowled; the future tilt describes how much the rest of an innings differs from what its state predicts. If the first part of an innings told you little about the rest beyond the wickets column, the two would be about equal — which is what τ = 0 says.

M2. (Chapters 20 + 27) ⭐⭐⭐ Use winprob.first_innings_wp (Chapter 20) with this chapter's tuned chain in place of ParWP: price each simulated total with WP v1's defend curve to get P(bat-first side wins) at the end of each over of a first innings. Compare the Brier score over 2023–26 IPL first innings with Chapter 20's par-based version. Which is better calibrated? Hint: the chain gives a whole distribution of totals; average the defend-curve probability over the simulated totals rather than pricing only the median.

M3. (Chapters 6 + 27) ⭐⭐ The crease-quality feature shrinks career strike rates with 100 pseudo-balls. Re-run code/03_features.py with k = 0 (raw career SR) and k = 400. Does the projection get better or worse? Relate the result to Chapter 6's "balls until half signal". Hint: with k = 0 a batter with 30 career balls carries a strike rate as extreme as their luck; with k = 400 even established hitters are pulled most of the way to average. The best k should be near the half-signal point if the feature is doing its job.

M4. (Chapters 10 + 27) ⭐⭐⭐ Chapter 10 fitted Kaplan–Meier curves for Test batters and found Williamson's P(survive 100 balls) was 37.1%. Fit Kaplan–Meier curves in T20 for five batters of your choice (men's or women's, by registry id across competitions), and compare their medians with the pooled 13 balls. Which batter's survival curve is most unlike their strike rate would suggest?

M5. (Chapters 35 + 27) ⭐⭐⭐ An in-play market offers "SRH over/under 249.5" at 105/0 after 6 overs, at even money both sides. The chain says P(250+) = 0.592. Using Chapter 35's tools (implied probability, overround, Kelly), what would you do, and what would you need to believe about the model's calibration in this region before betting? (The chapter's IPL calibration table for "chance of T+" statements is the evidence.)

M6. (Chapters 23 + 27) ⭐⭐ Chapter 23's resource table and this chapter's environment-scaled ER table are close cousins. Show algebraically that score + ER(u, w) × env/par is the same as asking "how much of a par innings' resources remain?" and scaling by the environment. Where would a rain-shortened innings break the projection?


Part E — Research & Extension ⭐⭐⭐⭐

E1. A real batting order in the chain. The chain treats "wickets lost" as a stand-in for who is batting. Using registry ids and the batting order inferred from entry, build a chain whose run and dismissal probabilities depend on the actual batter on strike (shrunk toward the state average). Back-test it at overs 6/10/15 against the linear model with crease features. This is the engine Chapter 30 needs.

E2. Women's leagues side by side. Repeat the whole back-test (projection MAE, coverage, milestone calibration) for the WPL and the WBBL separately, fitting on women's data only, and compare with women's full-member T20Is. With 88 WPL test innings, what can and cannot be concluded? Propose a pooling scheme (Chapter 26's translation factors are one route) and test it.

E3. ODI milestones. Build the ODI version of milestone_prob and MilestoneModel (men's and women's ODIs, full members) and test calibration of P(hundred) from 50 by the over in which the fifty was reached. Does the "clock" matter as much as in T20? Compare with the Test ladder (Exercise B7).