Appendix I — Answers to Selected Exercises

Every chapter ends with an exercise set in the same shape: Part A (conceptual), Part B (calculation and interpretation), Part C ("Code It"), Part D (judgement and format transfer), Part M (mixed practice that reaches back to earlier chapters) and Part E (open research). Most chapters already answer Part B in collapsible <details> blocks beside the questions. This appendix supplies the rest of a working key:

  • Part A — short answers, usually two or three sentences. They are model answers, not the only acceptable ones; a different example that makes the same point is just as good.
  • Part B — worked answers for the items the chapter leaves unanswered. Where the chapter already gives the answer, this appendix does not repeat it.
  • Part C — two or three "Code It" items per chapter, with a code sketch built on the real toolkit and Crease functions, and the real output where running it is cheap. All of that code lives in one script, appendices/code/i_answers.py, one function per answer (ch08_c1 answers Chapter 8, exercise C1). Run one chapter with python appendices/code/i_answers.py ch08, one answer with python appendices/code/i_answers.py ch08_c1, or everything with no argument (on a Windows console set PYTHONIOENCODING=utf-8 first). The output blocks below were pasted from those runs on the book's data snapshot (Cricsheet, through November 2026).
  • Parts D and M — one or two judgement items per chapter, answered the way an analyst would answer a coach or an editor: a verdict, the reasoning behind it, and what would change the verdict.
  • Part E is open research and has no key.

Three rules carry over from the chapters. Every number about a real player, team or match is quoted from the chapter that computed it, or printed by the code here; if your own run differs by a decimal place because you chose a slightly different filter, the method matters more than the digit. Anything built on the simulated tracking layer is labelled 🧪 and is never a fact about a real player. And where an answer depends on judgement, the reasoning is the answer — a bare verdict earns little credit.

Use the key the way a good coach uses video: after you have tried the exercise, not instead of it.


Chapter 1 — Cricket's Moneyball Moment

Exercises: Chapter 1 exercises · Chapter: index

All Part B answers are in the chapter's <details> blocks.

Part A — Conceptual

A1. Batting average = runs ÷ dismissals; strike rate = 100 × runs ÷ balls faced, where a ball faced is any delivery received as striker except a wide. Retired hurt and retired not out are not dismissals.

A2. In a Test, wickets are the scarce resource, so runs per wicket matters; in a T20, 120 balls run out long before the wickets do, so the rate of scoring matters at least as much as survival.

A3. Context — Kohli usually reaches the death set, Suryakumar arrives later — and sample and era: 835 balls against 468, spread over seasons with different scoring levels.

A4. A wrong statistic misstates what happened (wides counted as balls faced); a misleading one is correct but invites a false conclusion — Jadeja's 8.23 economy against Pathirana's 9.24 when Pathirana bowled 53.5% of his balls at the death.

A5. On-base percentage was not magic; it was mispriced. Find what the market undervalues because it measures crudely — and expect the edge to close.

A6. Any four of: pitching location, ball speed or movement, shot direction, fielding positions and drops, DRS ball-tracking values, batting positions and roles — each with the question it blocks (e.g. no shot direction, no wagon wheel or field setting).

A7. Selection on the outcome splits a record by a result the record helped cause: Rohit averages 58.46 in ODI wins and 36.01 in losses, but India win because he scores. Non-cricket version: "students with tutors get lower grades".

A8. A dated milestone in each sport (analysts employed by most teams, public tracking data, a front office demonstrably winning by buying undervalued skills), then compare the dates.

A9. Kohli's death strike rate is computed correctly, but "better finisher" is about batters arriving at the death; Kohli's death balls are mostly faced when set.

A10. "2007/08", "2009/10" and "2020/21" are each one calendar year; used raw they sort out of place, while the start-date year puts every match in the season people mean.

Part C — Code It

C1. Environment-relative strike rate. Group all batters under one label to get the league line with the toolkit's own definitions.

balls = load_deliveries("ipl")
balls = balls[~balls["super_over"]].copy()
balls["year"] = balls["start_date"].dt.year            # "2007/08" -> 2008
league = batting_summary(balls.assign(all="league"), ["all", "year"]).droplevel("all")["strike_rate"]
pair = batting_summary(balls[balls["batter"].isin(["V Kohli", "SA Yadav"])], ["batter", "year"]).reset_index()
sr = pair.pivot(index="year", columns="batter", values="strike_rate")
out = pd.DataFrame({"league_sr": league.round(2)}).join(
    sr.rename(columns={"V Kohli": "kohli_sr", "SA Yadav": "sky_sr"})).sort_index()
out["kohli_rel"] = (100 * out["kohli_sr"] / out["league_sr"]).round(1)
out["sky_rel"] = (100 * out["sky_sr"] / out["league_sr"]).round(1)

Full code: appendices/code/i_answers.py (ch01_c1). Decisive rows:

      league_sr  kohli_sr  kohli_rel  sky_sr  sky_rel
2016     131.43    152.03      115.7  127.27     96.8
…
2023     141.72    139.82       98.7  181.14    127.8
2024     150.59    154.70      102.7  167.48    111.2
2025     152.55    144.71       94.9  167.92    110.1
2026     156.34    165.85      106.1  147.54     94.4

Seasons both batted: 14; Kohli above Suryakumar (relative) in 6 of them

Kohli's best relative seasons are 2010, 2013 and 2016 (114–116); his 2024–2026 surge is mostly the league rising from 150.59 to 156.34. Suryakumar peaked at 127.8 in 2023 but fell below the league in 2026 (94.4).

C7. The auction by role. Full code: ch01_c7.

Purchases: 607; role missing: 2 (excluded below)
                         n  median  mean  mean_over_median
role         overseas                                     
All-rounder  False     133     0.3  2.04              6.79
             True       71     2.0  4.14              2.07
…
Wicketkeeper False      43     0.6  2.68              4.46
             True       29     2.0  3.85              1.92

Indian all-rounders are the most skewed (6.79): a ₹30 lakh median (uncapped base price) with a few expensive capped all-rounders pulling the mean to ₹2.04 crore — plausibly two markets in one group, though that is not proven. Overseas groups are far less skewed because they rarely sell at the lowest base prices.

Part D — Judgement

D4. "The toss doesn't matter, then." Not necessarily. 51.6% across 1,218 IPL results averages over every venue, season and decision; a real edge at a few dewy evening venues could be diluted by none elsewhere, and a wrong call can cancel the benefit. Before agreeing, compute the toss winner's win rate by venue (shrunk), start time, season and decision, and check whether any split beats chance given how many comparisons you made. Chapter 22 does exactly that.

D5. Is ₹25 crore evidence of inefficiency? For: the top 10% of purchases took 45.3% of the money and half of all buys went at base price — consistent with paying for fame and recent highlights. Against: T20 talent may genuinely be concentrated, and a price also buys scarcity (one keeper-captain on offer). What would change my mind: runs or wins above replacement per crore for every purchase, predicted from pre-auction seasons and judged on later ones. If the dearest players consistently deliver less per crore beyond noise, the market mis-prices; if value per crore is flat across price bands, it doesn't. Chapter 13 and Chapter 34 run that test.


Chapter 2 — Cricket Data Sources and the Toolkit

Exercises: Chapter 2 exercises · Chapter: index

Short answers to every Part A item, all of Part B, M5 and a model answer to D2 are already in the exercise file's <details> blocks. This section adds worked code for C1 and C4 and model answers to D3 and D4.

Part C — Code It

C1. The WPL 2026 final. The stage column carries "Final" for 2025/26, so the hint's fallback isn't needed.

games = load_matches("wpl")
g = games[(games["season"] == "2025/26") & (games["stage"] == "Final")].iloc[0]
b = load_deliveries("wpl")
m = b[(b["match_id"] == g["match_id"]) & ~b["super_over"]]
ph = (m.groupby(["innings", "phase"], sort=False)
       .agg(runs=("runs_total", "sum"), wkts=("is_wicket", "sum"), legal=("is_legal", "sum")))
ph["run_rate"] = (6 * ph["runs"] / ph["legal"]).round(2)

Full code: appendices/code/i_answers.py (ch02_c1; crease.charts.manhattan draws the chart).

Delhi Capitals v Royal Challengers Bengaluru, Kotambi Stadium, Vadodara, 2026-02-05 - winner: Royal Challengers Bengaluru (by 6.0 wickets)
…
                   runs  wkts  legal  run_rate
innings phase                                 
1       powerplay    53     1     36      8.83
        middle       87     1     54      9.67
        death        63     2     30     12.60
2       powerplay    59     1     36      9.83
        middle      103     0     54     11.44
        death        42     3     28      9.00

Delhi made 203/4; the chase was won in the middle overs — 103 for no wicket at 11.44 an over left only 42 needed from the death, reached with two balls to spare.

C4. Colliding names in women's T20Is. Full code: ch02_c4.

n_ids = balls.groupby("batter")["batter_id"].nunique()
coll = n_ids[n_ids > 1]
batting_summary(balls[balls["batter"] == name], by="batter_id")  # one row per person
pinned = batting_summary(only_player(balls, name))               # others renamed "... (other)"
Colliding batter names: 2
…
Split by registry id:
           innings  runs  balls  outs  average  strike_rate
batter_id                                                  
e31c12c3         8   191    196     5     38.2        97.45
53d50717         1     2      2     0      NaN       100.00

Only two names collide (A Hartley, P Bhandari), and the damage here is one extra innings of 2 runs. The habit still matters: in men's T20Is and the franchise leagues collisions are far more numerous, and when the second person has a long record (the "Rashid Khan" case in §2.8) the merged line describes nobody. Note that only_player returns the whole table with other people renamed, so you must still select the player's row.

Part D — Judgement

D3. Drop every D/L match? The IPL has 23 D/L results in 1,243 matches (1.9%); men's T20Is 126 in 3,649 (3.5%), plus 3 awarded matches (ch02_d3). For dropping: a shortened innings has a different resource budget, so it biases season totals and par tables, and the loss is small. Against: rain is not random across venues and seasons, so dropping reweights the data, and career totals stop matching any record. Rule: keep every ball for player aggregates; drop or flag D/L matches for anything that depends on innings length. For a chasing-strategy study, D/L chases must be excluded or modelled with their revised target_runs and target_overs, as Chapter 23 does.

D4. Ranking T20I spinners without Afghanistan. Caveat: "This ranking covers men's T20 internationals in the book's data snapshot, which by Cricsheet's policy excludes every men's international involving Afghanistan. Afghan spinners such as Rashid Khan, Noor Ahmad and Mujeeb Ur Rahman do not appear, and the bowlers who do never bowled at Afghanistan's batters here. It ranks the spinners in the data, not the world's best." To reduce the gap, add the franchise leagues, where Afghan spinners do appear, and rank on economy and wicket rate relative to each competition's par, pinned by registry id — labelled as franchise cricket, never as an international record.

D5. "T20 death-overs strike rate" across ipl, bbl and hnd. What goes wrong: The Hundred archive mixes men's and women's matches; its innings is 100 balls in five-ball sets, so its "death" (balls 76–100) is a different stretch of a different game; the leagues have different scoring levels; super overs must go. A fair filter keeps the competitions apart and compares each batter with the same competition's death par:

b = cricdata.load_many(["ipl", "bbl", "hnd"])
b = b[~b["super_over"] & (b["gender"] == "male") & (b["phase"] == "death")]
s = batting_summary(b, by=["batter_id", "competition"])     # SR ÷ that league's death SR

Report The Hundred separately rather than pooled with the 20-over leagues.


Chapter 3 — Python and pandas for Cricket

Exercises: Chapter 3 exercises · Chapter: index

All Part B answers are in the chapter's <details> blocks.

Part A — Conceptual

A1. A variable names one value (target = 171); a list holds an ordered sequence (over_runs = [8, 12, 4, 15]); a dictionary maps keys to values (captains = {"Mumbai Indians": ...}), looked up by key rather than position.

A2. last_over[0] = 1, last_over[3] = 1, last_over[-1] = 0. Python position = ball number − 1.

A3. A wide is judged out of the batter's reach, so it is no chance to score off the bat; a no-ball can be hit, so it is a genuine opportunity and counts as faced.

A4. Batters with no balls faced would rank as the "slowest scorers" and drag down any average. NaN says "undefined", sorts out of the way and is left out of means. Zero is a claim; missing is the truth.

A5. Split deliveries by batting_team, apply a sum of is_six, combine into one Series indexed by team: balls.groupby("batting_team")["is_six"].sum().

A6. A left merge keeps every left row (NaN where unmatched); an inner merge keeps only matches. Merging deliveries onto "matches with a winner" with inner silently deletes every tie and no-result.

A7. wicket_kind is empty on 95.03% of IPL deliveries because no wicket fell — "not applicable". A genuine gap: city is blank for 51 IPL matches.

A8. Loops are slow (iterrows took 5.381 s against a fraction of a second for groupby) and error-prone (you re-implement definitions). A loop was right for inferring batting order, which is inherently sequential.

A9. Filtering IPL 2020 with season == "2020" (the label is "2020/21"), and combining a four and a six with & instead of |. Both return empty frames without complaint.

A10. 10.32 is runs conceded per six legal balls (the §3.5 phase table); 10.79 is all runs per six legal balls, extras included. Two definitions, two correct answers.

Part C — Code It

C1. Boundary-to-dot ratio.

b26 = balls[(balls["season"] == "2026") & ~balls["super_over"]]
s = batting_summary(b26)
s = s[s["balls"] >= 150].copy()
s["boundaries"] = s["fours"] + s["sixes"]
s["ratio"] = (s["boundaries"] / s["dots"]).round(3)

Full code: appendices/code/i_answers.py (ch03_c1).

Batters with 150+ balls: 46
                 balls  boundaries  dots  ratio  strike_rate
batter                                                      
V Suryavanshi      327         135   108  1.250       237.31
RM Patidar         260          72    68  1.059       192.69
FH Allen           163          61    58  1.052       214.11
…
V Kohli            407          98   106  0.925       165.85

The ratio rewards turning non-dot balls into boundaries — a "feast versus famine" measure, and the top ten are all fast scorers. It ignores ones and twos, the four/six difference, dismissals and phase.

C4. "Tight" overs. The over key is (bowler, match_id, innings, over), because over numbers repeat across matches.

b = balls[(balls["season"] == "2026") & ~balls["super_over"]].assign(rc=lambda d: cricdata.runs_conceded(d))
per = b.groupby(["bowler", "match_id", "innings", "over"]).agg(runs=("rc", "sum"), legal=("is_legal", "sum"))
per["tight"] = (per["runs"] <= 3) & (per["legal"] == 6)
card = per.groupby("bowler").agg(legal=("legal", "sum"), tight_overs=("tight", "sum"))
card["tight_pct"] = (100 * card["tight_overs"] / (card["legal"] / 6)).round(1)

Full code: ch03_c4.

                overs_bowled  tight_overs  tight_pct
bowler                                              
SP Narine               51.0           13       25.5
Mohammed Siraj          62.0           10       16.1
…
Reconciliation: sum of overs_bowled = 2777.3; season legal balls / 6 = 2777.3
Maidens in the season: 10; tight overs: 250 of 2804 overs

Only 10 maidens in 2,804 overs means "maidens" ranks bowlers on near-random rare events; 250 tight overs give twenty-five times as many. (Rashid Khan, also in the table, appears through his franchise record only — Afghanistan's internationals are not in the data.)

Part D — Judgement

D1. Does phase_table work on Tests? It runs, but the answer is meaningless: phase is defined only for limited-overs cricket. A meaningful Test "phase" groups by innings (the pitch wears), overs into the innings in bands (pd.cut(balls["over"], [0, 20, 80, 90, 500]) — new ball, middle, second new ball) or reconstructed day.

D5. Delhi Daredevils and Delhi Capitals. For franchise questions — all-time record, home-venue effect, head-to-heads — merge them: same franchise, same ground. For squad or strategy questions — "did the 2019 rebrand coincide with a new approach?" — keep them apart, or split by season, because players, coaches and auction strategy changed far more than the name. Keep an explicit mapping dictionary so the choice is visible.


Chapter 4 — Why Traditional Statistics Lie

Exercises: Chapter 4 exercises · Chapter: index

All Part B answers are in the chapter's collapsible blocks.

Part A — Conceptual

A1. Batting average ÷ dismissals (ignores pace); strike rate ÷ balls (ignores risk); runs per innings ÷ innings (ignores how the innings ended); economy per six legal balls (ignores wickets and phase); bowling average ÷ wickets (ignores balls used); bowling strike rate = balls ÷ wickets (ignores runs conceded).

A2. Average ÷ RPI = innings ÷ outs = 1 ÷ (1 − not-out rate), so the ratio depends on nothing but the not-out rate.

A3. A Test innings ends when ten wickets fall, so runs per wicket is the currency; a T20 innings usually ends with balls exhausted and wickets unused, so an average that ignores balls can rank a slow batter above a more useful fast one.

A4. Splitting a record by a result the player helped cause — e.g. "bowlers average less when their side bowled the opposition out cheaply"; the low score is partly made of their wickets.

A5. Par is what an average player would have produced on the same balls — the league's runs per ball in the same season and phase. Season matters because a death SR of 160 was excellent in 2012 and ordinary in 2026.

A6. Overall economy is a weighted average of phase economies. Bumrah is cheaper than Ashwin in every phase, but 39.2% of his balls came at the death against Ashwin's 12.8%; the weights flip the total (7.34 v 7.20).

A7. She bowled mostly in cheap phases, or mostly against weak sides, at low-scoring grounds or in a low-scoring era — where and when, not how well.

A8. At 30 overs in an ODI a wicket costs 20 overs of a set batter's acceleration and makes the side hold back; at halfway in a T20 only 60 balls remain and teams attack regardless.

A9. RPI charges a finisher's 20* off 9 as a short innings, though he ran out of balls, not wicket. A proper correction uses the balls available when he came in — runs above par for the remaining balls.

A10. Right: an unbeaten finisher did his job. Misleading: his many short not-outs inflate the average (Dhoni 38.30 against 22.48 RPI, 1.70×), and it says nothing about speed.

Part C — Code It

C1. The not-out discount in Tests. crease.traditional.traditional_batting adds the not-out columns.

from crease import data, traditional as tr
cols = ["match_id", "innings", "super_over", "batter", "non_striker", "runs_batter", "wides",
        "is_four", "is_six", "is_wicket", "wicket_kind", "player_out"]
t = tr.traditional_batting(data.load("tests_male", columns=cols), min_innings=100)
t.sort_values("not_out_pct", ascending=False).head(10)

Full code: appendices/code/i_answers.py (ch04_c1).

Test batters with 100+ innings: 91; median not-out % 9.0; median inflation 1.099

Highest not-out %:
               innings  runs  outs  not_out_pct  average  runs_per_innings  average_inflation
JR Hazlewood       104   586    52        50.00    11.27              5.63              2.002
JM Anderson        258  1290   149        42.25     8.66              5.00              1.732
…
S Chanderpaul      132  5995   105        20.45    57.10             45.42              1.257

(Careers in the data, which begins in December 2001.) The discount is smaller in Tests — median not-out rate 9.0% against 16.7% in the IPL and 12.9% in ODIs — because Test innings usually end all out. The list is dominated by tail-end fast bowlers; the one specialist is Chanderpaul, whose 57.10 average carries a 1.257 inflation (RPI 45.42, below Smith's 48.47 and Williamson's 48.79).

C2. Runs above par by season, Kohli and Suryakumar. Full code: ch04_c2.

rap = tr.runs_above_par(load_deliveries("ipl"), by=["batter", "year"])
two = rap.loc[["V Kohli", "SA Yadav"]].reset_index().sort_values(["batter", "year"])
  batter  year  runs  balls  par_runs  runs_above_par  rap_per_100
SA Yadav  2012     0      4       4.7            -4.7      -117.50
…
SA Yadav  2023   605    334     464.4           140.6        42.10
…
 V Kohli  2016   973    640     828.6           144.4        22.56
…
Career:
V Kohli   9336   6926    9100.6           235.4         3.40
SA Yadav  4581   3083    4218.2           362.8        11.77

The careers reproduce the chapter's +235.4 and +362.8. Suryakumar's edge comes from six straight seasons above par (2020–2025, peak +140.6 in 2023); Kohli mixes big seasons (2016's +144.4) with many near zero. The 2012 row (4 balls) is why thin seasons must be marked.

Part D — Judgement

D1. Runs above par in Tests. Par cannot be runs per ball, because wickets are the scarce resource and the situation decides whether speed is good. Pujara's strike rate of 44.29 would look poor against any scoring par, yet his 98.60 balls per dismissal is exactly the number three's job on day one. A useful Test par is built on balls (or runs) per dismissal relative to innings number, conditions and ball age — with scoring rate a separate, situation-specific measure, since day one wants survival and a day-four chase wants runs. Two numbers, used separately.

D3. Economy in Tests. For: economy measures control, which supports attacking fields, and it is stable (Chapter 16: repeatability 0.814 against 0.414 for strike rate). Against: Tests are won by taking twenty wickets; Bumrah's average 19.79 and Starc's 25.97 matter more, and Starc's dearer economy (3.43 v 2.77) is partly the price of attacking lengths. Economy matters more when time is the constraint — defending a fourth-innings target against the clock; on day five against a side batting for the draw, strike rate matters most and economy barely at all.


Chapter 5 — The Three Formats as Three Different Sports

Exercises: Chapter 5 exercises · Chapter: index

All Part B answers are in the chapter's <details> blocks. "Baseline" means the chapter's 2016–2026 figures for matches between full members (IPL: all matches).

Part A — Conceptual

A1. The binding constraint is what most often ends an innings. Tests: wickets (72.8% all out). T20: balls (about 16% of men's T20I innings all out; a wicket at halfway costs about 5.3 runs). ODIs: both, shifting through the innings (a wicket at 25 overs costs about 19.1 runs).

A2. Runs, balls and wickets trade at different exchange rates in each format: 40 off 80 is a valuable Test innings but in a T20 uses two-thirds of the balls at SR 50, far below the T20I baseline of 132.38.

A3. Full member v associate mismatches produce lopsided totals and collapses that distort run rate and boundary share for both sides.

A4. Balls per dismissal is one ratio that not-outs push up; the Kaplan–Meier median is where half of innings have ended, and not-outs are censored — counted as survived up to where they stopped, never discarded.

A5. From over 7 up to five fielders may stand outside the circle; the cliff appears exactly where the Laws say, so it also checks your phase labels.

A6. Test batters defend and leave more balls in line; Test bowlers attack the stumps for long spells. Dismissal-mode shares by format and bowler type are testable in Cricsheet; where the ball pitched and whether it would hit the stumps need ball-tracking.

A7. A player's average or SR ÷ the same competition-year baseline (1.00 = par). An IPL SR of 130 was above par in 2012 and well below it in 2026 (league 156.34).

A8. The 76 three-format batters were selected for all three formats, so the range is restricted and correlations shrink towards zero; the finding holds among elite players only.

A9. Tests have no fielding-restriction phases, so phase is undefined; use innings number, overs into the innings (new ball, middle, second new ball) and the survival curve.

A10. Name the format; pick the currency of the binding constraint; compare with a same-format, same-competition, same-era baseline; transfer across formats only where correlations allow; state the sample.

Part C — Code It

C1. Format baselines by season.

from crease.formats import filter_balls, format_baseline
for y in range(2016, 2027):
    b = filter_balls(balls, games, since=f"{y}-01-01", until=f"{y}-12-31", full_members_only=full)
    s = format_baseline(b)        # run_rate, runs_per_wkt, batting_SR, boundary_ball_pct, ...

Full code: appendices/code/i_answers.py (ch05_c1). Selected rows:

competition  year  innings  run_rate  runs_per_wkt  batting_SR  boundary_ball_pct
 T20I (men)  2023      118      8.74         25.15      137.60              18.29
 T20I (men)  2024      190      8.44         23.32      132.07              17.53
 T20I (men)  2026      172      9.19         25.58      144.94              19.67
…
        IPL  2021      120      8.05         26.01      126.98              16.02
        IPL  2023      147      8.99         28.11      141.72              19.13
        IPL  2024      142      9.56         29.41      150.59              20.97
        IPL  2026      147      9.88         31.26      156.34              22.47

The IPL run rate climbs every year from 2021 (8.05) to 2026 (9.88), with the biggest jumps into 2023 and 2024; men's T20Is wobble and reach a new high only in 2026 (9.19). That fits something IPL-specific from 2023 — the Impact Player rule is the obvious candidate — but it is a crude difference check, not proof.

C6. par_final at halfway. Fit once, store the coefficients, warn on extrapolation. Full code: ch05_c6.

fit = smf.ols("final ~ runs_so_far + wkts_so_far", data=df).fit()
coefs[fmt] = fit.params.to_dict()

def par_final(runs_so_far, wkts_so_far, fmt):
    c = coefs[fmt]
    if wkts_so_far > ranges[fmt][0]:            # 99th percentile of wickets in the fitting data
        print("  warning: ... beyond the fitting data")
    return c["Intercept"] + c["runs_so_far"] * runs_so_far + c["wkts_so_far"] * wkts_so_far
ODI at 25 overs: n=687, intercept 173.2, per run 1.231, per wicket -19.1
T20I at 10 overs: n=751, intercept 79.5, per run 1.293, per wicket -5.3
par_final(130, 2, 'ODI') = 295.1
par_final(130, 5, 'ODI') = 237.9
par_final(80, 2, 'T20I') = 172.4
par_final(80, 5, 'T20I') = 156.5
  warning: 9 down is beyond the 99th percentile of the fitting data
par_final(80, 9, 'T20I') = 135.4

Three extra wickets cost 57.2 runs in the ODI but 15.9 in the T20I: an ODI side at halfway still has 150 balls to bat and must turn cautious, while a T20 side with 60 balls left keeps attacking. The (80, 9) line shows why the warning matters.

Part D — Judgement

D3. Dot-ball % for Test batters? Not as a raw number. With 73.55% of Test balls faced being dots, it measures style and situation: leaving the new ball on a seaming pitch is good judgement, not failure. Making it meaningful needs to know whether each dot was left, defended or beaten, where it pitched and the match situation — none of which Cricsheet records. Balls per dismissal and the survival curve are the useful Test measures.

D4. ODI or Test record to pick a T20I batter? The ODI selector has the stronger case: ODI and T20I strike rates correlate at ρ = 0.80 among three-format batters. Still, that is across players; I'd want the batter's ODI powerplay and death strike rates, era-matched, plus any domestic T20 record. The Test record uses the wrong currency (Test average v T20I SR ρ = −0.01, with the range-restriction caveat) and could inform only narrow questions such as technique against high pace.


Chapter 6 — Statistical Thinking

Exercises: Chapter 6 exercises · Chapter: Statistical Thinking for Cricket

Part B's answers are in the chapter's <details> blocks.

Part A — Conceptual

A.1 One IPL ball (2023–26) has an SD of 1.81 runs — about 181 strike-rate points — roughly ten times the 13–19-point gap between good and ordinary batters. Noise shrinks with the square root of balls, so the gap shows only after a few hundred.

A.2 A T20 season holds few dismissals (8–20 for a regular), and whether each happens is luck-heavy (drops, edges, near run-outs). Strike rate uses every ball; average only the rare dismissal balls.

A.3 k is the balls needed for a number to be half ability, half luck: about 98 for strike rate, about 554 for dismissal rate — more than a full IPL season.

A.4 Nothing pulls. Better: "Players picked for extreme numbers were partly lucky; luck doesn't repeat, so as a group they sit closer to average later."

A.5 Abhishek's 2024 surge was mostly real (208 at the start, 202 at the end), but regression describes the average hot starter — slope 0.306 across 577 batter-seasons. One exception doesn't disprove it.

A.6 Balls within an innings share pitch, bowlers, set-ness and match situation; resampling single balls treats them as independent and narrows the interval. Resample whole innings.

A.7 The bootstrap uses only the data; the credible interval combines a prior with it. With 4–8 innings the bootstrap is over-confident, so the Bayesian interval is safer; long careers agree.

A.8 Subgroups with different baselines and different player mixes: Dhoni faced about 50% of his balls at the death, Rohit about 15%. Rohit was faster in every phase but slower overall (132.9 v 137.5); on the league mix, 136.9 v 111.4.

A.9 Runs help cause wins, so the split selects on the outcome; 93.9% of men's ODI batters show the gap. It says nothing about one player's temperament.

A.10 No. Real strength differences between IPL teams (SD about 4 points) are small next to 14 games' luck (SD 13.1), because auction, purse cap and player movement compress strength.

Part C — Code It (selected)

C.1 — bowling reliability. Per-bowler arrays from legal balls, then split_half and fit_k:

from crease.uncertainty import split_half, fit_k
b = load_deliveries("ipl")
b = b[~b["super_over"] & b["is_legal"]].copy()
b["rc"] = cricdata.runs_conceded(b)
b["dot"] = (b["rc"] == 0).astype(float)
b["wkt"] = cricdata.bowler_wicket(b).astype(float)
per = {lab: {k: g[col].to_numpy() for k, g in b.groupby("bowler")}
       for lab, col in {"economy": "rc", "dot %": "dot", "wicket rate": "wkt"}.items()}
r = split_half(per["dot %"], n=200, reps=20, seed=6)      # ... for each n, then fit_k(ns, rs)

Full code: appendices/code/i_answers.py (ch06_c1).

IPL 2008-2026, legal balls, split-half reliability (mean of 20 random splits)
  n  bowlers  economy (runs/ball x 6)  dot %  wicket rate
100      284                    0.376  0.529        0.083
…
600       72                    0.696  0.838        0.208
  fitted k  economy (runs/ball x 6)      193 balls
  fitted k  dot %                         99 balls
  fitted k  wicket rate                 1829 balls

Dot % stabilises fastest (about four matches of bowling), economy at about 193 balls, wicket rate only after several seasons — the same order as §6.2's season-to-season correlations. Wickets are rare, so they carry least information per ball.

C.5 — a bowling Simpson's paradox. Pass the negative of economy so "higher" means cheaper:

from crease.uncertainty import simpsons_pairs, standardise
s = bowling_summary(ipl, by=["bowler", "phase"]).reset_index()
s = s[s["balls"] >= 60]
econ = s.pivot(index="bowler", columns="phase", values="economy")
balls = s.pivot(index="bowler", columns="phase", values="balls")
ok = econ.notna().all(axis=1)
pairs = simpsons_pairs(-econ[ok], balls[ok])

Full code: ch06_c5.

Bowlers with 60+ legal balls in all three phases: 171
Paradox pairs (cheaper in every phase, dearer overall): 66
…
               pp_share  mid_share  death_share  econ_pp  econ_mid  econ_death  pooled  standardised
Naveen-ul-Haq      0.37       0.22         0.41     9.67      7.36        9.66    9.16          8.60
DR Smith           0.12       0.75         0.13    11.00      7.97       13.10    9.02         10.07

66 pairs, more than Chapter 4's 40 because the floor differs. Naveen-ul-Haq (IPL record) is cheaper than Dwayne Smith in every phase, but 78% of his balls came in the two dear phases against 25% of Smith's; on the league mix it is 8.60 v 10.07. Bumrah v Ashwin reproduces Chapter 4 (7.34 v 7.20 pooled; 7.05 v 7.32 standardised).

Part D — Judgement (selected)

D.3 — teenager v veteran. Separate k from the centre. Per-ball noise is similar for both, so k barely depends on age. Age matters for where to shrink: a veteran towards his own long record, a teenager towards a prior for rising players — Case Study 1 shows league-mean shrinkage under-forecast Suryavanshi, Arya and Abhishek Sharma. Setting that centre needs aging curves (Chapter 25) and a back-test; until then a selector's eye test can set it, written down before the season.

D.5 — the Wolvaardt graphic. For broadcast, show the raw tournament average (67.1) with the honest estimate beside it: "Tournament average 67.1 · long-run estimate ~56." For a betting price, use the shrunk estimate: 67.1 treats eight innings as her true level, while the sceptical posterior (55.6) sat closer to what followed (59.12 in her next nine ODIs, on eight dismissals). Chapter 35 makes the point with prices.


Chapter 7 — Visualizing Cricket

Exercises: Chapter 7 exercises · Chapter: Visualizing Cricket

Part B's answers are in the chapter's <details> blocks.

Part A — Conceptual

A.1 (a) A Manhattan of the spinners' overs or a phase × bowler heat map; (b) a run-rate chart (current v required) — "ahead of the clock" is about rates; (c) a partnership chart; (d) a control chart of powerplay scoring; (e) small multiples on a shared scale, not a radar.

A.2 The worm compares with what the opponents had by that point; the run-rate chart with what the chase still needs. A chase level on the worm but with many wickets down, or against a side that exploded at the death, can face a required rate far above its current one.

A.3 Position on a common scale, length, angle, area, colour hue. The worm uses position; the Manhattan uses length.

A.4 Two fours, a six and two singles; a no-ball plus a free hit hit for six; or no boundary off the bat at all (five-wides, byes, twos). The bar reports runs, not how they came.

A.5 Printed values spare readers a low-accuracy colour decode and include colour-blind readers; grey for missing stops "no data" being read as zero or average.

A.6 The band (centre ± 2.66 average moving ranges) that routine variation stays inside. A point outside is a signal worth investigating, not a cause; the Impact Player rule is a candidate explanation needing separate evidence.

A.7 Area depends on axis order (fix the order or use bars); area grows with the square of values (show numbers or a strip plot); axes look equally weighted and hide samples (print balls, or small multiples with intervals).

A.8 The layer generates a pitch location consistent with each real outcome from a model of how pitch maps generally look. "1.3 m" would describe the simulator plus real outcomes, not where his yorkers landed; only the real Hawk-Eye feed could support it.

A.9 A 150-over Manhattan is unreadable, and a Test innings' story is time and survival, not runs per over. Draw cumulative score against balls with wicket markers, or session blocks.

A.10 "Correct" asks whether the numbers are right; the thumb test asks whether a reader gets the message unaided.

A.11 Where a wicket line crosses a bar depends only on axis scaling, so the "story" can be manufactured. Put wicket markers above the bars on one scale.

A.12 Interactive for online exploration; the annotated worm, which picks and labels the key moments, for print, broadcast or a coach.

Part C — Code It (selected)

C.1 — MI v DC, IPL 2023.

from crease import charts
balls, games = load_deliveries("ipl"), load_matches("ipl")
m = charts.match_balls(balls, "1359490")
fig = charts.match_dashboard(balls, "1359490", games)     # charts.save(fig, "images/...png")
t = charts.over_table(m)
t = t[(t["innings"] == 2) & t["over"].between(14, 18)].copy()
target = int(m.loc[m["innings"] == 1, "runs_total"].sum()) + 1
t["need"] = target - t["cum_runs"]
t["balls_left"] = 120 - 6 * t["over"]
t["req_rate"] = (6 * t["need"] / t["balls_left"]).round(2)

Full code: appendices/code/i_answers.py (ch07_c1).

{1: 'Delhi Capitals 172/10 (19.4 ov)', 2: 'Mumbai Indians 173/4 (20 ov)'}
 over            bowler  runs  wickets  cum_runs  cum_wkts  need  balls_left  req_rate
   15 Mustafizur Rahman     2        0       123         1    50          30     10.00
   16      Mukesh Kumar    16        2       139         3    34          24      8.50
   17 Mustafizur Rahman     8        1       147         4    26          18      8.67

Manhattan: over 16 is a wicket over and one of the taller bars (16 for two). Run-rate chart: it lowered the required rate from 10.00 to 8.50 — with nine wickets in hand the runs mattered more. Worm: Mumbai reached 173/4 off the last ball. Unlike Newlands, a wicket over that leaked runs didn't hurt the chase.

C.4 — men's T20I control chart. Full-member results without a rain method, first-innings totals averaged by calendar year, limits set on 2008–22. Full code: ch07_c4.

      matches  avg_first_innings
year                            
2005        3              175.3
…
2025       87              169.1
2026       81              184.1

Baseline to 2022: mean 160.6, average moving range 10.67, limits 132.2 to 188.9
Years outside the limits: {}
Years with 40+ matches only: limits 133.4 to 184.1; outside: {}

Verdict: the claim fails on this chart. 2026 (184.1) is the highest year but inside the limits, whereas the IPL's four seasons since 2022 were all outside its limits (147.3–179.0). Caveat: points average 3 to 100 matches, so noisy early years widen the limits; a match-weighted chart might catch 2026 as the start of something.

Part D — Judgement (selected)

D.4 — season averages v individual matches. Limits from the moving range between consecutive matches absorb venue, pitch, toss, teams and dew; T20 first-innings totals vary by 30–40 runs match to match, and those conditions are not a stable process, so a match chart will flag spurious points. A season average divides that noise by roughly √70, making a shift in the level of scoring visible. Publish the season chart to answer "has scoring changed?", with per-season box plots if the audience needs the spread.


Chapter 8 — Beyond Batting Average

Exercises: Chapter 8 exercises · Chapter: Beyond Batting Average

Part B's answers are inline in the chapter.

Part A — Conceptual

A1. (a) In a Test, wickets are scarce, so batting average is the currency; (b) in T20, balls are scarce and wickets usually aren't, so strike rate is.

A2. A wide is out of reach, so no chance was used or wasted; a no-ball can be hit, often freely, so it is a real opportunity.

A3. Boundary-ball % measures how often he finds the rope; boundary-run % describes the style of his runs. A Test opener who scores few singles can have low boundary-ball % but high boundary-run % — Test batters' median boundary-run % (51.94) exceeds ODI batters' (46.41).

A4. The 55–65% band holds 80 of 140 regular IPL batters (57%), so it describes the ordinary batter; the fastest tenth have median 71.52, and the metric measures style, not speed. Better: "Elite T20 batters hit a boundary off a far higher share of balls; boundary-ball % alone explains about three-quarters of the spread in IPL strike rates."

A5. Runs per 100 non-boundary balls — rotation and running, which boundary-ball % can't see.

A6. Dismissals ≤ innings, so RPI ≤ average; equal only with no not-outs.

A7. Boundary-run % is the most repeatable metric (r 0.572), yet a batter who hits a four every 20 balls and never runs can beat one who hits boundaries twice as often and rotates. Stability shows a metric measures something; value is a separate question.

A8. Par is the league's runs per ball for the same season and phase. Powerplay par SR went from 113.1 (2012) to 159.1 (2026), so an all-time par would penalise early-era and middle-overs batters.

A9. Russell's powerplay SR+ of 218, the brightest cell in Figure 8.5, rests on 14 balls.

A10. Real: each scoring shot and the totals (Suryakumar 1,332 off 816, Abhishek Sharma 1,486 off 739 in IPL 2024–26). Simulated: direction, angle and distance, from toolkit/tracking_sim.py, with a per-batter preference that is not the real player's.

Part C — Code It (selected)

C1 — balls per dismissal, split by phase share:

from crease import batting as bt
prof = bt.batting_profile(load_deliveries("ipl"), min_balls=500)
prof["balls_per_dismissal"] = (prof["balls"] / prof["outs"].where(prof["outs"] > 0)).round(1)
ph = bt.phase_profile(ipl)
ph["phase"] = ph["phase"].astype(str)          # categorical -> str before pivoting
prof = prof.join(ph.pivot_table(index="batter", columns="phase", values="phase_share"))

Full code: appendices/code/i_answers.py (ch08_c1).

IPL 2008-2026, batters with 500+ balls: 140
Top ten:
                 balls  outs  balls_per_dismissal  strike_rate
KL Rahul          4179   126                 33.2       139.15
B Sai Sudharsan   1686    52                 32.4       149.17
…
Bottom ten:
SP Narine         1101   104                 10.6       165.30
PP Chawla          563    56                 10.1       110.83
corr(balls per dismissal, strike rate) = -0.133
  mostly powerplay (>50% of balls)   n= 31  r=-0.459
  mostly death (>40% of balls)       n= 23  r=0.294

Overall, survival and tempo barely trade off (r −0.133), but the pooled number hides two patterns. Powerplay-heavy batters face a real trade-off (−0.459: Rahul bats long, Narine attacks); among death-heavy batters it is positive (0.294), because finishers who survive are usually good enough to score fast too. The bottom ten mixes pinch-hitters with tail-enders slogging — role as much as skill.

C7 — Kohli's season SR+.

s = bt.sr_plus(load_deliveries("ipl"), by=["batter", "year"]).loc["V Kohli"].sort_index()
s = s[s["balls"] >= 150]

Full code: ch08_c7.

      balls  runs  strike_rate  par_sr  sr_plus
year                                           
2016    640   973       152.03  129.46    117.4
…
2022    294   341       115.99  128.04     90.6
2023    457   639       139.82  138.17    101.2
2024    479   741       154.70  147.98    104.5
2025    454   657       144.71  148.98     97.1
2026    407   675       165.85  155.17    106.9

From 2022 to 2026 his strike rate rose about 50 points but par rose about 27. His 2024–26 SR+ (104.5, 97.1, 106.9) sits near par and below his 2016 peak of 117.4: he moved from below par to around it, but most of the "new Kohli" was the whole IPL speeding up. (Plot SR and SR+ in stacked panels, never on two y-axes.)

Part D — Judgement (selected)

D5 — Perry or Devine? Perry's 64.80 average is inflated by not-outs (15 dismissals in 25 innings; RPI 38.88): survival at roughly par tempo (SR+ 103.9). Devine is out far more often (average 25.80) but scores well above par (SR+ 122.7). With a fragile middle order, each wicket exposes weak batting, so Perry's survival is worth more than her strike rate suggests. With a deep middle order, wickets are cheap and tempo is scarce, so pick Devine. Both rest on 731 and 426 balls — under two seasons of evidence in Chapter 6's terms — so hold the preference loosely.


Chapter 9 — Batting Impact and Context

Exercises: Chapter 9 exercises · Chapter: Batting Impact and Context

Part B's answers are in the chapter's <details> blocks.

Part A — Conceptual

A1. Runs needed sets the job, balls left the time (and with runs the required rate), wickets in hand the affordable risk. The required rate ignores wickets.

A2. Value is the change in the chance of winning, not runs. Needing 54 off 30, six singles leave 48 off 24 — runs scored, chance lowered.

A3. A wicket is a cliff: needing 50 off 36, six-to-five in hand moves WP from 0.654 to 0.511. Smoothing across wickets would blur the cliff and shrink the measured cost of a wicket.

A4. 0.207 is the win share of 29 real chases through that cell — too few for a probability. WP v0 borrows from 2,098 neighbouring states (0.400 on their own) plus shape rules, giving 0.413.

A5. Including Newlands would add a known "win" to the sparse late cells Prasanna and Gunaratne batted through, so the curve would partly know the ending and late WPA would inflate.

A6. WPA depends on opportunity (the same runs are worth more in a tight 19th over) and on partners, opponents and the table (B8: Gardner 0.925 → about 0.56). It measures what happened, not ability.

A7. Ball changes telescope: their sum is result − starting WP, and attribution only splits them, so it must add to the same total — a built-in check.

A8. In Figure 9.3 contours are far apart early (time to recover) and bunch late, so a below-rate innings costs little in overs 1–8 and a great deal in 15–20.

A9. Smooth the distribution of runs to come from (60 balls, 1 down), add 79 (mean total 175.7), then average 1 − WP v0 for a chase needing T + 1 over that distribution: 0.602.

A10. Who is still to bat and bowl; conditions (dew, boundary size, a slowing pitch); the batters' state (set, new or injured). Each can push the true WP above or below the memoryless table.

Part C — Code It (selected)

C1 — leverage index. WP v0 fitted without Newlands; for each ball, the expected absolute WP change over an illustrative next-ball distribution (assumptions, not estimates):

outcomes = [(0, 0, 0.35), (1, 0, 0.35), (2, 0, 0.08), (4, 0, 0.12), (6, 0, 0.05), (0, 1, 0.05)]
def leverage(R, B, W):
    now = float(wp.predict(R, B, W))
    tot = 0.0
    for runs, wkt, p in outcomes:
        r2, b2, w2 = R - runs, B - 1, W - wkt
        nxt = 1.0 if r2 <= 0 else (0.0 if (w2 <= 0 or b2 <= 0) else float(wp.predict(r2, b2, w2)))
        tot += p * abs(nxt - now)
    return tot

Full code: appendices/code/i_answers.py (ch09_c1).

Newlands chase, leverage by over (state at the over's first legal ball):
          R    B   W  mean_lev  max_lev
1     170.0  120  10     0.021    0.025
…
15     56.0   36   8     0.027    0.034
16     54.0   30   8     0.041    0.044
…
20     11.0    6   5     0.120    0.212

Five highest-leverage balls:
 ball  runs_needed  balls_left  wkts_in_hand        batter         bowler   lev
 19.4          5.0           3             5 DAS Gunaratne     D Paterson 0.212

Leverage sits near 0.02 for 15 overs, jumps in Tahir's over 16 and averages 0.12 in the last; the top ball (needing 5 off 3) is about ten times an early ball — why finishers top WPA tables.

C6 — does the credit convention matter? Byes and leg-byes to the striker; a non-striker run-out charged to the striker:

def credit_alt(s):
    who = s["batter"].copy()
    wides_nb_only = (~s["is_wicket"]) & (s["runs_batter"] == 0) & ((s["wides"] > 0) | (s["noballs"] > 0))
    return who.where(~wides_nb_only, "extras")

Full code: ch09_c6.

               wpa_v0  wpa_alt  change
S Prasanna      0.504    0.334  -0.170
DAS Gunaratne   0.377    0.351  -0.026
…
BKG Mendis     -0.235   -0.065   0.170
Sum (both conventions must agree): 0.569 / 0.569

The totals agree (0.569 = 1 − 0.431). One ball does the work: Mendis's non-striker run-out in over 18 moves 0.170 from Mendis to Prasanna. I prefer v0's convention (the man out lost his wicket), but a convention can move one batter's WPA by 0.17 in a match, so always state it.

Part D — Judgement (selected)

D3 — de Silva's role. (a) WPA was unfair: if told to bat through while Dickwella attacked, his 19 off 27 was the plan working, and it rested on what WP v0 can't see — the hitters to come and bowlers' remaining overs; WPA charges him for strategy, not execution. (b) The instruction was the mistake: at 116/2 needing 54 off 30 (asking 10.80 and rising), scoring at less than half the asking rate passed the problem on, and a role that needs Prasanna's 37* off 16 to rescue it was a bad role. Data needed: the actual instructions, the planned order, ball-tracking on whether he was beaten or chose to block, and the bowlers' plans for overs 16–20.


Chapter 10 — Test Batting

Exercises: Chapter 10 exercises · Chapter: Batting in Test Cricket

Part B's answers are in the chapter's <details> blocks. "Career" means career within the snapshot (men's Tests, December 2001 – October 2026).

Part A — Conceptual

A1. Average = balls per dismissal × strike rate ÷ 100. In Tests survival varies hugely (Chanderpaul 130.3 balls per dismissal) while strike rates sit in a narrow band; in T20 survival is capped at 120 balls, so strike rate is where batters differ.

A2. Hundreds ÷ (fifties + hundreds) is P(reach 100 | reached 50), never above 100%; "hundreds ÷ fifties" can exceed 100% and is no probability.

A3. The innings length is censored. Counting not-outs as dismissals biases P(lasting 100 balls) down; deleting them biases it up. Kaplan–Meier uses each not-out while at risk, then drops it.

A4. The batter's clock (balls faced) answers "how dangerous are the first 20 balls?"; the ball's clock (over of the innings) answers "does the second new ball raise risk?". Neither can answer the other's question.

A5. Early overs mix "new ball" with "new batter". Splitting new (<30 faced) from set shows the second-new-ball effect within set batters: hazard 1.12% → 1.52%.

A6. Selection on the outcome — his runs help produce the wins (Chapter 4: 102 of 103 ODI batters average more in wins). The question is whether he wins more than a replacement would.

A7. It compares each visitor with his own other tours, holding quality constant; it still can't separate conditions from the home attack's quality or scheduling.

A8. The prior is worth 56 fifty-plus scores at 33.7%, outweighing 25 of his own about two to one: (12 + 18.9) / (25 + 56.2) ≈ 38%. Above the pool, but "elite converter" isn't proven.

A9. No — 0.532 is barely better than a coin at ranking innings, because who bats and luck dominate. The hazard ratios (away 1.091, fourth innings 1.275) remain valid average adjustments.

A10. Selection: batters reaching the nineties are set and good. Behaviour: SR rises from 59.1 to 65.6 — they push, accepting a little more risk while concentrating harder.

A11. Run-outs aren't caused by bowler type, so the splits exclude them; the splits therefore have fewer dismissals than the overall record and average slightly higher.

Part C — Code It (selected)

C1 — relative balls per dismissal, mirroring relative_average with base_bpd:

from crease import test_batting as tb
base = tb.era_baseline(inns)
def relative_bpd(inns, player, baseline):
    p = inns[inns["batter"] == player]
    w = p.groupby("year")["balls"].sum()
    era = float(np.average(baseline.loc[w.index, "base_bpd"], weights=w))
    bpd = p["balls"].sum() / p["out"].sum()
    return {"bpd": round(bpd, 1), "era_bpd": round(era, 1), "relative_bpd": round(bpd / era, 3)}

Full code: appendices/code/i_answers.py (ch10_c1).

Batters with 80+ innings at positions 1-7: 95
                 bpd  era_bpd  relative_bpd
S Chanderpaul  130.3     76.0         1.715
SPD Smith      104.1     69.2         1.506
KS Williamson  104.0     70.0         1.485
KC Sangakkara  112.4     76.1         1.478
…
R Dravid       109.0     76.2         1.431

Chanderpaul stays top, but Smith and Williamson rise above Sangakkara, Kallis and Dravid, whose raw figures are higher: top orders lasted about 69–70 balls in their years against about 76 in the 2000s.

C3 — start v set. Reuse tb._striker_balls and bin balls already faced:

def start_set_profile(balls, batter):
    f = tb._striker_balls(balls[balls["batter"] == batter])
    f["stage"] = pd.cut(f["faced_before"], [0, 20, 50, 10_000], right=False, labels=["0-19", "20-49", "50+"])
    h = f.groupby("stage", observed=True).agg(balls=("out_here", "size"), outs=("out_here", "sum"))
    h["hazard_pct"] = (100 * h["outs"] / h["balls"]).round(2)
    return h

Full code: ch10_c3.

                0-19 hazard% 20-49 hazard% 50+ hazard% 0-19 outs/balls 20-49 outs/balls 50+ outs/balls
Babar Azam              1.42          1.23        1.16         30/2109          27/2190        50/4315
Shubman Gill            1.98          1.35        1.16         25/1263          16/1181        27/2335
FDM Karunaratne         1.54          1.39        1.14         50/3257          47/3387        83/7286
D Elgar                 1.56          1.46        1.04         41/2635          38/2594        62/5961

Elgar is the hardest to remove once set (1.04% on 5,961 balls). Gill's start-to-set drop is steepest (1.98% → 1.16%), so attack him early — though 25 dismissals make that gap loose. Babar is the least vulnerable starter.

Part M — Mixed (selected)

M1. Spearman–Brown: conversion 2(0.28) / 1.28 = 0.44; average 2(0.44) / 1.44 = 0.61. So about 56% of the spread in full-career conversion is noise, against about 39% for average — why B3's milestone ladder found no special "conversion skill".

Part D — Judgement (selected)

D7 — the selector's note (hypothetical batters). "South Africa is the hardest tour in the data (visitor index 80.6), so the question is pace in SENA conditions. X averages 31 against SENA pace on 18 dismissals, Y 37 on 41; shrinking both toward the top-order SENA-pace average (33.67) narrows the gap but probably leaves Y ahead. X's 44 career average is built at home (52 v 36 away); Y's 38 away is the relevant tour number. I recommend Y. Before deciding I'd want both batters' records against pace in the first 30 overs, any first-class record in South Africa, and whether X's SENA dismissals cluster early in his career."


Chapter 11 — Batting Matchups

Exercises: Chapter 11 exercises · Chapter: Batting Against Specific Bowlers

Every Part B answer is in the chapter's <details> blocks.

Part A — Conceptual

A1. The median batter–bowler pair (of 261,942) has met for 5 balls; a head-to-head is the intersection of two small samples, and even famous rivalries rarely pass 60 balls.

A2. For: a run-out is about running and fielding, not this bowling type. Against: a bowler who strangles a batter with dots can provoke the desperate single.

A3. A containment matchup slows a batter without getting him out more often — left-handers score at 116.1 against off-spin but last 22.7 balls per dismissal (19.7 overall). In the middle overs, cheap overs are often worth more than wickets.

A4. (1) League cells — hand × type × phase × era × settle baseline; (2) the batter's skill on the other types; (3) his own record against the type, shrunk toward (1) × (2).

A5. Measured on all balls, a real weakness would drag his skill index down and partly cancel itself; leave-one-type-out keeps expectation independent of the evidence.

A6. Dismissals are rare (about one ball in 22) and true dismissal differences small (about 10% of the mean), so far more balls are needed before his own record earns half the weight.

A7. True relative to his own expectation (shrunk effect −14.1); misleading in absolute terms — his raw SR against right-arm pace, 153.9, is far above an average batter's on the same balls. Extraordinary spin-hitting inflates his expectation.

A8. Captains choose when to bowl off-spin; the model ignores venue, pitch and field; "off-spin" lumps Narine with part-timers, and untyped bowlers are not random. Batter adaptation is a fourth.

A9. Only data before the first semi-final (4 March 2026) was available to a real analyst; using later data is leakage.

A10. His Afghanistan internationals — Cricsheet withholds them, so his numbers come only from franchise leagues.

A11. Untyped bowlers are associates, youngsters, part-timers. A domestic batter facing mostly them has a thin card, and his typed cells rest on the harder part of his diet.

A12. Head-to-head: a talking point or tie-breaker. Shrunk batter-versus-type: who bowls the next over to a set batter. League hand × type: the default plan, and the most reliable.

A13. The type model needed only McConchie's type and de Kock's 1,000-plus off-spin balls; a head-to-head tool had zero balls and nothing to say.

Part C — Code It

C1. Boundary engine or dot engine? Add league-cell boundary and dot rates in the same groupby as lg_rpb, then sum them over de Kock's balls. The script uses the final styles table (data/reference/player_styles.csv, 2,011 rows), as the chapter does, so the counts match the chapter's.

from crease.matchups import known, DEFAULT_KEYS
f = known(faced).copy()
f["bb"], f["dot"] = f["runs_batter"].isin([4, 6]), f["runs_batter"].eq(0)
cells = f.groupby(list(DEFAULT_KEYS), observed=True).agg(lg_bb=("bb", "mean"), lg_dot=("dot", "mean")).reset_index()
me = f[f["batter"] == "Q de Kock"].merge(cells, on=list(DEFAULT_KEYS))
t = me.groupby("group").agg(balls=("runs_batter", "size"), bb=("bb", "sum"), dot=("dot", "sum"),
                            lg_bb=("lg_bb", "sum"), lg_dot=("lg_dot", "sum"))

Full code: appendices/code/i_answers.py (ch11_c1).

                     balls  bb_pct  bb_pct_league  dot_pct  dot_pct_league
Right-arm pace        2647   22.89          20.83    37.40           40.87
Off-spin              1226   13.46          15.50    41.44           41.83
Leg-spin               455   14.73          17.17    33.63           33.11
…

Against off-spin his dot % (41.44) matches an average left-hander's on the same balls (41.83), but his boundary-ball % is 2.04 points lower. The deficit is fewer boundaries, not more dots — consistent with Chapter 8's finding that boundary-ball % drives most of the spread in strike rates.

C3. Are left-handers better against leg-spin? rate_table by hand, then by phase × settle, then uncertainty.standardise on the pooled mix (ch11_c3).

Raw gap (left - right): +5.5 SR points
Standardised on the pooled mix: left 130.5, right 125.5, gap +5.0

The claim survives: left-handers lead in seven of nine cells and standardising removes only 0.5 points. Leg-spin to a left-hander turns into the bat — the mirror of the off-spin containment matchup.

Part D — Judgment

D2. Reply to the head coach. "Tell me what you see when he faces off-spin — the numbers can't see footwork. Here is what they can see: over 1,226 balls since 2015 he scores at 112.9; an average left-hander on the same balls scores 120.9, and his own record elsewhere says 125.8. He is 11–17 points short of that in each of four eras, so it isn't one bad season. It is not a wicket on demand — he gets out to off-spin about as often as expected. It is roughly 0.6 runs an over. If you can name the mechanism, we have a matchup worth using; if not, treat it as a lean, not a rule."

D6. The case for scoring matchups. Dismissal matchups are almost invisible: true effects are about 10% of the mean and need about 2,000 balls before a batter's own record earns half the weight. Scoring matchups are real (true SD about 9.5 SR points), estimable at about 300 balls, and stable. With a wicket at halfway worth only about 6 runs (Chapter 4), a reliable 0.6 runs an over over two or three overs is a meaningful fraction of a wicket. Chapter 31 prices it: planning the semi-final around de Kock and Rickelton gains 3.62 runs. Small, reliable edges compound; large, imaginary ones don't.


Chapter 12 — Batting Partnerships

Exercises: Chapter 12 exercises · Chapter: Batting Partnerships

All Part B answers are in the chapter's <details> blocks, as are outline answers to D.1, D.2, D.3 and D.5.

Part A — Conceptual

A.1 A stand is the run of deliveries between two wicket events, extras included. A retirement changes the pair but not the wicket number, which counts dismissals; in the IPL the choice affects 19 of 16,631 stands.

A.2 Partnership average divides by stands ended by a dismissal; mean stand by all stands. Unbroken stands add runs but no denominator — the not-out flattery of batting average.

A.3 An unlogged retirement, or a concussion substitute. A few stray balls are quirks; thousands mean your stand boundaries are wrong.

A.4 Rotation % is how often a non-boundary ball is scored off; running % how often a scoring one becomes two or more. NBSR mixes them, so partnership questions need the parts separately.

A.5 Partnership runs include the partner's runs and extras; 20,211 measures Kohli's involvement, not his production.

A.6 Betweenness counts how often a batter lies on shortest paths between others — a connector. Chawla's lower-order stints for three franchises link otherwise separate clusters. Position, not quality.

A.7 Pair excess = SR+ together − the two batters' SR+ apart. Comparing with the league would call two good batters' individual quality "chemistry".

A.8 Survivor selection: weaker batters are out early. Within specialists the first ten balls carry 1.74% risk per ball against 1.59% for balls 11–40 — about 9% higher, not 54%.

A.9 Pair-level comparison mixes hand with batter quality; comparing each batter with himself holds quality fixed.

A.10 Farming creates dots and invites attacking fields; a competent tail-ender may be safer facing than the specialist attacking against a spread field.

Part C — Code It

C.1 Strike change rate. The strike changes on a legal ball when runs_batter + byes + legbyes is odd and the ball was not a boundary.

b = tag_stands(load_deliveries("ipl"))
top = pair_summary(partnership_table(b)).head(10).index
legal = b[b["is_legal"] & b["pair"].isin(top)].copy()
ran = legal["runs_batter"] + legal["byes"] + legal["legbyes"]
legal["change"] = (ran % 2 == 1) & ~(legal["is_four"] | legal["is_six"])
t = legal.groupby("pair").agg(balls=("change", "size"), strike_changes=("change", "sum"))
rot = rotation_profile(b[b["pair"].isin(top)], by=["pair", "batter"])
t["mean_rotation_pct"] = rot.groupby("pair")["rotation_pct"].mean()

Full code: appendices/code/i_answers.py (ch12_c1).

                                balls  strike_changes  strike_change_pct  mean_rotation_pct  rank_change  rank_rotation
AB de Villiers & V Kohli         1982             923              46.57              66.54            1              1
B Sai Sudharsan & Shubman Gill   1830             778              42.51              49.83            3              7
Abhishek Sharma & TM Head         910             259              28.46              46.48           10              9
…
Spearman rank correlation of the two orderings: 0.83

The measures mostly agree; Sai Sudharsan and Gill jump from seventh to third because strike change rewards singles, while twos lift rotation % without moving the strike. Abhishek Sharma and Head are last on both: the boundary is the plan.

C.3 One batter's network (Shakib, BPL). network_table, then nx.ego_graph on partners with 100+ runs (ch12_c3).

                 partners  partnership_runs     top_partner  top_partner_share
Shakib Al Hasan        66              4616  Iftikhar Ahmed                7.5

Harmanpreet Kaur's women's T20I network in the chapter has 38 partners, top partner (Jemimah Rodrigues) 24.0% of her partnership runs; Shakib's BPL network is far flatter. Harmanpreet depends more on one partner, though both are far less concentrated than Mandhana (44.1% with Shafali).

Part D — Judgment

D.6 Producer's notes for a "chemistry" graphic. "This compares how fast the pair scores together with how fast each scores with everyone else, adjusted for year and phase. In the IPL only about a quarter of an observed excess is signal (reliability 0.27), so a pair showing +20 is more likely +5, and most pairs on screen have too few balls together to mean anything. Call it 'together v apart', never 'proof of chemistry'." The better graphic for the airtime is the stand itself: runs, balls, run rate against par for those overs, and each batter's share of the strike. Every number is real, it updates every ball, and "he's faced only 40% of the strike" needs no reliability footnote.

Part M — Mixed

M.2 Reliability R = n ÷ (n + k), so k = n(1 − R) ÷ R = 455 × 0.73 ÷ 0.27 ≈ 1,230 balls. Reliability reaches 0.5 when n = k, so a pair needs about 1,230 balls together — more than all but a handful of IPL pairs have (de Villiers and Kohli faced 1,989).


Chapter 13 — IPL Batting Valuation

Exercises: Chapter 13 exercises · Chapter: Batting in the IPL

Part B, A2, A4, A10 and outlines for D3 and D4 are answered in the chapter.

Part A — Conceptual

A1. If a team does not pick a player, someone else bats. Above zero overstates everyone, above average understates them; the right baseline is the batter available for almost nothing.

A3. Net runs = runs off the bat minus each dismissal priced at the over it fell. Average treats every dismissal as equal and ignores balls; strike rate ignores dismissals; net runs per ball puts tempo and risk in one currency.

A5. Observed variance of league-relative rates = talent variance + noise variance; the noise part is known (one ball's variance ÷ balls), so subtracting it leaves talent (Chapter 6's method of moments). Replacement is the 20th percentile of talent, because a percentile of raw small-sample rates tracks the noise tail and the ball filter (−0.32 to +0.01 at the 2023–26 death).

A6. When every match yields more runs, margins widen and one run moves win probability less: about 131 runs per win (2008–22) became about 150 (2023–26), so 150 RAR is 1.15 wins then and 1.00 now.

A7. One batter rarely produces a whole win (Gill's 277.36 RAR in 2023 was 1.98 WAR), so ₹35.7 crore per win exceeds any single price. It is still a fair yardstick: it is what the market actually paid, in total, for batting wins.

A8. Price test: does the trait raise price, holding past value? Value test: does it predict value the price missed, holding price? Only disagreement between them shows mispricing.

A9. Any four of: bowling, fielding or keeping; leverage; matchups and home conditions; availability and age; captaincy; auction mechanics (right-to-match, overseas slots, purse); commercial value.

Part C — Code It

C1. Shrunk death RAR per 100. Pool each batter's league-relative excess, then shrink toward the era's talent mean with the era's k. The 2022–26 window spans both eras; the answer applies the 2023–26 death constants throughout.

lv = rar.attrs["levels"].loc[(era, phase)]
d = rar[(rar["phase"] == phase) & rar["year"].between(*years)]
d = d.assign(excess=d["net"] - d["league_rpb"] * d["balls"])
g = d.groupby("batter").agg(name=("name", "last"), balls=("balls", "sum"), excess=("excess", "sum"))
g["shrunk_rel"] = (g["excess"] + lv["k"] * lv["mean"]) / (g["balls"] + lv["k"])
g["shrunk_rar_per_100"] = 100 * (g["shrunk_rel"] - lv["offset"])

Full code: appendices/code/i_answers.py (ch13_shrunk_rate, ch13_c1).

Constants (2023-26 death): k = 106.1 balls, talent mean = +0.054, offset = -0.116
          name  balls  raw_rel  shrunk_rel  rar_per_100  shrunk_rar_per_100  rank_raw  rank_shrunk
LS Livingstone    153    0.547       0.345       68.210              46.104         1            1
       SS Iyer    219    0.431       0.308       55.121              42.418         3            2
       RR Pant    177    0.445       0.298       57.249              41.438         2            3
      RK Singh    401    0.326       0.269       45.167              38.518         7            5
    KD Karthik    311    0.321       0.253       46.146              36.888         5            6
…

Livingstone (153 balls) falls most, 22.1 per 100; Karthik (311) least, 9.3. Pant drops below Shreyas Iyer, and Rinku Singh — the largest sample in the top eight — climbs from 7th to 5th. Shrinkage rewards evidence.

C2. Value cards. value_table joins season_rar to salaries; value = WAR × 35.7 + 0.30, surplus = value − salary (ch13_c2).

VR Iyer:
 2025       Kolkata Knight Riders      23.75    102   142 … -11.34 -0.08     -2.59      -26.34
Verdict: above the market rate in 3 of 5 seasons with a known salary
JC Buttler:
 2022 Rajasthan Royals      10.00    579   863 … 254.72  1.82     65.16       55.16
Verdict: above the market rate in 3 of 5 seasons with a known salary

Venkatesh Iyer's worst season (−₹26.3 crore) came when his salary nearly tripled — on only 102 balls, as much opportunity as form. Buttler's surplus rests on one superb 2022.

Part D — Judgment

D2. An ODI version. Chapter 5's men's ODI wicket prices — about 21 runs at over 10, 19 at 25, 10 at 40 — stay high and flat through the first half, then fall steeply; the T20 curve falls from the second over. So the biggest gap is in the middle overs (11–40): an ODI middle-overs wicket costs close to 20 runs, making survival at a modest tempo valuable, while a T20 middle-overs wicket costs 6–9 runs (2023–26) and tempo dominates. Death hitting is valued similarly in both.

D5. Two rational reasons to pay for sixes beyond RAR. (1) Leverage: sixes cluster in deciding overs, which context-neutral RAR ignores. Test: regress each batter's season WPA residual (Chapter 9 WPA minus the WPA his RAR predicts) on six rate. (2) Insurance against the scoring environment: with first-innings averages at 195.7 in 2026, a franchise may value the skill that scales with totals. Test: add a six-rate × year interaction to the value test. The chapter's evidence so far cuts against the premium: +1 SD of six rate predicted −10.1 RAR holding price (p = 0.140) — not significant, but the wrong sign for a bargain.


Chapter 14 — Bowling Analytics

Exercises: Chapter 14 exercises · Chapter: Bowling Analytics: Beyond Economy Rate

All Part B answers are in the chapter's <details> blocks.

Part A — Conceptual

A1. Wides and no-balls are the bowler's failure to deliver a legal ball; byes and leg-byes reflect the keeper and the batter, not his control.

A2. Dot % mostly records phase mix: the league delivers 48.17% dots in the powerplay, 33.25% in the middle and 30.77% at the death. Compare against the phase par.

A3. (1) 30% is the median, not the elite — 57.4% of 68 regular IPL death bowlers clear it. (2) Death economy correlates 0.94 with boundary % but only −0.51 with dot %.

A4. Outcome-only xW uses match context, so it measures opportunity; tracking-based xW adds the delivery itself, so with real data it would measure delivery quality.

A5. A batter's rate from all his balls includes the ball being predicted — the outcome leaks into the feature. Other seasons' (shrunk) rates could have been known beforehand.

A6. Season totals need probabilities right on average — calibration. AUC measures ranking of individual balls, which is modest because wickets are rare and mostly unpredictable.

A7. The luck band scales with 1/√balls: about ±1.9 wickets per 100 at 500 balls, ±0.6 at 4,700. A 250–350-ball season's band is wider still — don't judge wicket-taking on one season.

A8. Opportunity = xW minus par wicket rate, valued at each over's wicket price; execution = W − xW, valued the same way. Powerplay and middle-overs bowlers facing set top-order batters usually have negative opportunity — Narine's is −44.16 runs.

A9. BRS uses first-innings wicket prices, near zero in over 20 (0.00 in the men's T20I table). Dismissing a set batter first ball when 16 are needed off 6 transforms the result; win probability (Chapter 20) is the right currency.

🧪 Simulated data: A10 concerns the simulated tracking layer (real outcomes, simulated locations).

A10. Simulated lengths and lines were drawn conditional on the real outcome, so the AUC gain is the outcome leaking back; physics columns not drawn from the outcome added nothing (0.616 against 0.617).

A11. The group estimate rests on 38,859 balls (z = 5.7); one season is a few hundred balls, and W − xW repeats at r = 0.06. Real on average, invisible in a single season.

A12. Legitimate: release speed, pitching point, predicted stump impact. Leaky: a human-coded "edged" flag, or tracking kept only for reviewed balls. Test: knowable when the ball left the hand?

Part C — Code It

C1. Dots per boundary at the death. Full code: appendices/code/i_answers.py (ch14_c1).

d = bw.bowling_profile(ipl[ipl["phase"] == "death"], min_balls=300)
d["dots_per_boundary"] = d["dots"] / d["boundaries"]
d["rank_ratio"] = d["dots_per_boundary"].rank(ascending=False).astype(int)
d["rank_economy"] = d["economy"].rank().astype(int)
Bowlers with >= 300 legal death balls: 68
corr(dots per boundary, economy) = -0.91; corr(dot %, economy) = -0.51
Spearman correlation of the two rankings: 0.92
               balls  economy  dot_pct  boundary_pct  dots_per_boundary  rank_ratio  rank_economy
SP Narine       1105     7.25    39.46         12.76               3.09           1             1
M Pathirana      402     9.16    36.07         17.41               2.07           8            22
S Kaul           417     8.72    28.54         17.75               1.61          31            10
…

The ratio tracks economy far better than dot % because boundary rate sits in its denominator. Disagreements are bowlers whose other scoring balls are unusually cheap (Kaul: few dots but mostly ones and twos) or dear (Pathirana).

C5. ODI phase profiles and the 30% test. Afghanistan's men's ODIs are not in the data, so two Bangladeshi bowlers stand in (ch14_c5).

ODI death overs (41-50): league dot % 37.98, economy 7.45
Bowlers with >= 300 legal death balls: 56; share with dot % >= 30: 98.2%
corr(death dot %, economy) = -0.71; corr(death boundary %, economy) = 0.95

In ODIs the 30% benchmark is meaningless, and the T20 lesson holds more strongly. Mehedi Hasan Miraz's 35.16% death dots are below the ODI median, yet his death economy (6.23) beats the league's 7.45 because few of his balls reach the rope.

Part D — Judgment

D3. Paying for wickets. Choose Bowler Y. Over about 50 overs each, X conceded about 20 runs above par and Y saved about 40 — a 60-run gap. Economy repeats (IPL year-to-year r = 0.546); wickets per 24 barely do (0.162), wickets above expected not at all (0.063). X's 1.92 wickets per 24 against a league 1.13 regresses to about 1.13 + 0.162 × 0.79 ≈ 1.26 — about 1.6 extra wickets in a season, perhaps 10 runs. Y's economy edge forecasts about 0.66 runs an over, about 33 runs. The number most likely to change my mind is X's xW per 100 balls: opportunity repeats strongly (r = 0.66), so a high xW means his wickets came from a role he will keep (cheap death and tail wickets); an ordinary xW means his 24 were mostly luck.


Chapter 15 — Pitch Maps and Ball Tracking

Exercises: Chapter 15 exercises · Chapter: Bowling Variations, Pitch Maps, and Ball-Tracking Analytics

All Part B answers are in the chapter's <details> blocks. Answers that mention the simulated layer are about the method; no sim_ value is a fact about any real bowler.

Part A — Conceptual

A1. Any five of: release speed, swing in the air, pitch point (length and line), deviation off the pitch, bounce, where the ball passes the stumps (beehive), LBW impact and predicted path.

A2. Bowled and LBW need a ball attacking the stumps, so their share traces where dangerous balls landed — blurred because it covers only wicket balls and because attacking batters' mistakes become catches whatever the length.

A3. Not out if it pitched outside leg; if it struck the pad outside off while a genuine shot was played (outside leg always); or if the projected path would miss the stumps.

A4. The path after the pad is predicted, with error growing over distance, so a margin stops a tiny modelling error overturning the umpire.

🧪 Simulated data: A5–A11 concern the simulated tracking layer (real outcomes, simulated locations).

A5. Conditioning length on the outcome designs in a "yorkers work" answer; drawing the slower ball without the outcome designs in "slower balls do nothing". Both are the generator talking.

A6. Recovery test: rebuild what the generator's rules produce and see if the pattern is just the design. Placebo test: shuffle the outcome and see if skill survives. (a) Recovery; (b) placebo.

A7. One random stream in delivery order means values depend on every earlier row: simulating IPL 2026 alone changed the length band of 68.0% of its deliveries. Fix both the seed and the input set.

A8. k-means assumes round, equal clusters and hard assignment (choose k by silhouette or elbow); a Gaussian mixture allows elongated, overlapping clouds with probabilities (choose by BIC).

A9. (a) On the simulated layer clustering finds the simulator's design. (b) On a real feed it finds the repertoire plus tracking and selection artefacts — still check stability and usefulness.

A10. The simulated line ignores arm and batter hand (the left-arm spinner's angle is missing), and stump height ignores flight, dip, bounce and turn.

A11. The type lookup: "Jasprit Bumrah" is not a Cricsheet key, so the type fell back to a name-hash guess, which came up spin. Check the exact Cricsheet name and sim_bowler_type_known first.

Part C — Code It (real data)

C1. Stumps share with an interval. Fit a Beta prior on the 25 death specialists' bowled-plus-LBW counts, then shrink.

a, b = fit_beta_prior(t["stumps"], t["wickets"])
t["shrunk_pct"] = 100 * shrink_beta(t["stumps"], t["wickets"], a, b)
iv = [beta_interval(s, n, a, b, 0.9) for s, n in zip(t["stumps"], t["wickets"])]

Full code: appendices/code/i_answers.py (ch15_c1).

Beta prior from the 25 bowlers: a = 13.10, b = 37.39 (worth 50.5 wickets), mean 25.9%
        bowler  wickets  stumps  stumps_pct  shrunk_pct  lo90  hi90
    SL Malinga      108      46        42.6        37.3  31.1  43.7
      TA Boult       57      21        36.8        31.7  24.6  39.3
     CH Morris       58      20        34.5        30.5  23.5  38.0
      R Ashwin       36      13        36.1        30.2  22.4  38.5
…
      DJ Bravo      115      19        16.5        19.4  14.6  24.6

Malinga's lead survives — shrunk 37.3%, 5.6 points clear. Ashwin, on 36 wickets, falls from second to fourth. Bravo's interval lies wholly below the prior mean: a genuinely different profile.

C3. Phase fingerprints. ch15_phase_fingerprint(balls, name) pins the bowler with cricdata.primary_id and joins bowling_summary by phase to a crosstab of wicket kinds (ch15_c3).

JJ Bumrah, IPL 2008-2026:
           balls  economy  dot_pct  wickets  bowled_pct  lbw_pct  caught_pct  stumps_pct
powerplay   1266     6.94    52.13       40       20.00    15.00       65.00       35.00
middle       942     6.58    41.08       45       24.44    15.56       60.00       40.00
death       1423     8.19    34.01      102       27.45     3.92       68.63       31.37
ML Schutt, women's T20Is:
powerplay   1278     5.65    58.61       52       30.77     9.62       57.69       40.38
…

Bumrah's highest stumps share is in the middle overs (on only 45 wickets); at the death LBWs almost vanish (3.92%) because attacking batters are rarely caught on the crease. Schutt's peak is the powerplay — a swing bowler attacking the stumps with the new ball. Every cell carries an interval of several points.

Part D — Judgment

D1. Pick IPL bowlers for Tests because they "hit the stumps"? (Against.) Stumps share is largely a fact about batter intent. Test batters defend and leave, so straight full balls hit pad or stumps (LBW 17.0% of Test bowler wickets v 6.5% in the IPL); IPL batters attack, and mistakes become catches. A high IPL stumps share is a scouting flag for a bowler who attacks the stumps under assault, but it rests on small samples (the prior is worth about 50 wickets) and says nothing about long-spell control, movement with new and old ball, or taking wickets from batters who need not take risks. Look at red-ball records (Chapter 16).

D8. Reply to the head coach. "I can give you real numbers for every bowler: economy, dot % and boundary % by phase, how wickets fall, and batter-versus-type records with honest samples. I can't give you a real pitch map — nobody outside the broadcast and official arrangements has line, length or speed. A simulated one shows the method but says nothing true about where anyone bowled. For the real thing we need the tracking feed through a commercial or board arrangement, or our own analysts hand-coding length and line from video. Start coding our matches now and by next season we'll have pitch maps that are ours and real."


Chapter 16 — Bowling in Test Cricket

Exercises: Chapter 16 exercises · Chapter: Bowling in Test Cricket

Part A — Conceptual

Worked answers to A.1–A.10 and B.1–B.10 are in the chapter's exercise file. Three reminders the answers below lean on: every within-spell statistic carries selection on the outcome, because the captain ends a spell after watching it (A.2); conditions change how often wickets fall far more than how fast runs come (A.6); and the benchmark for "travels well" is the median away/home ratio, 1.19, not 1.00 (A.7).

Part B — Calculation & Interpretation

B.11 Divide spin average by pace average in each bucket of the §16.5 table (men's Tests 2001–2026):

Conditions Spin avg Pace avg Spin ÷ pace Spin share of wickets
Subcontinent 32.06 35.05 0.91 61.2%
UAE 33.21 35.19 0.94 58.3%
Other 31.81 27.82 1.14 39.6%
West Indies 34.56 27.14 1.27 31.1%
SENA 39.60 29.74 1.33 20.6%

Most spin-friendly to most pace-friendly: Subcontinent, UAE, West Indies, SENA ("Other" between the UAE and the West Indies); the spin-share ordering is identical. The ratio measures efficiency (what a wicket costs from each type); the share measures usage, which mixes efficiency with captains' habits and the attacks selected. For picking a touring attack, trust the ratio first, then read the share as evidence of how the hosts will prepare. The UAE rows rest on 560 spin and 401 pace wickets.

Part C — Code It

C.2 — A spell card. extract_spells(over_table(balls)) labels every over with a spell; spell_table() gives one row per spell.

from crease.test_bowling import load_test_balls, over_table, extract_spells, spell_table
balls, _ = load_test_balls()
spells = spell_table(extract_spells(over_table(balls)))
s = spells[spells["bowler"] == bowler]
card = {"spells": len(s), "mean_overs": s["n_overs"].mean(), "pct_9plus": 100 * (s["n_overs"] >= 9).mean(),
        "wkts_per_spell": s["wickets"].mean(), "pct_wicketless": 100 * (s["wickets"] == 0).mean()}

Full code: appendices/code/i_answers.py (ch16_c2). Prabath Jayasuriya is NGRP Jayasuriya in Cricsheet (not ST Jayasuriya).

NGRP Jayasuriya best spells:
    2023-04-16 Galle International Stadium: 20 ov 7-45
…
                    spells  mean_overs  median_overs  pct_9plus  wkts_per_spell  pct_wicketless
R Ashwin             717.0        6.35           6.0       26.1           0.742            55.1
NM Lyon             1011.0        5.92           5.0       22.1           0.571            63.2
K Rabada             494.0        4.70           5.0        2.4           0.709            51.8
Mehedi Hasan Miraz   413.0        5.58           4.0       21.8           0.535            67.1
NGRP Jayasuriya      171.0        7.54           6.0       34.5           0.737            62.6

Rabada is the pace template: short spells, fewest wicketless. Jayasuriya bowls the longest spells and all three of his best came at Galle — a spell card describes a bowler and his home pitches. Lyon's 63.2% wicketless spells fit his holding role.

C.7 — Shrunk strike rate. Choosing k by maximising split-half correlation is a trap (ch16_c7):

120 bowlers; all-bowler strike rate 60.98; raw split-half r 0.414
split-half r by k: {0: 0.414, 500: 0.441, 1000: 0.454, 2000: 0.472, 4000: 0.495, 8000: 0.521, 16000: 0.546, 32000: 0.564, 100000: 0.581}
method-of-moments k (Chapter 6 beta prior) = 2,728 balls; split-half r at that k = 0.482

The correlation never peaks: with a huge k the shrunk rate becomes a count of wickets above the league rate, and volume is very repeatable. Use Chapter 6's method of moments, k ≈ 2,728 balls; it lifts reliability from 0.414 to 0.482 while keeping Rabada (shrunk 42.04), Steyn and Bumrah on top.

Part D — Judgment & Format Transfer

D.2 — "Home average 22, pick him for India." "Twenty-two at home is excellent but the wrong number for this decision. The typical bowler concedes about 19% more per wicket away (median ratio 1.19), and pace averages 35.05 in the subcontinent against 29.74 in SENA, the cost coming through strike rate, not economy. The two overlap, so they can't simply be multiplied, but they bracket him at roughly 26 to 31 in India — ordinary for the role. Before deciding I want his home figures by ball age (is he a new-ball bowler only?), his economy (the repeatable part, split-half 0.814), and any Asian Tests, shrunk heavily: three or four Tests are perhaps 600–800 balls, about a quarter of the 2,728-ball prior weight, so they should move the estimate by about a fifth, not decide it."


Chapter 17 — Fielding Analytics

Exercises: Chapter 17 exercises · Chapter: Fielding Analytics

The exercise file already carries answers to all of Part B and outline answers to most of Parts A, C and D. This section fills the remaining Part A items, runs two code exercises, and completes D5 and M1.

Part A — Conceptual

A3. Catches per match = chances × share held, so it mixes opportunity with conversion. Opportunity depends on where he fields, which bowlers he fields to, how much his side bowls and his role — none of it about his hands.

A6. Early in a T20 innings a wicket removes a batter with most of the innings left; in over 18 the incoming batter has almost as many balls to use, so the dismissal barely changes the total.

A8. Real: every IPL outfield catch 2008–2026 (7,685), with real fielder and over. Simulated: each fielder's "true skill", chance difficulty and every dropped catch (Cricsheet records none). Per-player figures would be fiction attached to a real name, so they are anonymised.

Part C — Code It

C1 — The PSL fielder table. The pipeline of code/02_catchers.py, pointed at "psl", outfield threshold 30 non-keeping matches:

from crease import fielding as fd
ev = fd.fielding_events("psl", load_deliveries("psl"))
xis = fd.load_xis("psl")
keep = fd.infer_keepers(ev, xis)
print("keeper rule check:", fd.keeper_inference_check(ev, xis))
tab = fd.fielder_table(ev, xis, keep)
info = signal_share(tab, 30)          # observed vs Poisson-noise variance, as in 02_catchers.py
m = info["m_matches_half_signal"]
of["shrunk_ct_pm"] = (of["field_catches"] + info["league_rate"] * m) / (of["nk_matches"] + m)

Full code: appendices/code/i_answers.py (ch17_c1).

keeper rule check: {'tested': 86, 'named': 73, 'correct_pct_of_named': 91.8, 'correct_pct_of_all': 77.9}
outfield catches signal check: {'fielders': 71, 'league_rate': 0.3445, 'obs_sd': 0.148, 'noise_sd': 0.0834, 'signal_share_pct': 68.2, 'm_matches_half_signal': 23.0}
                         name  nk_matches  field_catches  field_ct_pm  shrunk_ct_pm
a757b0d8           KA Pollard          52             42        0.808         0.666
c16d4035          SW Billings          39             29        0.744         0.596
8a75e999           Babar Azam         110             58        0.527         0.496
3086f7a4   Mohammad Nawaz (3)          98             48        0.490         0.462
…

Only 86 PSL team-matches contain a stumping; the keeper rule is right 91.8% of the time it names anyone, 77.9% overall. The signal share (68.2%) is below the IPL's 76.8%, and m is 23.0 matches. "Mohammad Nawaz (3)" is the registry distinguishing one of several men with that name — why the table groups by id.

C5 — Do run-outs come from the same few people? Men's full-member T20Is, never-kept fielders with 40+ matches (ch17_c5).

catches per match : {'fielders': 184, 'league_rate': 0.3606, 'obs_sd': 0.137, 'noise_sd': 0.0773, 'signal_share_pct': 68.2, 'm_matches_half_signal': 28.2}
run-out involvements: {'fielders': 184, 'league_rate': 0.0388, 'obs_sd': 0.0347, 'noise_sd': 0.0254, 'signal_share_pct': 46.5, 'm_matches_half_signal': 69.6}
run-out credit      : {'fielders': 184, 'league_rate': 0.0255, 'obs_sd': 0.0239, 'noise_sd': 0.0206, 'signal_share_pct': 25.9, 'm_matches_half_signal': 172.8}

A fielder is involved in a run-out about once every 26 matches, so Poisson noise dominates: under half the spread in involvements is signal, about a quarter with shared credit. Half-signal takes roughly 70 matches (involvements) or 173 (credit) — more T20Is than most players play. Run-out "specialists" are mostly a story told afterwards.

Part D — Judgment & Format Transfer

D5 — When may "catch efficiency" go on screen? A guideline for the graphics team: "Catch efficiency needs a chance count, which only hand-charted or tracking data provide, never the scorecard. Even then, a player's figure is only about half signal after 60–80 chances — several seasons for an outfielder. So never show a per-player rating from one tournament. Show it only with at least 60 charted chances, always with the count beside it ('held 52 of 61') and a note that difficulty is graded by the charter. During a tournament, show the event, not the rating: the catch, the over, and what the wicket was worth — real, interesting, and not pretending to measure skill."

Part M — Mixed / Interleaved

M1. Spearman–Brown: r(k·n) = k·r / (1 + (k − 1)·r), with r = 0.35 from about 14 matches. Set it to 0.6: 0.39 + 0.21k = 0.35k, so k ≈ 2.8, about 39 matches — close to three IPL seasons. Catches per match is a little less repeatable than season strike rate (0.48) and far more than bowling average (0.07), but much of what repeats is fielding position, not catching skill.


Chapter 18 — Spin vs. Pace

Exercises: Chapter 18 exercises · Chapter: Spin vs. Pace

Answer sketches for A3, A5, A7, A9, A10 and all of Part B are in the exercise file.

Part A — Conceptual

A1. Each bowler's type and kind (Cricsheet records who bowled, not how) and each batter's hand (which decides whether the ball turns into or away from the bat).

A2. "SR Taylor" is Steven Taylor (USA, male) and Stafanie Taylor (West Indies, female). Both bowl off-breaks, but they bat with different hands, so a name-only join would mislabel all 2,254 balls Stafanie Taylor faced in women's T20Is. Key on (name, gender).

A4.

Kind Right-handed batter Left-handed batter
Off-spin into away
Leg-spin away into
Left-arm orthodox away into
Left-arm wrist spin into away

A6. Supports (men): in all eleven men's T20 competitions since 2023 spin was cheaper than pace (0.62 to 1.74 an over) and in all eleven took wickets more slowly (CPL and MLC only just) — a brake. Contradicts (women): in all three women's competitions spin takes wickets faster (full-member T20Is 20.52 balls per wicket v 22.31) and bowls about half the balls. In women's T20 spin is the attack.

A8. Excess gap = the bowler's (SR to left-handers − SR to right-handers) minus his kind's. An off-spinner at +10 has lost much of his away-turn advantage against left-handers; a left-arm orthodox at +10 makes an already bad matchup worse. Shrink first — one bowler's gap carries a standard error of roughly 3–9 points.

Part C — Code It

C3 — A SENA spinner, fairly. Weight each innings' SENA spin average by the bowler's balls in that innings and compare with his raw average.

from crease import bowling_types as bt
b = bt.load_typed("tests_male", since="2015-01-01", with_venue=True)
sena = b[(b["conditions"] == "SENA") & (b["bowler_type"] == "spin")]
base = bt.type_card(sena, by="innings")["average"].droplevel("bowler_type")
card = bt.type_card(sena, by=["bowler", "innings"]).droplevel("bowler_type")
# expected = sum(balls_i / balls * base_i);  ratio = raw_avg / expected

Full code: appendices/code/i_answers.py (ch18_c3).

SENA spin average by innings: {1: 53.36, 2: 41.06, 3: 39.58, 4: 28.47}
    bowler  balls  raw_avg  expected_avg  ratio
   NM Lyon  19107    30.72         40.33  0.762
KA Maharaj   8102    31.75         40.92  0.776
  R Ashwin   3950    32.77         41.70  0.786
 RA Jadeja   3742    40.67         40.51  1.004
Yasir Shah   3924    55.09         44.72  1.232
…

Lyon, Maharaj and Ashwin concede about a quarter less per wicket than par for their innings mix; Ashwin's heavier first-innings load (expected 41.70) puts him nearly level with Lyon. Jadeja is exactly par. With nine bowlers, treat ratios between 0.9 and 1.1 as indistinguishable.

C8 — A turn-aware card. bt.turn_direction(bowl_kind, batter_hand) labels each ball; type_card(..., kind_col="turn_kind") does the rest (ch18_c8).

--- RA Jadeja, tests_male since 2015 ---
away       11599  4746      193     2.46    78.79        60.10
into        5160  2619      101     3.05    72.23        51.09
--- R Ashwin, tests_male since 2015 ---
away        9215  3885      197     2.53    78.21        46.78
into        10683  5423      211     3.05    72.41        50.63
…

(Columns: balls, runs, wickets, economy, dot %, strike rate.) Both are cheaper when the ball turns away, in Tests and the IPL — Jadeja by about 19% of his into-economy in Tests, Ashwin by 17%. Wickets don't follow: Jadeja takes Test wickets faster into the bat, matching the chapter's finding that away-turn slows scoring without raising dismissal rates.

Part D — Judgment & Format Transfer

D2 — "So it matters most in T20." Not fair: the raw gaps are in different currencies. As a share of the into-turning strike rate, the gap is 13.2% in men's Tests, 6.8% in men's T20, 5.8% in men's ODIs and 7.3% in women's T20 — proportionally largest in Tests. But a Test batter can leave and defend, so slower scoring costs little, whereas 9 strike-rate points over a T20 spell is real runs. Defensible: "Turn direction slows scoring in every format, proportionally most in Tests; it costs the batting side most in T20. It changes dismissal rates in no white-ball format (21.5 balls per dismissal either way in men's T20)."


Chapter 19 — Expected Runs and the State of the Game

Exercises: Chapter 19 exercises · Chapter: Expected Runs and the State of the Game

All Part B items have worked answers in the exercise file.

Part A — Conceptual

A1. Runs still to come in a first innings depend on resources (balls left, wickets in hand), so the score is added to Expected Runs rather than splitting every cell. A chase bats to a target, so runs needed belongs in the state.

A2. More balls, or more wickets, never means fewer expected runs. Raw data breaks this through thin, noisy cells and selection.

A3. Dot value = ER(u − 1, w) − ER(u, w); wicket price = ER(u − 1, w) − ER(u − 1, w − 1), measured after the ball is used so the lost ball isn't charged twice.

A4. Any three of: how set the batters are, who is still to come, which bowlers have overs left, what the pitch has shown, the batters' tempo on this ground.

A5. Fixed probabilities vary totals only through ball-to-ball luck; real innings also differ in scoring environment — overdispersion. A per-innings tilt (sd 0.08) widened the simulated spread from 31.1 to 39.1 against a real 38.3.

A6. Resources = ER ÷ par. Levels move with eras (IPL par 163.4 → 190.3) but proportions barely do (11.0 runs per state, only 1.2 points of resources), so a rain rule uses proportions.

A7. The table assumes a side maximising its total. A side cruising to 140 with four overs left "loses" unused resources, and sensible batting looks like under-scoring. Chases need win probability.

A8. The shape needs many innings; the level needs few. The IPL 2023–26 table rests on 281 innings against the pool's 8,917; borrow the shape only if the thin era's own resource percentages agree within noise.

A9. Runs to come must run to the natural end; an innings cut short by rain records too few runs and drags the table down.

A10. Tests have no ball budget — time left in the match and a possible draw drive tempo — and lead, innings number and pitch wear matter more than overs bowled.

Part C — Code It

C5 — The per-ball spread of xRA. Value IPL 2023–26 first innings on the rescaled table, as code/07_xra.py does, then take the SD of (ball value − extras) over balls faced:

from crease import states as st
B, _ = st.load_innings(st.MEN_T20)
S = st.innings_states(B); S["era"] = st.era_of(S["year"])
pool = st.ERTable(120, backstop="markov").fit(S)
ipl = S[(S["competition"] == "ipl") & (S["era"] == "2023+")]
V = st.ball_values(ipl, st.fit_tables(ipl, "era", shape_from=pool)["2023+"])
faced = V[V["wides"] == 0]
sd = (faced["ball_value"] - faced["runs_extras"]).std()

Full code: appendices/code/i_answers.py (ch19_c5).

balls faced 33,937; per-ball SD of (ball_value - extras) = 2.836 runs
  Klaasen: 809 balls -> SE per 100 balls = 10.0
  Rohit Sharma: 324 balls -> SE per 100 balls = 15.8
split-half (odd v even matches), 42 batters with 300+ balls: r = 0.022

The SD is 2.84 runs, far above B7's assumed 1.6: ball values are heavy-tailed (a wicket ball can cost 10 runs or more). Klaasen's +34.6 per 100 is still about 3.5 SEs above zero; Rohit's −31.2 is only about 2 SEs below. Odd-match xRA barely predicts even-match xRA (r = 0.022): over three seasons xRA describes what happened but barely measures skill — shrink before using it.

C6 — When to take the risk. Gain = 0.06 × (value(four) − value(dot)); cost = p × (value(dot) − value(wicket)); solve for p (ch19_c6).

Break-even extra wicket probability per ball (%), men's T20 pool table, first ball of the over
 over  0 down  3 down  6 down
    1    1.78    1.17    2.97
   10    5.28    2.49    1.64
   16   18.98    7.31    3.42
   18   27.45   16.95    6.77
…

With wickets in hand the acceptable extra risk climbs steeply — about 5% at over 10, 27% at over 18 with none down. Aggression is costliest early with wickets already gone (1.2–1.6% at three or six down in the first ten overs), where a wicket exposes the tail to many balls. States almost no innings reach (six down in over 1) are extrapolation, not observation.

Part D — Judgment & Format Transfer

D3 — Does xRA punish openers? Mostly no. A powerplay wicket really costs about 13.9 runs in IPL 2023–26 (about 4.0 at the death), but xRA is centred on the state: an average opener's ball values average about zero, so it punishes openers who get out more often than average in those states, not openers as a class. Wendell has three points: early stakes are larger, so openers' xRA is noisier (C5's r of 0.022); the wicket price averages over next batters, overcharging an opener in a deep order; and a finisher's late dismissal can cost little in runs but a great deal in win probability, which a first-innings run currency cannot see.


Chapter 20 — Win Probability Models

Exercises: Chapter 20 exercises · Chapter: Win Probability Models

Part B has worked answers in the exercise file.

Part A — Conceptual

A1. Broadcast (show the turns), valuation (WPA), pricing (fair odds). Pricing needs calibration most — a biased 30% loses on every bet; valuation mostly needs the changes right.

A2. A 0.2% forecast says "once in 500", so one occurrence is expected. Test many forecasts: Case Study 2 found chasers rated ≤5% by WP v1 won 4.0%.

A3. Information unavailable at forecast time. Via the split (balls from one match in train and test: Brier 0.0185 random-ball v 0.1933 by match) or via features (a season environment including the match itself, or Elo updated with its result).

A4. The whole season includes the match and later ones — leakage. A trailing window also tracks a drifting scoring level.

A5. A proper rule gives the best expected score to honest beliefs; it punishes hedging toward 50% and overclaiming alike.

A6. Calibration: "70%" happens 7 times in 10. Resolution: forecasts separate outcomes. Saying "30% rain" every day where it rains 30% of days is calibrated and useless.

A7. More runs needed never raises WP; more balls or wickets never lowers it (nor a stronger batting side). Wrong: forcing WP to fall as the target rises with runs needed fixed — a big target signals an easy pitch.

A8. Runs needed says how far to go; the target says what kind of match it is — 40 off 30 chasing 220 differs from 40 off 30 chasing 130.

A9. WPA sums ball-by-ball changes, so a level shift cancels except at the endpoints; models agree on which balls mattered (rank correlation 0.978).

A10. Tests have a draw, and time in the match (days, weather, declarations, follow-on) is the clock, not balls in the innings.

Part C — Code It

C1 — Calibration by stage. Fit WP v1 before 2023, test on 2023–26, split by over:

from crease import winprob as wp
data = wp.build_states(wp.MEN_T20)
train, test = wp.split_by_time(data.s2, "2023-01-01")
v1 = wp.fit_wp(train)
p, y = wp.predict_wp(v1, test), test["bat_won"].to_numpy()
over = test["legal_before"].to_numpy() // 6 + 1
t = wp.calibration_table(p[over >= 16], y[over >= 16], bins=10)

Full code: appendices/code/i_answers.py (ch20_c1).

all stages: Brier 0.1143, observed - forecast +0.017
overs 1-6: states 137,960, Brier 0.1498, observed - forecast +0.018
overs 7-15: states 191,119, Brier 0.1057, observed - forecast +0.017
overs 16-20: states 72,833, Brier 0.0696, observed - forecast +0.017
             bin  predicted  observed      n    gap
5     (0.5, 0.6]      0.551     0.640   2186  0.089
…

Brier falls by stage only because late states are easier. The miss has the same sign everywhere — 2023–26 chasers did about 1.7 points better than forecast — and is worst in the death overs' mid-range (bins 0.1–0.8 under-forecast by 3.5–8.9 points): the end-game weakness the chapter flagged.

C8 — Season WPA with an interval. Resample each batter's IPL 2026 matches 4,000 times and re-sum (ch20_c8).

         batter  matches  wpa  lo_90  hi_90
  V Suryavanshi       16 2.34   1.04   3.78
 P Simran Singh       13 1.08   0.00   2.21
      DA Miller       10 0.97  -0.43   2.53
…
V Suryavanshi minus P Simran Singh: +1.26, 90% interval -0.70 to +3.35; share of resamples with the gap > 0: 0.852

Totals match the chapter. Suryavanshi stays ahead in 85% of resamples, but his lead is inside the noise. A season's WPA is a handful of high-leverage innings, uncertain by about a win either way: a fair description of who moved matches, a poor proof of who is best. An MVP award should carry the interval.

Part D — Judgment & Format Transfer

D4 — "Pooran cost us a win. Drop him." "On this model Nicholas Pooran's 2026 — 196 runs at 122.50 in 13 matches — took about one win (−1.00) off the side, lowest of 60 batters with 100+ balls; in a season scoring around 189 an innings that strike rate is well below the going rate. But WPA records a season, not a player: a regular's total is uncertain by about a win either way (Miller's +0.97 has an interval of −0.43 to +2.53), and it depends on when he batted. Before dropping him I want his multi-season projection (Chapter 25), his rates in the role we'd use him, and who replaces him — the alternative's expected WPA is the comparison, not zero."

D6 — The men's model on a women's World Cup. "More data helps only if it is about the same game. Even with the women's scoring environment and ratings, the men's model rated women's chasers about 9.4 points too high (a '50%' behaves like about 27%); a women's model was clearly better (Brier 0.0916 v 0.1111)." Use a women's WP v1, calibrated on recent seasons, captioned: "a 30% chance happens about 3 times in 10."


Chapter 21 — Team Composition and Balance

Exercises: Chapter 21 exercises · Chapter: Team Composition and Balance

All Part B items have answers in the chapter's <details> blocks.

Part A — Conceptual

A1. Roles come from the player's record in the same competition before the match: a bowling option bowled ≥10% of his team's legal balls, a top-order batter entered at 1–7 in at least half his innings, an all-rounder is both, a part-timer is a top-order batter with a 2–10% bowling share. Roles read from the current match would absorb its result (captains being hit reach for more bowlers).

A2. "Bowlers used" is decided during the match, so it depends on what happens (losing Test sides used 5.31 v 5.12 per innings); "bowling options picked" is fixed at the toss from prior records, so the result cannot shape it.

A3. Replacement level is the player a franchise could sign for next to nothing (outside the top 70 batters or top 50 bowlers by volume). Selection asks what you gain over the alternative you could actually field; an average player is not freely available.

A4. A run-out is a wicket no bowler is credited with, so the fielder's credit counts nothing twice; a catch is shared with the bowler, and fair credit needs the chances not taken, which Cricsheet does not record.

A5. In IPL 2024–26 a #8 faced 4.1 balls an innings against about 15 for #1–#7, so he bats about 0.273 of a slot. A weight of 1 would make the optimiser over-pick batting depth and push out the fifth bowler.

A6. Premium = optimum(squad) − optimum(squad with the player split into batting-only and bowling-only halves). Splitting only removes options, so the premium is never negative; if his bowling never makes the optimal eleven, it is zero.

A7. It is the fall in the optimum when the eleven must carry spare bowling capacity. The deterministic model's five best bowlers always bowl twenty overs, so any value of a sixth must come from what the model omits: bad days, match-ups, injuries, conditions.

A8. Marginal value = optimum with him − optimum re-solved without him. It is usually smaller than his contribution because the replacement recovers part of it (Kohli 12.81 v 11.47), but can be larger when losing him forces a costly reshuffle (Bhuvneshwar 7.36 v 7.53).

A9. The Impact Player rule lets a side bat eleven and field eleven from twelve, so a bowler no longer costs a batting place: top-order batters' share of IPL overs fell from 26.4% (2018–22) to 18.5% (2023–26), the all-rounder premium halved (0.70 → 0.35) and the price of a sixth option fell from 1.29 to 0.41.

A10. The persistence table uses only spells the captain let continue — after a bad start only 33.2% finished their allocation — so the flat line is survivorship: bad days do not persist for the bowlers who were kept on.

Part C — Code It

C1. Role table for the Big Bash League.

from crease import selection as sel
from crease.fielding import load_xis
balls, games, xis = load_deliveries("bbl"), load_matches("bbl"), load_xis("bbl")
comp = sel.composition(sel.add_prior_roles(sel.player_matches(balls, xis)))
comp["season"] = comp["match_id"].map(games.set_index("match_id")["season"])
t = comp[comp["n_unknown"] <= 1].groupby("season").agg(sheets=("team", "size"), bowl_options=("n_bowl_options", "mean"),
                                top_order=("n_top_order", "mean"), allrounders=("n_allrounders", "mean"))

Full code: appendices/code/i_answers.py (ch21_c1).

team sheets 1,324; dropped (>1 unknown) 336; sheets with >11 names 48
         sheets  bowl_options  top_order  allrounders
2011/12       9          5.33       7.00         2.00
…
2020/21      99          5.19       7.09         1.33
…
2025/26      76          4.58       7.30         1.28

Early seasons are thin (a role needs three prior BBL matches). In 2025/26 BBL sheets carried 4.58 bowling options and 1.28 all-rounders against the IPL's 2026 figures of 5.24 and 0.81 — more two-skill players, fewer specialist options.

C7. The women's ODI seven-option bump.

seven = comp[comp["n_bowl_options"] >= 7]          # full members, 2010+, <=1 unknown, decided
for label, d in (("all teams", seven), ("excluding Australia", seven[seven["team"] != "Australia"]),
                 ("Australia only", seven[seven["team"] == "Australia"])):
    lo, hi = sel.wilson(d["won"].sum(), len(d))
fit = smf.ols("won ~ n_bowl_options + C(ty)", data=comp).fit(cov_type="HC1")

Full code: appendices/code/i_answers.py (ch21_c7).

7+ options, all teams            n= 127  win%  67.3  90% Wilson  60.2- 73.7
7+ options, excluding Australia  n=  70  win%  47.9  90% Wilson  38.3- 57.6
7+ options, Australia only       n=  57  win%  91.2  90% Wilson  83.1- 95.7
within team-season: -1.5 pts per extra option (90% CI -6.2 to +3.3), n=798

The bump was Australia: 57 of the 127 sheets, won at 91.2%; without them seven-option XIs win an ordinary 47.9%. Team-season fixed effects absorb a dominant team's win rate into its own intercept. (This specification omits n_top_order and gives −1.5 points; the chapter's gives −2.0. Both intervals straddle zero.)

Part D — Judgment

D2. Testing the "second spinner as a match-up option" claim. Compare IPL sheets with two spin types (from player_styles.csv) against one-type sheets, facing line-ups with three or more left-handers in the top seven; measure runs conceded against phase par on balls to left-handers, with team-season fixed effects, venue and year. Count qualifying matches first: Chapter 11's k ≈ 300 balls says a season of left-hander balls is thin. The plan must save more than the 1.29-run price of a sixth option (0.41 under the Impact Player rule). If the interval is too wide, say the data cannot settle it and keep the coach's reasoning as a prior — "not detectable" is not "worthless", but nor does it justify paying 1.29 runs every match.

D5. The selection-meeting note (outline). On shrunk IPL 2024–26 values Sai Kishore's four overs beat Rashid's, and the squad's sixth-option price is only 0.36 runs, so the optimiser is nearly indifferent; table the cost from optimise_xi(pool, force_in=[...]). It assumes stable values and no match-ups, conditions or fitness, and Rashid's international record is missing from this data. Ask about tonight's batters against wrist spin and the pitch, and close: "The trade-off is about X runs; if you know something the model doesn't, X is small enough for that to decide."


Chapter 22 — Toss, Venue, and Conditions

Exercises: Chapter 22 exercises · Chapter: Toss, Venue, and Conditions

Every Part B item has an answer in the chapter.

Part A — Conceptual

A1. A coin decides which captain chooses, so toss winners and losers are alike on average and any excess in toss winners' results is caused by the toss. Only who chooses is randomised; the bat-or-field choice is not.

A2. Toss value asks who wins, so only decided matches can answer it. Counting draws as "not won" would put Test toss winners at 44.0% (395 of 898) and hide a real +4.2-point effect (54.2% of 729 decided Tests).

A3. The choice is not randomised, so fielding captains differ from batting ones; and chasers won 54.7% whether they chose to chase or were sent in, so the decision carried no information. The gap is the general chase advantage plus selection.

A4. A balance check confirms the groups looked alike before "treatment": IPL toss winners' previous-season win rate was 49.7% against 49.8% for toss losers over 972 matches. A clear gap would have cast doubt on the coin.

A5. On IPL double-header days the lower match number is "afternoon", the higher "evening". Toss winners fielded 69.5% of the time in the evening game against 55.2% in the afternoon (p = 0.0013) — what you expect if captains believe evening favours chasing.

A6. First-innings totals carry many runs of information per match and venue scoring repeats modestly (odd v even years r = 0.35); a chase result is one binary outcome, and venue chase rates did not repeat (r = −0.21 over 15 venues).

A7. A ground needs about 75 full-length IPL games before its own average earns as much weight as the league's; a ground with 27 games keeps only about a quarter of its raw effect.

A8. The toolkit calls a team "home" only in its own country, so Pakistan in the UAE is neutral. For "home": they chose the venues and won 65.2% of 23 decided Tests there. Against: no home crowd or curator, and their ODI record there (43.8%) looks nothing like home.

A9. Tests give conditions hundreds of overs to act and draws remove many close games from the decided denominator; a T20 is so short and high-variance that any edge is diluted by luck.

A10. Pace and bounce that help seamers, the time Test bowlers have to use them, and the grounds' mix of opponents and eras; thinner air mostly helps the long ball, which matters less in Tests.

Part C — Code It

C1. Toss value in league games and playoffs.

from crease import venue_toss as vt
m = load_matches("ipl").copy()
m["stage"] = m["stage"].fillna("League")
m["stage_group"] = np.where(m["stage"] == "League", "League", "Playoff")
t = vt.toss_table(m, by="stage_group")

Full code: appendices/code/i_answers.py (ch22_c1).

             matches  toss_winner_won  toss_win_pct    lo95    hi95  p_value
League        1144.0            587.0        51.311  48.415  54.198    0.391
Playoff         74.0             41.0        55.405  44.093  66.184    0.416

Seventy-four decided playoffs give an interval 22 points wide, covering both "worthless" and "worth 16 points"; the 4-point gap to league games is far inside the noise. "Big-match pressure" is unsupported.

C3. Venue effects for the WBBL and the women's Hundred.

for code, label in (("wbb", "WBBL"), ("hnd", "The Hundred (women)")):
    balls, m = load_deliveries(code), load_matches(code)
    if code == "hnd":
        m = m[m["gender"] == "female"]
        balls = balls[balls["match_id"].isin(m["match_id"])]
    tot = vt.first_innings_totals(balls, m)
    g, info = vt.venue_effects(tot, min_matches=8)

Full code: appendices/code/i_answers.py (ch22_c3).

WBBL: 474 full-length games, 16 grounds with 8+; sigma 26.5, tau 6.3, k 17.8
North Sydney Oval                        53  15.7    11.7
…
Drummoyne Oval                           27 -13.0    -7.8

The Hundred (women): 181 full-length games, 8 grounds with 8+; sigma 23.3, tau 0.0, k inf

Opposite answers. In the WBBL, k = 17.8 games (IPL 75): less per-innings noise (σ 26.5 v 30.6) and more true spread (τ 6.3 v 3.5), so grounds genuinely differ, by about 19 runs shrunk; boundary size is the first thing to check. In the women's Hundred the estimated τ² is not positive, so k is infinite and every shrunk effect is zero — a legitimate "no detectable spread", not a bug.

Part D — Judgment

D1. Would "field first" travel? The IPL advice rests on three findings: chasers win about 55%; the decision carries no information (54.7% whether chosen or sent in); venue chase rates are noise. In men's full-member T20Is the first two fail (chasers 49.4%; 50.0% v 48.6%), so the data gives a T20I captain no general advice — the useful work is venue- and conditions-specific. For a women's ODI captain, toss winners won 48.9% and captains fielded only about half the time: "the data favours neither". The evidence worth gathering is chase results by conditions and by day/night status, which Cricsheet does not record.

D4. An honest caption for "Chasing teams have won 61% here since 2023." "From 31 games at this ground. Across IPL venues a ground's chase record in one period has not predicted the next (r = −0.21), and chasers win about 55% league-wide." It keeps the fact, states the sample and gives the base rate.


Chapter 23 — The DLS Method

Exercises: Chapter 23 exercises · Chapter: The DLS Method

All Part B items are answered in the chapter. Targets below use the book's own data-derived tables and the public Standard-Edition target rules, never the official Professional Edition.

Part A — Conceptual

A1. Average run rate assumes the chaser scores at Team 1's rate whatever the overs, ignoring that ten wickets over fewer overs allow harder hitting — it favours the chaser. Most-productive-overs discards Team 1's worst overs and ignores wickets, penalising the chaser.

A2. R(u, w) is the share of a full innings' expected further runs left with u overs and w wickets down. Overs alone miss the second constraint: 20 overs at 8 down is worth far less than 20 overs at 0 down.

A3. Z₀ is the ceiling (further runs with unlimited overs, no wicket down), b how fast the overs clock uses it up, and F(w) ≤ 1 shrinks the ceiling as wickets fall — and inside the exponent makes the curve flatten sooner when wickets, not overs, bind.

A4. No innings lasts long enough to observe it; Z₀ is an asymptote that shapes the curve where data are dense — an extrapolation, not a forecast.

A5. If R2 < R1, par = S × R2/R1; if equal, par = S; if R2 > R1, par = S + G × (R2 − R1)/100; target = par rounded down, plus one. Scaling up would multiply the luck in a short Team 1 innings, so extra resources are priced at an average full-innings rate G (245 full-member men's ODIs, 200 women's internationals).

A6. 26.4 overs = 26 overs 4 balls = 160 balls, not 158.4. In T20 each ball is a bigger share of the innings, so a one-ball error can move the target by a run or more.

A7. A completed chase wins "by wickets"; a chaser wins "by runs" only when the match is decided on par — it stopped ahead of par.

A8. Matches cut before the start give real Y-over innings from ball one with ten wickets — exactly a shortened chase's state — and no rain rule was applied, so they are an independent test of R(Y overs, 0 down).

A9. As usually described, VJD uses a "normal curve" for resources used and a separate "target curve" for Team 2, answering the critique that D/L treats a side starting with Y overs like one reaching the last Y overs of a full innings unbroken.

A10. On average Stern is right: over 125 well-visited states the borrowed ODI shape is within 2.21 points of the T20 data (mean −0.60). But it errs in a structured way: T20 sides 0–1 down make about five runs more than predicted, and sides 4–5 down with 15–19 overs left about ten fewer.

A11. Until the cut, Sri Lanka paced a 50-over innings; the later the cut, the more was batted to the wrong plan, so the target rises (140 at seven overs). A wicket before the cut means the overs removed were worth less to Sri Lanka, so the target falls (105 at ten overs, 99 at fifteen).

Part C — Code It

C2. Sydney 1992 with a re-based, recent-era table.

for label, since in (("ODI D/L form, all years", None), ("ODI D/L form, 2016-26", "2016-01-01")):
    tab = rs.build_tables(("odi",), nonparametric=False, since=since)["odi_param"]
    for conv, t in (("50-over table (R1 < 100)", tab), ("re-based to 45 overs", tab.scaled_to(N))):
        R1 = float(t.R(N, 0))
        R2 = rs.innings_resource(t, N, [(left_before, left_after, wk)])
        tgt = rs.revised_target(S, R1, R2)

Full code: appendices/code/i_answers.py (ch23_c2).

ODI D/L form, all years   | 50-over table (R1 < 100) : R1  96.28  R2  88.71  R2/R1 0.9214 -> target 233 (2 off 1 ball)
ODI D/L form, 2016-26     | re-based to 45 overs     : R1 100.00  R2  92.25  R2/R1 0.9225 -> target 233 (2 off 1 ball)
   fitted Z0 321.6, b 0.0375, F(6) 0.2497

The target stays 233. Re-basing divides every resource by the same constant, so R2/R1 — all the scaling-down branch uses — cannot change. Refitting on 2016–26 raises Z₀ by about 15 runs but barely moves b, so the shape (and the ratio) hardly moves: resources are a ratio.

C6. Rain at the end of over 12 of a chase of 170.

tab = rs.build_tables(("t20",), nonparametric=True)["t20_er"]
R1 = float(tab.R(120, 0))
for score, w in ((90, 1), (100, 2), (110, 3), (120, 4)):
    R2 = rs.innings_resource(tab, 120, [(48, 18, w)])   # 48 balls left -> 18 after 5 overs lost
    t = rs.revised_target(170, R1, R2)

Full code: appendices/code/i_answers.py (ch23_c6).

at_stoppage  R_lost   R2  target  needed_after  needed_before_rain
       90/1    28.5 71.5     122            32                  81
      120/4    21.5 78.5     134            14                  51

More wickets down makes the lost overs worth less, so the target rises (122 → 134), but the extra runs more than pay (14 off 18 beats 32 off 18). If rain is certain, attack; if it doesn't come, 120/4 is the riskier position.

Part D — Judgment

D4. "Not yet" to the commissioner. (1) Statistics: our T20 table sits above the official target in 95.7% of 70 clean shortened chases (median +6) — perhaps the official method is generous to chasers, but the IPL alone is five clean matches. (2) Robustness: rare states are where the tables disagree most and our data are thinnest, yet a rule must be defensible in every state. (3) Process: a rain rule must be published in advance, run reliably by officials, be the same for both sides and explicable to spectators; ours is a Python object fitted to a snapshot with no audit trail or review. Next step: a season-long shadow trial published alongside the official targets.

D6. A broadcast par line. Yes, labelled "Data par (unofficial)": "Our estimate from past T20 innings; the official DLS target can differ by several runs, and only it decides the result." Show the official target whenever known.


Chapter 24 — Match Outcome Prediction

Exercises: Chapter 24 exercises · Chapter: Match Outcome Prediction

Part B is answered in the chapter.

Part A — Conceptual

A1. Accuracy is the share of matches your favourite won; Brier is the mean squared gap between forecast and 0/1 result; log loss is the mean of −ln(probability given to what happened). Brier and log loss are proper — honest probabilities score best — while accuracy scores 51% and 90% alike, so only the proper rules reward getting confidence right.

A2. Usable days ahead: (a) venue, (e) last season's Elo. At the toss only: (b) the announced XI, (c) the toss decision. Not allowed: (d) the batting order used, (f) wides bowled, (g) the Impact Player substitute actually used — all known only once play starts.

A3. Each forecast uses ratings updated only with earlier results and is stored before its own update, so scoring them is genuinely out of sample. Move ratings[t1] = r1 + k * (y - p1) above the line computing p1 and every forecast sees its own result.

A4. K = 5 barely moves ratings — right for stable strength but slow to learn and to react. K = 100 makes ratings a record of recent luck: over-confident forecasts that can score worse than a coin in an even league.

A5. Elo gives only P(A beats B); the Test draw rate depends on era, conditions and the gap between sides. Half a win is a sensible update but cannot forecast the draw, so the chapter's logistic draw model supplies P(draw).

A6. The points-average system forgets on a fixed calendar — at the annual May update teams can swap places with no match played — while Elo forgets continuously through results. And the ICC-style rule gives a flat ±10 for an expected result once ratings are 40+ apart, where Elo's update shrinks smoothly.

A7. Symmetrising lists each match from both sides, so the model learns nothing from which team Cricsheet lists first — an order that means home side, toss winner or batting first in different archives.

A8. It is the score of an oracle knowing each side's true strength and pricing with log5. It assumes strength fixed within a season, balanced schedules and no home advantage; each assumption pushes the computed ceiling down, so it is a lower bound.

A9. Fitness niggles, the pitch report, tactical plans, dressing-room factors. Record a pitch view before every match in a fixed format, then test it out of time against the existing model with a proper score and a paired bootstrap.

A10. An 85% favourite should lose about 15% of the time; one loss is consistent with a perfect forecast. Only many ~85% matches won materially less often than 85%, beyond binomial noise, would show miscalibration.

Part C — Code It

C2. Margin-aware Elo for men's full-member ODIs.

mult = 1.0
if margin and oc in ("team1", "team2") and pd.isna(meth):          # rain games keep m = 1
    if wr > 0:   mult = 1 + np.log(1 + wr / 20)                      # won by runs
    elif ww > 0: mult = 1 + np.log(1 + ww / 2)                       # won by wickets
ratings[t1] = r1 + k * mult * (y - p1)
ratings[t2] = r2 - k * mult * (y - p1)

Full code: appendices/code/i_answers.py (ch24_c2).

     model  K  home  train_LL  n_test  accuracy  brier  log_loss
 plain Elo 30    75    0.6021     260    0.6115 0.2267    0.6451
margin Elo 10    75    0.6042     260    0.6308 0.2249    0.6415
log loss, margin minus plain: -0.0037 (90% bootstrap -0.0121 to +0.0050)

With the margin term the tuner picks a smaller K (10), since big wins already move ratings further. The margin version is slightly better on 2023–26 but the interval includes zero and it was slightly worse in training; runs and wickets are not on a common scale either. Verdict: perhaps a little information, but 260 test matches cannot show it.

C5. ICC-style points average v Elo for women's internationals.

e = icc_points_history(elo_history(results(code, full_members_only=True), k=60, home_adv=25))
b = fit_logit_1d(tr[col], tr["y"], tr["home"])        # same link, fitted before 2023
p = predict_logit_1d(b, te[col], te["home"])

Full code: appendices/code/i_answers.py (ch24_c5).

Women's ODIs (FM): Elo minus ICC-style log loss +0.0293 (90% bootstrap +0.0036 to +0.0560); test matches with ICC-style gap >= 40: 52.8%
Women's T20Is (FM): Elo minus ICC-style log loss +0.0353 (90% bootstrap +0.0139 to +0.0579); test matches with ICC-style gap >= 40: 46.3%

A surprise: unlike the men's result in §24.5, the ICC-style rating forecasts women's internationals better than Elo in both formats, with both intervals excluding zero, though the ±10 rule is in play in about half the matches. A plausible reason: where a few teams are far stronger, the points average records dominance directly while Elo at K = 60 keeps reacting to upsets. Cautions: K was tuned for Elo's own log loss, and 199 and 285 test matches warrant re-checking. A real lead, not a settled result.

Part M — Model answer

M3. Venue run factor as a feature. Expect no out-of-time gain. A −4 to +5-run venue effect moves both innings' scoring at that ground: it changes par, not which side is better. A scoring effect could change who wins only through an interaction with team make-up (power hitters on a small ground) or home familiarity, which the model's home term already carries — and Chapter 22 found venue chase rates to be noise (split-half r −0.21). A run factor belongs in a totals model (Chapter 27's projections), not a who-wins model. A slight in-sample gain that vanishes on 2023–26 is the expected result, and the paired bootstrap will say so.


Chapter 25 — Player Performance Projection

Exercises: Chapter 25 exercises · Chapter: Player Performance Projection

Every Part B item has a worked answer in the chapter.

Part A — Conceptual

A1. True ability is the rate a player would produce over unlimited balls; observed performance is ability plus the luck of a finite sample; a projection estimates next season's observed performance, shrunk toward the population in proportion to how little evidence there is. Projecting below last season reflects luck that won't carry over, not a judgement.

A2. The slope describes the average next season of batters 40 above par; it does not say each "keeps a third of his form". Better: "On average a third of a season's gap from par is repeatable ability; the rest was luck."

A3. Dismissals are rare (one every twenty or thirty T20 balls) while every ball informs scoring rate, so dismissal rate needs far more balls: within-season k 848 for out+ against 381 for SR+.

A4. A batter dismissed often faces fewer balls, so a 200-ball total filter admits him only if he survived long in the other half — a built-in negative link (r = −0.037); selecting by innings removes it (r = 0.119). Bowling version: choosing "regular" bowlers by overs when captains remove expensive ones.

A5. Regression matters most (k = 10 gives RMSE 15.07 against 13.37 at k ≈ 371; raw last season 19.63); weights a little (36 weightings: 13.35–13.52); career-year adjustment least (16.730 → 16.723).

A6. Par uses no player information, so it is the honest know-nothing benchmark; last season's raw number losing to it (19.6 against 14.1) shows how much of one season is noise.

A7. Naive cross-section: survivor bias, curve rises (+6.0 by year 9). Delta method: regression to the mean, curve falls (−8.9). Projection residuals: the projection handles regression and leftovers are small (+3.6 over years 2–9), though selection on the target season remains.

A8. Career year is not age, and it is left-censored by differing coverage starts. The chapter reduced the second by keeping players first seen in 2010 or later (Tests: debut 2003 or later); the first it could only state.

A9. Average is runs per dismissal, mixing two skills of very different reliability with the noisy one in the denominator. Projecting SR+ (k ≈ 371) and out+ (k ≈ 125) separately shrinks each correctly; dividing gives a coherent average.

A10. The sceptical prior (RMSE 12.68 v 13.72): the prior is a shrunk multi-season estimate deserving full weight, a five-innings burst a tiny sample. Best fixed prior strength: 419 balls.

A11. "Most of 2026's spread was luck; projections differ by about 6 SR+ points because abilities do, and next season's results will spread out again by about 15."

A12. Every newcomer gets the same prior (99.8), so group errors cancel (actual 99.6) while individuals vary widely (Finn Allen 137.4, Kartik Sharma 88.8). Relevant evidence from elsewhere — other T20 records translated into IPL units (Chapter 26), or role — gives each his own prior without biasing the group.

A13. Franchise decisions are about risk, so calibrated intervals matter: e.g. buying a backup opener because the first choice's lower interval sits below replacement.

Part C — Code It

C9. Coverage of the 80% intervals, season by season.

L = pj.batting_lines(pj.load_pool("ipl"))
mod = pj.fit_projection(L, "sr_plus", range(2011, 2019))
bt = pj.backtest(L, mod, range(2019, 2027))
bt["inside"] = (bt["actual"] >= bt["lo"]) & (bt["actual"] <= bt["hi"])
t = bt.groupby("year")["inside"].agg(n="size", coverage="mean")
t["band_lo"] = st.binom.ppf(0.05, t["n"], 0.8) / t["n"]      # 90% chance band around 0.8
t["band_hi"] = st.binom.ppf(0.95, t["n"], 0.8) / t["n"]

Full code: appendices/code/i_answers.py (ch25_c9).

k 371.5, prior 99.99; overall coverage 0.803 (n 619)
       n  coverage  band_lo  band_hi  outside  wtd_mean_error
2023  80     0.762    0.725    0.875    False          -0.027
…
2025  90     0.800    0.733    0.867    False           1.881
2026  81     0.852    0.728    0.877    False          -0.363

No season falls outside its chance band (coverage 76.2%–85.2%). Even 2023, the first Impact Player season, shows no break: a league-wide jump moves par, not the index. Mean error stays within about ±2 SR+ points every year.

C4. A separate k for each band of history.

cuts = np.quantile(tr["n_eff"], [1 / 3, 2 / 3])          # buckets defined on TRAINING history only
for b in range(3):
    d = tr[np.digitize(tr["n_eff"], cuts) == b]
    obs, n, act, w = (d[c].to_numpy(float) for c in ("obs", "n_eff", "actual", "w"))
    f = lambda th: np.sum(w * (act - (n * obs + np.exp(th[0]) * base.prior) / (n + np.exp(th[0]))) ** 2)
    ks[b] = float(np.exp(optimize.minimize(f, [np.log(300.0)], method="Nelder-Mead").x[0]))

Full code: appendices/code/i_answers.py (ch25_c4).

  low history  k      287  test n 191  RMSE single 19.37  bucket 19.28
  mid history  k      408  test n 231  RMSE single 13.42  bucket 13.40
  high history k      373  test n 197  RMSE single 10.71  bucket 10.71
all test seasons: RMSE single-k 13.375  by-bucket 13.349

RMSE improves by only 0.026 — noise. A single k already pulls low-history batters harder, since reliability is n/(n + k).

Part D — Judgment

D1. Can the IPL's k ≈ 371 be used for the Blast? Not safely. k measures the spread of true abilities relative to per-ball noise, a property of the population. The pooled men's T20 data (k ≈ 137) and women's pool (k ≈ 142) have wider talent spreads than the IPL, and the Blast's counties mix internationals with emerging players, so its k is probably nearer the pooled figure; 371 would over-shrink genuinely different players. Check by fitting pj.fit_projection on early Blast seasons, testing on later ones, and comparing RMSE and 80% coverage at the fitted k and at 371.

D7. A single "projected 2027 average" graphic. Argue for SR+: the average puts low-signal out+ in the denominator. If averages must appear, give intervals. Caption: "Projected 2027 IPL average from three seasons of data, pulled toward the league average where evidence is thin. Eight in ten batters should land inside the range shown; a single season can still surprise."


Chapter 26 — The Global Game: League Translation

Exercises: Chapter 26 exercises · Chapter: Chapter 26

Part B answers are in the chapter. Factors below are men's 2021–26 with the IPL = 1 (women's: WPL = 1).

Part A — Conceptual

A1. (1) Scoring environment — removed by par-based indices such as SR+ (Chapter 8). (2) Opposition strength — removed only by the translation factors of §26.3. (3) Selection and role — handled by shrinkage (Chapter 25) and kept out of the exchange rate by fitting on concurrent seasons.

A2. A factor is the index a reference-league 100 player would post in league L; reference index = index in L ÷ factor. A weaker league inflates SR+ (factor > 1) but deflates out+ (factor < 1), since lower out+ is better.

A3. The raw ratio mixes environment and strength: SA20 par SR is 130.63 against the IPL's 144.06, so batters score slower there, yet beat that lower par more easily because the bowling is weaker (SR+ factor 1.076).

A4. Abilities change; a batter who played the Blast early and the IPL at his peak would make the IPL look easier. Player-season units compare a player only with himself in the same year (the two choices differ by about a point in 2021–26).

A5. Indian players appear in no other franchise league, so the SMAT's bridge is 56 players shared with the IPL (plus 12 with full-member T20Is): every SMAT factor rests on a thin "SMAT-to-IPL" bridge, with wide intervals (SR+ 1.115–1.173; out+ 0.697–0.843).

A6. "League this year, IPL next year" builds in selection: players arrive after lucky seasons (Blast naive 1.114 v 1.067 concurrent). Estimate the exchange rate from concurrent seasons and handle regression separately when projecting.

A7. "T20Is with associates" mixes very different exchange rates in one factor (1.337), flooding scouting lists with batters who feasted on the newest teams. Tiers: full v associate 1.208, top-8 associates 1.237, other associates 1.503.

A8. Any three (2021–26): six share of boundaries WPL 18.04% v IPL 35.43%; spin share of death balls WPL 57.9% v IPL 18.7%; full-member T20I balls per wicket 19.17 (women) v 17.20 (men); run outs 10.5% v 5.2%, stumpings 5.9% v 2.3%; the women's powerplay is the slowest phase.

A9. econ+ factors sit near 1 (0.92–0.99), so translation barely moves anyone; and economy depends on phase and role, which can change with a move, swamping a league-level adjustment.

A10. Factors belong to a league in a period: the BPL's SR+ factor was 1.078 in 2015–20 and 1.176 in 2021–26; the associate factor rose from 1.172 to 1.337 as newer members' matches filled the archive.

Part C — Code It

C1. Boundary-ball factor. Build boundary lines with the same par logic and call the model's solver.

faced = b[b["wides"] == 0].assign(bnd=lambda x: x["is_four"] | x["is_six"])
keys = ["league", "year", "phase"]
cell = faced.groupby(keys).agg(cb=("bnd", "size"), cbnd=("bnd", "sum"))
cell["rate"] = cell["cbnd"] / cell["cb"]
pc = faced.groupby(["batter_id", *keys]).agg(balls=("bnd", "size"), boundaries=("bnd", "sum")).reset_index()
pc = pc.join(cell["rate"], on=keys); pc["par_bnd"] = pc["balls"] * pc["rate"]
lines = (pc.groupby(["batter_id", "league", "year"], as_index=False)[["balls", "boundaries", "par_bnd"]].sum()
           .rename(columns={"batter_id": "player_id"}))
d = tr._units(lines, "sr_plus", 30, (2021, 2026), "year", num="boundaries", par="par_bnd")
f_bnd, _ = tr._solve(d, "ipl", 300.0)

Full code: appendices/code/i_answers.py (ch26_c1).

                        units  players  bnd_factor  sr_factor
T20I (with associates)    260      153       1.474      1.337
BPL                       171       98       1.250      1.176
…
T20 Blast                 443      181       1.170      1.110
…
CPL                       251      114       1.074      1.073
…
IPL                       376      147       1.000      1.000

The boundary factor is at least as large as the SR+ factor everywhere (nearly equal only in the CPL, ILT20 and MLC). In the Blast (1.170 v 1.110) the same batter clears the rope more often relative to par than his overall scoring rises: weaker bowling is punished most by boundaries.

C6. The Hundred v the Blast.

pair = b[b["year"].between(2021, 2026) & b["league"].isin(["hnd", "ntb"])]
print(tr.league_baselines(pair, by=["league", "phase"]))
bat = tr.league_lines(b[b["year"].between(2021, 2026)], "bat")
for metric in ("sr_plus", "out_plus"):
    print(tr.bootstrap_factors(bat, metric, "ipl", n_boot=100, years=(2021, 2026)).loc[["hnd", "ntb"]])

Full code: appendices/code/i_answers.py (ch26_c6).

hnd    death          193  159.87           9.97         20.90    31.75
ntb    death          730  154.65          10.59         19.54    29.99
…
hnd     The Hundred   1.032  1.012  1.056    366      149
ntb       T20 Blast   1.110  1.090  1.135    443      181

Environments are close (The Hundred's death phase a little faster), but its SR+ factor is well below the Blast's with no overlap: it concentrates the Blast's best plus overseas stars in eight teams, so the bowling is stronger. "Scores faster" and "easier to beat par" point in different directions.

Part D — Judgment

D2. Both are right about different things. The factor is a league average (the same batter beat par about 17.6% more in the BPL than the IPL); one innings on a turning Mirpur pitch against two international spinners is a draw from the hard end. Credit the innings against its own context — match or venue par and Chapter 11's shrunk batter-v-bowler-type matchups — while his whole BPL season still deserves about the factor's discount. Factor for seasons, context for innings.

D3. Not very confident. The WBBL out+ factor of 1.044 (batters dismissed about 4% more often relative to par than in the WPL) has a 90% interval of 0.964–1.130, which includes 1; the SR+ factor (1.014) is also near 1. Strengthening evidence: an interval excluding 1 as seasons accumulate, the same sign across windows and unit choices, consistent bowling factors. Overturning evidence: a sign flip in rolling refits, or the effect resting on a handful of players.


Chapter 27 — In-Match Forecasting

Exercises: Chapter 27 exercises · Chapter: Chapter 27

Every Part B item has its answer in the chapter. Models are fitted on men's T20 first innings before 2023 and tested on 2023–26.

Part A — Conceptual

A1. A projected total is the median of the forecast distribution of the final score; a projection interval should contain it a stated share of the time; an as-of feature uses only information available at the forecast. Not as-of: a batter's whole-season strike rate including this match.

A2. T20 innings accelerate after a slower middle, so a run-rate projection under-predicts (−10.2 runs after 10 overs); after one over it stretches six balls across 120, hence a mean absolute error of 71.8.

A3. A random split leaks same-era innings and as-of features computed from the test period into training. The out-of-time split exposes era drift — the era-blind table's IPL bias was −20.1 runs after 6 overs.

A4. 84% in the IPL is mild over-coverage (its 95% interval, about 79.7%–88.3%, just includes 80%); 65% for associate T20Is is serious under-coverage. Under-coverage is worse for a broadcaster: an over-confident statement viewers see broken repeatedly.

A5. Most of what decides the total hasn't happened: only about 18% of T20 batters last more than 30 balls, so the pair at the crease faces only part of what remains, and the rest is ball-by-ball noise the state cannot see.

A6. Kaplan–Meier treats not-out batters as censored rather than failures; a naive ">30 balls" count understates survival (13.9% v KM's 17.6% for 2023–26).

A7. Dismissal risk falls once a batter is set, and set batters are a selected, in-form group; a career-average rate overstates their risk. The direct logit learns this; the structural model does not.

A8. "Pinball loss punishes a range by how far the total lands outside it, set so honest percentiles score best: too narrow is punished whenever the total escapes, too wide a little on every innings." Tuning to "exactly 80% coverage" can be met by a useless mix of wide and narrow ranges.

A9. A calibrated 97% fails three times in a hundred; Devine's 95 may be one. The evidence is calibration across many such statements — the chapter's top bin: forecast 0.958, observed 0.918 (122 cases), slightly over-confident.

A10. In a chase the total is capped by the target, so show win probability from Chapter 20's WP v1, with required runs and balls.

Part C — Code It

C1. "Within ±X" curves.

s, g = live.load_first_innings()
sn = live.snapshots(s, g, overs=range(1, 20))
sn = sn[sn["complete"]].reset_index(drop=True)
er = st.ERTable(120, backstop="markov").fit(s[(s["year"] < 2023) & s["complete"]])
tr, te = sn[sn["year"] < 2023].copy(), sn[sn["year"] >= 2023].copy()
lin = live.ProjectionModel("linear", live.BASE_FEATURES, er).fit(tr)
te["abs_err"] = (lin.predict(te)["mean"] - te["final_total"]).abs()
q = te.groupby("over")["abs_err"].quantile([0.5, 0.8, 0.9]).unstack()

Full code: appendices/code/i_answers.py (ch27_c1).

      X_50%  X_80%  X_90%
1        25     49     65
2        24     47     62
6        19     37     47
…
15       10     18     23
…
19        4      7      9
First over at which +/-20 holds for 80% of innings: 15

A broadcaster can honestly say "within 20 runs, four times in five" only from the end of the 15th over.

C2. One team-season. Sunrisers Hyderabad batting first in IPL 2026, tuned chain (τ = 0, τ_f = 0.07) fitted pre-2023.

chain = live.LiveChain(n_balls=120, tau=0.0, tau_future=0.07).fit(s[(s["year"] < 2023) & s["complete"]])
sn = live.snapshots(s[s["match_id"].isin(pick)], g[g["match_id"].isin(pick)], overs=live.CHECKPOINTS)
p = chain.project(sn)
sn["inside"] = sn["final_total"].between(p["q10"].round(0), p["q90"].round(0))

Full code: appendices/code/i_answers.py (ch27_c2).

Sunrisers Hyderabad batting first, IPL 2026: 10 complete first innings
 over  inside  n  coverage    95% CI
    6       6 10       0.6 0.26-0.88
   10       8 10       0.8 0.44-0.97
   15       9 10       0.9 0.55-1.00

The hook innings (11 April: 105/0 after 6 → median 257, 80% 221–298; final 219) sits just below its band. Six, eight and nine of ten look "too narrow early", but every 95% interval contains 80%: ten innings show what an honest band looks like, not whether the model is calibrated.

Part D — Judgment

D1. Tests. Milestone odds transfer: a hundred is a survival-and-scoring question, like Chapter 10's Kaplan–Meier curves (0.562 × 0.608 ≈ 0.342, matching the pooled 33.7% conversion). Projected totals do not: a Test innings ends with all out or a declaration — a choice depending on lead, time, weather and the follow-on — so it would need to condition on overs left, the second new ball, pitch wear and lost time. Interval principles transfer but need a fixed-length target, which is why Chapter 29 forecasts sessions.

D4. The sponsor's memo. "We can show a projected score every over, with conditions. The scoreboard's run-rate projection runs about 10 runs low after 10 overs (2023–26) and jumps twice as much per over as our model (11.2 v 5.6 runs). We will show our median, rounded to 5, always with its 80% range. Conditions: (1) nothing in overs 1–2, when the honest range is ±49 to ±47 runs; (2) back-tested in this competition first (IPL ranges covered 84%); (3) it will jump after wickets, correctly; (4) at the break we switch to win probability. One number without a range would be wrong more often than right."


Chapter 28 — Tournament Simulation

Exercises: Chapter 28 exercises · Chapter: Chapter 28

Full worked answers to every exercise with a pointer in the chapter (A2, A4, A9, C1, C2, C3, C4, C6, D1, D2, D3, D5, M1, M2, M5), plus short answers to the rest of Part A. Part B is answered in the chapter. IPL simulations use the chapter's eve-of-season pooled predictor (frozen 28 March 2026) and seed 28.

Part A — Conceptual

A1. India's path depends on other results; multiplying "their" probabilities treats one path as certain.

A2. Why the final raises the title chance. Team 0 tops the toy group 47.3% of the time, but finishing second also reaches the final, which it then usually wins: the final is a second route, so its title chance (51.1%) exceeds its chance of topping the group. A format that lowers it: single elimination from the first match — two knockout wins at, say, 0.7 and 0.6 give 0.42, below 47.3% — or any format where group position earns nothing, such as re-drawing knockout pairings at random.

A3. Through 2026-updated ratings, actual 2026 XIs, weights fitted on 2026, or unpublished structure.

A4. The real IPL breaks ties on net run rate, and stronger teams win by bigger margins, so they win more than their share of tie-breaks; a random tie-break gives each tied team 50% and slightly understates strong teams' qualification chances. Ties at the cut are common — 4th and 5th were level in 53.3% of simulated 2026 seasons. The error grows with the spread of strengths, so it should matter more in women's internationals than in the even IPL; C4 shows the IPL effect is under one percentage point.

A5. Calibrated means p% events happen p% of the time; sharp means far from the base rate. IPL forecasts are calibrated but not sharp (champion's average probability 0.130 v uniform 0.114, knockout skill +0.037); the women's T20 World Cup's are both (slope 0.98; 0.372 v 0.097; skill +0.389).

A6. Four are Afghanistan's matches (withheld by Cricsheet) and two are washouts with no ball bowled; a washout gave each side a point, so lock it in as a no result rather than re-simulating it.

A7. Pools that rarely meet drift apart (Nepal 1,634 above South Africa 1,584); a tuned 1,100 start cut cross-tier log loss from 0.6565 to 0.6091.

A8. It plays the real format with known true strengths, measuring how much luck the format leaves — a ceiling no model can beat.

A9. Six favourite wins against four in ten tournaments is well within chance, and counting wins rewards confidence, not accuracy. Score both forecasters on the same twenty events with the mean log score of the real champion (rewards probability on whoever won, punishes confident misses) and the knockout Brier score and its skill against a base rate, and check calibration.

A10. Symmetric uncertainty in the rating gap lowers a high probability on average because win probability is S-shaped, compounding over several knockouts: India's title chance fell from 46.1% to 40.4% at a log-odds SD of 0.5.

Part C — Code It

C1. The IPL-only logit. Full code: appendices/code/i_answers.py (ch28_c1).

own = build_predictor("ipl", eve, elo=dict(k=10, home_adv=50, season_regress=0.25), kind="logit")
P_own = tn.pair_matrix(teams, lambda a, b: own.predict_match(a, b, home=None)["p_a"])
res = tn.simulate_tournament(tn.ipl_season_spec(league, teams, p=p_own), P_own, n_sims=20000, seed=28)
IPL-only logit coefficients (raw feature units): {'elo_diff': -0.0012, 'bat_diff': 0.0045, 'bowl_diff': 0.0062, 'home': 0.1516}
Fixture favourite mean |p - 0.5|: pooled 0.060, IPL-only 0.022
      pooled  ipl_only  change  elo_on_eve
RCB    0.159     0.095  -0.064        1522
GT     0.153     0.099  -0.054        1518
…
CSK    0.068     0.105   0.037        1485

elo_diff is negative, as Chapter 24 warned: fitted on the IPL alone the model learns noise (Elo "hurts", home looms large). It is far flatter (0.022 v 0.060), so title chances collapse toward 10%; the top Elo sides lose most (RCB −6.4 points, GT −5.4) and CSK gains (+3.7). Use the pooled model.

C2. A top-four tracker. The chapter's 03_in_tournament_updating.py already saved every team's top-four probability after every match in code/ch28_ipl2026_path.csv, so this is a read. Full code: appendices/code/i_answers.py (ch28_c2).

dyn = path[(path["model"] == "dynamic") & (path["after"] <= 70)].set_index("after")
for col in [c for c in dyn.columns if c.startswith("top4_")]:
    s = dyn[col]
    first_up = s.index[s >= 0.90].min(); first_down = s.index[s <= 0.10].min()
    held = (s.loc[first_up:] >= 0.90).all()
team  real_top4  first >=90%  held  first <=10%  peak  after 70
  GT       True         56.0  True          NaN 1.000       1.0
  RR       True         69.0  True          NaN 1.000       1.0
 RCB       True         57.0  True          NaN 1.000       1.0
 SRH       True         63.0  True          NaN 1.000       1.0
 CSK      False          NaN  None         11.0 0.443       0.0
PBKS      False         35.0 False         69.0 0.965       0.0

All four qualifiers crossed 90% and stayed (RR only after match 69). Punjab Kings are the warned-of exception: past 90% after match 35 (0.965), then fell back, not dropping below 10% until match 69. CSK were effectively gone after eleven matches.

C3. The 2024 men's T20 World Cup. Full code: appendices/code/i_answers.py (ch28_c3).

spec, teams, info = tn.icc_event_spec(ev, ["2024-06-01", "2024-06-19"], missing_team="Afghanistan")
tune = tn.tune_tier_init(allm, grid=(1500, 1300, 1200, 1100, 1000), k=20, home_adv=25, score_from=2016, until=eve)
R = tn.tiered_elo(allm, 20, 25, init_other=best, until=eve)
summ = tn.summarise(tn.simulate_tournament(spec, P, n_sims=10000, seed=28), teams)
Tuned associate start: 1100  (log loss 1500: 0.6700, 1300: 0.6408, 1200: 0.6344, 1100: 0.6334, 1000: 0.6379)
Forecast funnel, Afghanistan at 1500, 10,000 sims (real champion: India):
              p_semi  p_final  p_title
India          0.677    0.438    0.270
Australia      0.560    0.341    0.188
Afghanistan    0.235    0.112    0.042
Sensitivity to Afghanistan's assumed rating:
 afg_rating  afg_semi  afg_title  india_title
       1300     0.028      0.002        0.275
       1700     0.664      0.326        0.202

The structure rebuilds correctly (real Super 8 groups). Ten fixtures are absent: Afghanistan's seven and three Florida matches abandoned without a ball (confirm from public reports, then lock in as no results). India, the real champion, were favourite at 0.270. Afghanistan, who did reach the semi-finals, get 23.5% at the 1,500 placeholder — but that is almost all assumption: 2.8% to 66.4% across 1,300–1,700, moving India's title chance from 0.275 to 0.202, because their Super 8 group held India and Australia.

C4. A simulated net-run-rate tie-break. Regress margins of pre-2026 IPL wins by runs on the logit of the winner's walk-forward Elo probability, draw a margin for every simulated win, and break ties by accumulated margin. Full code: appendices/code/i_answers.py (ch28_c4).

fit = sm.OLS(runs_won["win_by_runs"], sm.add_constant(logit(runs_won["p_w"]))).fit()
for f in range(len(league)):
    w1 = rng.random(S) < p[f]
    pw = np.where(w1, p[f], 1 - p[f])
    marg = np.maximum(1.0, a + b * np.log(pw / (1 - pw)) + sd * rng.standard_normal(S))
score = pts + 0.5 * scaled(key)           # key: random numbers, or each team's margin total
Margin model on 531 IPL wins by runs before 2026: margin = 30.1 + 4.1 x logit(p_winner); residual sd 26.9
      random tie-break  margin tie-break  change  mean_p_fixture
GT               0.526             0.532   0.007           0.542
RCB              0.514             0.522   0.008           0.541
…
PBKS             0.263             0.259  -0.004           0.447
4th and 5th level on points in 0.526 of seasons

Margins are mostly noise (slope 4 runs per unit of log-odds against a 27-run residual). The three strongest sides gain 0.7–0.8 points of top-four probability and the rest lose up to 0.6 — the expected direction and size. In a league as even as the IPL, simulating net run rate is a refinement, not a correction.

C6. Does Qualifier 1 matter? Swap the knockout for plain semi-finals (1 v 4, 2 v 3). Full code: appendices/code/i_answers.py (ch28_c6).

semis = tn.TournamentSpec(rounds=real.rounds, knockout=tn.SEMIS_CROSSOVER, seed_from=real.seed_from, teams=list(teams))
P(champion finished the league in position k):
1st          0.378        0.256
3rd          0.122        0.252
Champion from the top two: real 0.751, plain semis 0.506

Under the real format the champion comes from the top two 75.1% of the time (50.6% with plain semis), so finishing first or second is worth a great deal. But nobody knows on the eve who will finish there, so each team's pre-season title chance barely moves (RCB −1.0 point). Qualifier 1 rewards league position; it hardly changes the favourite.

Part D — Judgment

D1. A World Test Championship simulator. Change: a three-outcome match model (Chapter 24's draw model on Elo, with a large home advantage); the real fixture list of unequal bilateral series rather than a round robin; ranking by percentage of available points (win 12, tie 6, draw 4, loss 0) with its own tie rule; a one-off neutral final. Keep: conditioning on results played (locking in abandoned Tests), the Monte Carlo error rule, log score and Brier checks, calibration, the oracle. The variance lesson shifts: single Tests are more predictable (Elo favourites won 67.7% of decided Tests 2023–26), but a two-year table from a few short series, diluted by draws, stays noisy, and the one-off final reintroduces luck.

D2. Testing Wendell's claim about Australia. Using only data before 7 February 2026: (1) Australia's T20I results in Subcontinent conditions against their Elo expectation — is there a residual, and on how many matches? (2) Their batters against spin in the middle overs (Chapter 18) relative to other full members there. (3) The squad's shrunk matchups against the types Sri Lankan pitches favour (Chapter 11). Adjust the rating only if a team × conditions effect survives shrinkage with an interval excluding zero and agrees with the player evidence; otherwise leave it. A correct eye-test call on thin evidence is still thin evidence — the forecast's 11.4% first-round-exit chance was not small, and it came true once.

D3. Publishing the forecast. PBKS: "Punjab Kings are almost there" / "Two wins from their last seven would almost certainly be enough" / footnote "Model estimate: 96% chance of a top-four finish from 10,000 simulations. A 4% chance is about one in twenty-five — it happens." India at 46%: "India are the team to beat" / "but the rest of the field is more likely to win than India are" / "Model estimate: 46% from 20,000 simulations; no other team above 16%." Each turns the probability into a target or comparison and names the miss rate plainly.

D5. ODI World Cups. Chapter 24 puts the luck share of men's ODI team records at 0.407 against about 59% for men's full-member T20Is, and a ten-team round robin gives nine league games each, so expect the best ODI team to win more often. Experiment: 04_variance_lesson.py with ten teams, one round robin (45 matches), SEMIS_CROSSOVER semi-finals and a final; true strengths with the spread implied by the ODI luck share (as in M1, via win_pct_sd); 100,000 worlds recording how often the best team wins, tops the table and reaches the semis — then repeat at the T20I spread.

Part M — Mixed

M1. A 75% luck share. Binomial variance at fourteen games is 0.25/14 = 0.01786; luck share 0.75 implies true variance 0.01786 × 0.25/0.75, a true SD of 0.077. Find the matching log-odds spread and run the oracle. Full code: appendices/code/i_answers.py (ch28_m1).

true_sd = np.sqrt(noise_var * (1 - luck) / luck)
s = brentq(lambda x: win_pct_sd(x) - true_sd, 0.005, 4.0, xtol=1e-4)
res = tn.simulate_tournament(spec, flat, n_sims=50000, seed=28, strength_sd=s)
 luck_share  true_win_pct_sd  log_odds_sd  best_team_wins_title
       0.92            0.039        0.148                 0.190
       0.75            0.077        0.298                 0.290
       0.59            0.111        0.449                 0.370
       0.40            0.164        0.731                 0.476
       0.35            0.182        0.856                 0.510

The first row reproduces the chapter's IPL figure (0.190 v 0.193). At 75% luck the best team wins 29% of the time; it wins half the time only at a luck share of about 0.36, roughly the women's full-member level.

M2. A reliability diagram for in-tournament forecasts. Pool every team's top-four probability at every checkpoint (10 teams × 71), bin, and plot mean forecast against the share whose team finished top four. The points are not independent: each team contributes up to 71 forecasts with one outcome, and late-season forecasts near 0 or 1 are settled by banked points, filling the extreme bins with near-identical forecasts on the diagonal by construction. The effective sample is nearer ten teams than 710 forecasts. Use one checkpoint per team, or pool many seasons and resample whole team-seasons.

M5. Tiered Elo and the translation factor. A 400-point start gap says, for results, what Chapter 26's 1.337 says for batting: performances against associates are worth less than they look. It implies P(full member wins) = 1/(1 + 10^(−1)) ≈ 0.91. The factor is not a win probability — it ignores bowling and the variability of totals — so to compare, push both sides' rates through Chapter 19's Markov chain or Chapter 27's simulator. They need not agree exactly (different windows; the factor averages tiers from 1.208 to 1.503), but a simulated win rate far from 0.91 would be a reason to revisit one of them.


Chapter 29 — Pitch, Weather and Session Forecasting in Tests

Exercises: Chapter 29 exercises · Chapter: Chapter 29

Every Part B item has its answer in the chapter. Men's Tests, December 2001 – October 2026; "day" and "session" mean the nominal 90-over and 30-over reconstructions.

Part A — Conceptual

A1. The innings clock (advanced by all out, declaration or follow-on), the ball clock (reset by a new ball after 80 overs or a new innings) and the pitch clock (every legal ball in the match, never reset).

A2. Time is lost far more often than extra overs are bowled, so a 90-over day usually runs ahead of the real one (only 0.4% of decided Tests came out late). A one-way error can be bounded and interpreted; an 86-over clock's two-way error (5.5% late) blurs results both ways.

A3. Any three: more tail batting later in matches; match situation (declaration-chasing or saving); selection of the Tests that reach day 5 (300+-over Tests average 47.91 runs per wicket in their first 50 overs v 37.77 for all); new balls; era (62.99 balls per wicket in 2001–09 → 53.75 in 2020–26).

A4. With innings, wickets down and batter quality in the model, pitch age is compared within cells, where it mostly measures how long this innings has lasted — survivorship of set batters (OR 0.849 per 100 overs). The wear is absorbed by the innings dummies (1.238/1.586/1.848).

A5. It fixes batting side, ground, attack and ball age, but not match situation (declaration-setting or saving), fatigue or weather.

A6. Wicket share mixes usage (captains bowl spin more late, often at tailenders) with effectiveness. Better: the cost of a spin wicket by pitch age (SENA 104.6 balls in the first 100 overs → 60.3 after 300) against pace's in the same bucket.

A7. (a) Draw: 450 − overs bowled. (b) Result: max(0, (days played − 1) × 90 − overs bowled) — a lower bound because the last day's shortfall is unmeasurable and extra overs on other days hide some loss.

A8. Time-starved draws (under 369.5 overs, the median day-5 result length) depend on weather; full-length draws on pitch and teams. They trend differently: in 2020–26 3.56% and 8.30% of Tests.

A9. Nominal sessions after day 1 mix real mornings and afternoons, diluting any effect; and an all-conditions average can hide an overcast-England one.

A10. It is a behavioural model of past chasers, who block once a target is out of reach (3.03 runs per over at a required rate of 2, 2.55 at 5); it makes any "aggressive" side behave like them. Counterfactuals need a strategy model or a direct outcome model.

Part C — Code It

C1. Runs per wicket without the tail. With 0–4 wickets down only the top six can be at the crease. Full code: appendices/code/i_answers.py (ch29_c1).

b = ts.add_clocks(load_test_balls()[0])
b = b[b["conditions"].isin(["SENA", "Subcontinent"])]
for lab, sub in (("all", b), ("top6", b[b["wkts_down"] <= 4])):
    t = ts.deterioration_table(sub, by=["conditions", "nominal_day"], width=10_000)
    out[lab] = t.pivot(index="nominal_day", columns="conditions", values="runs_per_wkt")
             SENA_all  SENA_top6  Subcontinent_all  Subcontinent_top6
1               36.33      41.95             39.54              45.60
4               29.17      35.21             29.78              37.70
5               27.18      41.85             30.47              41.48
Wickets behind the top6 cells: {'SENA': [2534, 2272, 1888, 1166, 172], 'Subcontinent': [1524, 1314, 1221, 758, 209]}

Without the tail the top six still lose about 6.7 (SENA) and 7.9 (subcontinent) runs per wicket from day 1 to day 4, but day 5 jumps back to about 41–42 — on only 172 and 209 wickets, from a selected group batting out draws or chasing small targets. Much of the raw ~9-run decline is the tail; the honest wear signal is the paired design's.

C3. Lyon v Ashwin by pitch age. Shrink a ratio by adding k prior wickets at the prior cost: (balls + k × prior) ÷ (wickets + k), with the prior the all-spinner cost in the same bucket and conditions, weighted by each bowler's balls. Full code: appendices/code/i_answers.py (ch29_c3).

pb["exp_wkts"] = pb["balls"] / pb["prior_bpw"]            # per bowler x conditions x bucket
g = pb.groupby("bucket")[["balls", "wkts", "exp_wkts"]].sum()
g["prior_bpw"] = g["balls"] / g["exp_wkts"]
g["shrunk_k20"] = (g["balls"] + 20 * g["prior_bpw"]) / (g["wkts"] + 20)
  bowler  bucket  balls  wkts  raw_bpw  prior_bpw  shrunk_k20  shrunk_k60
 NM Lyon       0   7458   117     63.7       94.5        68.2        74.2
 NM Lyon     200  10630   189     56.2       64.1        57.0        58.1
R Ashwin       0   7100   122     58.2       82.0        61.5        66.0
R Ashwin     200   7103   167     42.5       58.8        44.3        46.8
NM Lyon: shrunk (k=20) bucket 0 -> 300+ falls 68.2 -> 58.1 (-14.8%); prior for his mix 94.5 -> 59.9
R Ashwin: shrunk (k=20) bucket 0 -> 300+ falls 61.5 -> 50.5 (-17.9%); prior for his mix 82.0 -> 58.8

Ashwin is cheaper at every pitch age, most of all at 200–300 overs. Both beat the prior widely on a fresh pitch, so neither only works on a worn surface; the ranking holds at k = 60.

Part D — Judgment

D3. Tactics or pitch? Wendell has a point: third innings are often batted for a declaration, cheapening wickets regardless of the surface, so some of the 0.888 ratio could be tactics. Keep only third innings that were not declared and began behind or barely ahead, check that first-30-over run rates in innings 1 and 3 match, and recompute the paired ratio with its bootstrap interval. If it barely moves, tactics weren't driving it; if it moves most of the way to 1, they were. The 2 v 4 pairing (0.849) cross-checks, restricting to realistic targets.

D5. Testing the morning-session belief. Merge daily cloud or rain data onto English Tests by venue and date; keep real mornings (day 1, or later days with no earlier time lost); compare wicket rates in the first 30 overs on overcast v clear mornings, controlling for ball age, innings and batter quality. To detect a 1.10 rate ratio at 5% significance and 80% power, (1.96 + 0.84)² × 2/W ≤ (ln 1.10)² gives W ≈ 1,730 wickets per arm, about 600 sessions each. England's 154 Tests will not supply that many identifiable overcast mornings, and pooling countries answers a different question than the Dukes-under-cloud claim.


Chapter 30 — Optimal Batting Order

Exercises: Chapter 30 exercises · Chapter: Chapter 30

Every Part B item has its answer in the chapter. Positions are inferred from order of arrival, keyed by registry id.

Part A — Conceptual

A1. Position is the order of first appearance as striker or non-striker (striker first on a shared delivery), keyed by id. Positions fall out of step with dismissals after retirements and substitutions such as Impact Player swaps (0.72% of IPL arrivals at No. 3 or lower).

A2. "Balls when he batted" averages over innings the slot batted; "balls per team innings" over all innings, counting zeros. The second is the budget: the IPL No. 6 bats in only 82.8% of innings.

A3. Chapter 19's state averages already contain who usually bats there (34.2% of IPL balls at 6–7 down in overs 12–15 are faced by usual Nos. 8–11), so plugging in a named batter double-counts; the situation cell is fitted jointly with each batter's tilt.

A4. A run tilt shifts runs per ball against the cell; a dismissal multiplier scales its wicket probability. Both matter: one sets what he adds, the other how many balls he uses and leaves — Kohli's dismissal index 76.6 v Padikkal's 121.7 at similar run indices (98.0, 96.7).

A5. Nos. 8–11 are a different population picked to bowl, and shrinkage should pull toward the right population; with few balls the prior dominates (8–11 prior: tilt −0.154, dismissal multiplier 1.329).

A6. Common random numbers give every order the same luck, so differences vary far less (paired ±0.43 v unpaired ±0.73 for 20,000 innings, worth about 2.9 times the simulations); levels are no more accurate.

A7. The screen's best of 5,040 noisy estimates is biased upward (206.16); re-running the top 25 on 20,000 fresh simulations dropped them from 205.17 to 203.20 on average, the best to 203.80.

A8. Promotion moves balls from the batters jumped over; the team gains only the difference in runs per ball on those balls — Tim David gained 18.5 runs from No. 6 to No. 3, the team 1.6.

A9. Rule: a usual No. 8+ (five or more innings) arriving at No. 6 or higher with ≤ 5 down while a usual top-seven batter is still to come. It misses No. 7 nightwatchmen and newcomers, and wrongly includes attacking promotions (several England fourth-innings No. 3 arrivals since 2022).

A10. By day 3 lost time has accumulated, so the nominal clock runs ahead of the real day (Chapter 29).

A11. A phase deviation adjusts a batter's tilt in one phase; out of time it added noise (MSE 74.33 v 73.84 without). His one tilt still yields different phase numbers because it is applied to phase-specific cells.

A12. In women's T20Is the top three face 55.5% of balls, so their order decides more; in men's Tests Nos. 8–11 still face 15.4% and almost everyone bats — the scarce resource is wickets, not balls.

A13. Simplifications that shift every order alike cancel in CRN differences; unacceptable ones interact with order (equal dismissal rates, no 120-ball limit).

Part C — Code It

C1. Slot budgets for the BBL and the PSL. Full code: appendices/code/i_answers.py (ch30_c1).

b = load_deliveries(code)
b = b[~b["super_over"]]
e = bo.entry_order(b[pd.to_datetime(b["start_date"]).dt.year >= 2023])
t = bo.position_table(e)
gap = t.loc[3, "balls_per_inns"] - t.loc[6, "balls_per_inns"]
IPL: share of balls by slots 1-3/4-5/6-7/8-11 = 51.8/26.7/14.7/6.8%;  No. 3 - No. 6 gap 8.22 balls
…
BBL: share of balls by slots 1-3/4-5/6-7/8-11 = 49.5/28.1/14.6/7.8%;  No. 3 - No. 6 gap 8.44 balls
…
PSL: share of balls by slots 1-3/4-5/6-7/8-11 = 52.1/25.7/14.7/7.6%;  No. 3 - No. 6 gap 10.05 balls

The IPL line reproduces the chapter exactly. All three leagues share one shape — top three about half the balls, Nos. 6–7 about 15%, the tail 7–8% — but the No. 3 − No. 6 gap is clearly bigger in the PSL, where Nos. 1–3 each face about 20 balls. A power hitter at No. 6 gives away even more there.

C6. How robust is the nightwatchman rule? Full code: appendices/code/i_answers.py (ch30_c6).

for tail_from in (8, 7):
    for max_wkts in (5, 4):
        nw = bo.find_nightwatchmen(e, tail_from=tail_from, max_wkts=max_wkts)
        d1 = nw[(nw["innings"] == 1) & (nw["pitch_age"] < 90)]      # nominal day 1 of the match
                     rule   n  day1_n  share_80_90_day1  median_balls  protected_n  protected_diff  lo90  hi90
usual pos >= 8, <= 5 down 425      48              52.1          27.0          406           -4.00 -6.64 -1.42
usual pos >= 7, <= 5 down 871     152              17.8          32.0          761           -3.38 -5.27 -1.37

The wickets threshold does nothing. Loosening the tail to usual No. 7+ doubles the count but collapses the end-of-day-1 share from 52.1% to 17.8% — mostly promoted all-rounders, not nightwatchmen. The protected-batter shortfall is stable (−4.00 or −3.38, intervals excluding zero), an association rather than proof of harm; the label's precision is what moves, so the stricter default is right.

Part D — Judgment

D2. In Tests balls are not scarce: most innings end all out, so reordering shuffles when batters bat, not whether (Nos. 8–11 face 15.4% of Test balls v 6.8% in the IPL; the top three 38.8% v 51.8%). The nightwatchman matters more because it decides one wicket at one dangerous moment: his wicket is cheaper (16.27 runs per dismissal v 39.68 for specialists at Nos. 3–6), but he falls almost twice as often per ball, and the protected batter arrives a wicket worse off and scored 4.0 runs less. In Tests a wicket's value depends on situation far more than a ball's.

D6. "Kohli is in the top three not because he scores fast but because he is very hard to get out. A batter's worth to an order is runs added and balls left for those behind. His run index is about average, but his dismissal index (76.6) is among the IPL's lowest, so the side keeps wickets and its hitters get their full share. The rules table backs this — hardest-to-dismiss first (200.75) beats easiest-to-dismiss first (195.33) by more than five runs — and the top 100 orders place Kohli at an average slot of 2.04."


Chapter 31 — Bowling Rotation and Death Overs

Exercises: Chapter 31 exercises · Chapter: Bowling Rotation and Death-Overs Strategy

Every Part B item has its answer in the chapter.

Part A — Conceptual

A1. No bowler may bowl consecutive overs and each is capped at four, so in a six-over powerplay or five-over death one bowler fits at most three overs (1-3-5, 16-18-20).

A2. The 73.4% describes usage — captains trust the same bowlers with new ball and death. Skill transfer needed phase values split into general skill and interaction, with a noise correction; only then did the true powerplay–death correlation (0.58) appear.

A3. If every bowler were worth the same in every over, any ordering gives the same total. Order matters only through phase interactions, leverage weights and matchup overlays.

A4. Overs 16–20 carry 26.4% of IPL 2023–26 first-innings variance, less than the middle overs' 44.1%, so they do not "decide" matches; they are the highest-leverage overs (over-20 weight 2.29).

A5. Cost rises from 9.83 runs in over 16 to 12.20 in over 20 (IPL 2023–26); a phase par would penalise the over-19/20 specialist and flatter whoever takes over 16.

A6. $k_g$ (about 700 balls) is where a record is half signal about general level; $k_i$ (about 5,200) is the same for the phase interaction, whose true spread is small (SD 0.198 against 0.539 runs per over).

A7. Leaky bowlers are dropped, so low workload is partly a result of bad bowling; post-2023 debutants who kept bowling averaged about par (+0.12 per over), so a workload prior biased them down.

A8. The Hungarian algorithm matches slots to overs one-to-one; "not overs o and o+1" links pairs, so the integer programme adds $x_{b,o} + x_{b,o+1} \le 1$.

A9. The best plan is chosen on noisy estimates, so it is the most optimistically estimated; with a calibration slope of 0.80, KKR's 5.96-run gap is a ceiling, not an estimate.

A10. The overlay is weighted by the targeted batters' share of balls (0.932 in over 1 → 0.449 in over 6) and is zero once both are out.

A11. Plausibly: less bat speed makes pace easier to use than slower balls, and women's attacks are built around strong spinners. But captains choose when to bowl spin; the within-bowler interactions (spin +0.07, pace −0.18 runs per over) are better evidence, and small.

A12. r = 0.06 is against single overs, dominated by noise; the slope of 0.80 compares averages over many overs. Values rank bowlers in bulk, not any one over.

Part C — Code It

C1. First and last over.

w = own[own["over"].isin([1, 20])].pivot_table(index=["match_id", "innings"], columns="over",
                                               values="bowler_id", aggfunc="first").dropna()
same = (w[1] == w[20])       # own = bp.over_owners on full 20-over, no-rain-rule games

Full code: appendices/code/i_answers.py (ch31_c1).

         innings  share
year                   
2008-12      489   15.5
2013-17      471   21.4
2018-22      498   17.7
2023-26      432   17.4
Men's T20Is (full members, 2016-26): 1,057 innings, same bowler 16.9%
Women's T20Is (full members, 2016-26): 786 innings, same bowler 18.8%

About one innings in six opens and closes with the same bowler in every era and in both the men's and women's game — a habit of T20 captaincy. (The index is the era, though pandas labels it year.)

C8. RCB with restricted bowlers (bowling-first value matrix, IPL data before 2026).

V = bp.value_matrix(bp.phase_table(sh, rcb))
free, v0 = bp.plan_milp(V)
for who, k in [("KH Pandya", 2), ("B Kumar", 3)]:
    p, v = bp.plan_milp(V, exact_overs={who: k})

Full code: appendices/code/i_answers.py (ch31_c8).

Unconstrained: Sha Kum Sha Kum Sha Kum Pan Haz Sal Haz Sal Haz Sal Sha Haz Pan Kum Pan Sal Pan -> 4.64
KH Pandya limited to 2: ... -> 3.05 (cost 1.59)
B Kumar limited to 3: ... -> 3.64 (cost 1.00)

The free plan matches the chapter's 4.64. Spare overs go to Romario Shepherd, the lowest-valued sixth option. Pandya's cut costs more because it removes two overs; per over, Kumar's is dearer because his values are higher. With almost no phase interaction on IPL data, each cost ≈ overs lost × (restricted bowler's value − Shepherd's).

Part D — Judgment & Format Transfer

D7. Printing "the optimal plan". Put three caveats at the top. The values are estimates with wide error (r = 0.06 against single overs, slope 0.80): they separate the elite from the rest and little else. The plan is a starting position — the §31.8 re-plans show the best use of the remaining overs changes after every wicket and expensive over. And it cannot see the bowler's body, the pitch, the dew or the opposition's prepared tactics. So print a decision sheet instead of one plan: the best plan and the cost of realistic alternatives; the two or three overs where the choice matters most; re-plans for early wickets, a 15-run over and a left-hander facing the off-spinner; and a "do not" line ("the sixth bowler should not bowl the 20th"), which the evidence supports more firmly than any precise ordering.


Chapter 32 — Field Placement

Exercises: Chapter 32 exercises · Chapter: Field Placement Optimization

Parts B, D and M already carry answers or sketches in the chapter.

🧪 Simulated data: Any shot direction, wagon wheel or optimised field below comes from the simulated tracking layer (real outcomes, simulated locations). Restriction steps, catch rates and wicket values are real.

Part A — Conceptual

A1. The Laws (all formats): Law 28.4 allows at most two on-side fielders behind the popping crease. T20 conditions: 2 outside the circle in overs 1–6, 5 after. ODI conditions (since July 2015): 2, 4 and 5 by phase. Tests have only Law 28.4.

A2. Nine fielders, at most five outside, so at least four inside the circle.

A3. The cap rises from 2 to 5, captains switch to spin (28.2% → 64.3% of typed balls) and batters change intent; match, pitch and (mostly) batters stay the same. The step survives within each bowling type (pace alone −24.74 runs per 100 balls).

A4. It assumes outcomes would continue smoothly through the cut apart from the rule; it fails if something else changes at exactly that point (the spin switch, batters "cashing in" in over 6).

A5. Balls in one match share pitch, teams and batters; resampling balls treats correlated balls as independent and makes intervals far too narrow.

A6. The simulator gives every name a fixed hash-based zone preference, so the stability was built in. Only real wagon-wheel data could test it.

A7. RE = [WP(R, B−1, W) − WP(R, B−1, W−1)] / [WP(R−1, B−1, W) − WP(R, B−1, W)]. With nine wickets in hand in the last over, a wicket barely changes win probability, so RE is near zero.

A8. At the death the riders go on the rope; a slip and gully take two inner fielders away from stopping pushes for catches worth only about 1.42 runs each, so another field always beats it.

A9. Cricsheet does not record pushed/driven/lofted, so the mix is chosen to make the conventional field reproduce real IPL 2024–26 rates of dots, 1–3s, fours, sixes and catches.

A10. With 60 shots the zones are mostly noise (overfitting), and real zones depend on bowler, length and the field itself.

A11. It subtracts wicket value × catch rate from runs, putting runs and wickets on one scale.

A12. Leg theory packed the on side behind square; an unconstrained optimiser would recreate it, so Law 28.4 is written in (a penalty plus check_field).

Part C — Code It

C1. The step by competition (real data).

for comp, b in men.groupby("competition"):
    cnt = fl.over_counts(b)
    for m in ["boundary_pct", "runs"]:
        r = fl.restriction_step(cnt, 6.5, m)    # lines through overs 3-6 and 7-10, 400 match bootstraps

Full code: appendices/code/i_answers.py (ch32_c1).

REAL step at over 6->7, boundary_pct per 100 legal balls (90% match-bootstrap interval), sorted by the upper end of the interval
competition  rate_before  rate_after   jump  jump_lo  jump_hi  matches
        ntb        22.77       11.56 -11.87   -12.61   -11.14     1377
        sat        20.74        8.76 -13.02   -14.94   -10.62      125
        ipl        22.90       11.76 -11.21   -12.13   -10.26      771
…
        bbl        15.25       11.32  -2.30    -3.45    -1.12      534

The SA20 has the largest point estimate but only 125 matches; ranked by the interval end nearest zero, the T20 Blast leads. The outlier is the Big Bash (−2.30 boundaries and −4.35 runs per 100 balls). From 2020–21 the BBL replaced the fixed six-over powerplay with a shorter one plus a two-over "Power Surge" taken later, so over 6→7 is usually not where the restriction changes (check the competition's playing conditions). Set the cut per match from the rules in force.

C3. A sixth rider (🧪 simulated wheel, death shot mix, wicket worth 1.42 runs).

for k in (4, 5, 6):
    f, obj, P = fl.optimise_field(wheel, mix, k, wicket_runs=1.42, n_starts=2, start=start)

Full code: appendices/code/i_answers.py (ch32_c3); about two minutes.

max_out=4: riders used 4, runs/over 10.59, catches/100 5.03, objective 10.16 runs-equivalent per over
max_out=5: riders used 5, runs/over 10.34, catches/100 5.56, objective 9.87 runs-equivalent per over
max_out=6: riders used 5, runs/over 10.34, catches/100 5.56, objective 9.87 runs-equivalent per over

🧪 Simulated data: Properties of the model on the simulated league wheel, not of any real side.

The fifth rider is worth 0.29 runs-equivalent per over; offered a sixth, the optimiser declines it. Within this model the cap of five sits where riders stop paying — though fixed batter intent probably understates what a sixth would do to real batters' willingness to loft.

Part D — Judgment & Format Transfer

D2. "Always four slips?" Not always. The first two catchers cost almost nothing in Tests. At 30.80 runs per wicket and a 75% catch rate, the third slip (0.567 runs-equivalent per over) pays if a catchable edge reaches him about once every 41 overs, the fourth (0.861) about once every 27. On a seaming morning with a new Dukes ball, where Imran expects "a couple before lunch", post four. On a flat subcontinent pitch with an old ball, edges may not carry for a session; the fourth slip should then be saving singles or at short leg. The break-even is a format-level number; the edge rate that must beat it comes from pitch, ball, bowler and batter — the eye test's job, revised through the day. Rule: four with the new ball and against new batters, drop the fourth when the ball stops carrying.


Chapter 33 — The Declaration Decision

Exercises: Chapter 33 exercises · Chapter: The Declaration Decision in Test Cricket

Every Part B item is answered in the chapter. Numbers below are labelled measurement (counted from the data) or model output.

Part A — Conceptual

A1. Batting on adds runs but removes overs needed to take ten wickets. The lead is known exactly; the time is only an estimate (weather, light, over rates).

A2. (a) Target = opponents' runs in innings 1–3 minus the chasers', plus one. (b) Time = 450 nominal overs minus overs bowled; lost overs are invisible, so it is an upper bound.

A3. Four defeats in 265 (measurement), but 93 of the 265 target-setting declarations were drawn (35.1%; the figure of 95 counts all 267 third-innings declarations, including two by sides following on). Under the WTC the losses gave up 4 × 12 = 48 points, the draws 93 × 8 = 744. Any error shows up in draws — the opposite of "too cautious to lose".

A4. Once the target recedes, chasers bat for the draw at about 2.8 an over (measurement), but blocking cannot remove the bowler's chances: even 8% per over over 150 overs is about 12 wickets.

A5. Chases needing ≤2 an over at the first ball won 59.8%, 2–2.5 only 9.5% (measurements). The nominal clock overstates time, so "2.2" may really be 2.8; measure the cliff on the real clock.

A6. Big targets go with dominant sides, so the target coefficient absorbs dominance and never sees the overs given up; it says "bat on" for 93.8% of declarations (model output). Good outcome forecasts can be bad guides to choices.

A7. V(λ) = P(chasers lose) + λ · P(draw). λ = 0: must win to level a series; λ = 1/3: WTC default; λ near 1: 1–0 up in the final Test.

A8. Picking the best of many noisy estimates selects on noise. Re-pricing cut the claimed gain from 0.68 to 0.57 WTC points (model outputs): about a sixth was the curse.

A9. The Stackelberg declarer anticipates the chaser's best reply. Assuming attack was costly (9.53 against the equilibrium 9.74); assuming steady play cost almost nothing (9.71), because steady is usually the best reply (stylised-game outputs).

A10. The pitch on the day (pitch reports, ball-tracking bounce and deviation); the weather forecast (venue precipitation history and forecasts); bowlers' fitness (workload/GPS, medical reports).

Part C — Code It

C1. The real-clock shortfall by outcome.

d = third[third["next_overs"].notna()].copy()            # third-innings, non-follow-on declarations
d["shortfall"] = d["overs_left"] - d["next_overs"]
d.groupby("outcome")["shortfall"].agg(n="size", median="median", p90=lambda s: s.quantile(0.9),
                                      share_gt30=lambda s: (s > 30).mean(),
                                      share_gt90=lambda s: (s > 90).mean())

Full code: appendices/code/i_answers.py (ch33_c1).

           n  median      p90  share_gt30  share_gt90
outcome                                              
win      168  87.833  155.133       0.917       0.476
draw      82  34.250  149.133       0.573       0.256
loss       4  33.583   82.567       0.500       0.250

The draw row reproduces the chapter (median 34.3 overs, 57.3% above 30, 25.6% above 90; measurement). For wins the shortfall mostly measures how fast the chasers were bowled out, not lost time; only in draws does the fourth innings run to the real clock's end. Four losses should not be interpreted.

C6. Rearguards against declarations. The longest innings in each of the 82 drawn fourth innings (batting_summary(b4, by=["match_id", "batter"]), top row per match).

       batter         team  year  runs  balls  outs
   Babar Azam     Pakistan  2022   196    425     1
   JP Greaves  West Indies  2025   202    388     0
 F du Plessis South Africa  2012   110    376     0
…

Full code: appendices/code/i_answers.py (ch33_c6). The selection is severe: it conditions on the draw (long innings in lost chases and rain-made draws are excluded) and rewards long careers. Measure rearguard skill as balls survived per fourth-innings appearance across all outcomes, with target and real clock as context.

Part D — Judgment & Format Transfer

D5. If a WTC draw were worth 2 points (λ from 1/3 to 1/6). Direction: a cheaper draw favours earlier declarations and smaller targets; a draw would now cost declarers 10 points instead of 8, rewarding sides that play for results. Size, by the model: small. The simulator's best moment at the median state is four more overs (target 439) for every λ ≤ 1/3, moving only at λ ≥ 1/2 (model output), because it produces too few draws (20.9% for declared 2019–26 chases against 27.5% observed). Confidence: moderate on direction, low on size. A cheaper draw also changes the chasers' incentives, which the stylised game cannot show. Forecast earlier declarations and fewer draws, but put no number on it until a rule change produces real data.


Chapter 34 — IPL Auction Strategy

Exercises: Chapter 34 exercises · Chapter: IPL Auction Strategy

Every Part B item is answered in the chapter. Chapter 34's runs above replacement (RAR) is an all-skills currency with a lower replacement level than Chapter 13's batting RAR (Pant's 2025 middle overs: 0.0 here, −28.5 there). Never mix the two scales.

Part A — Conceptual

A1. (a) Value is expected contribution in crore; price is what the room charges. (b) Hammer price is an auction buy's cost; a purse deduction is a retention's, set by slabs that can exceed salary. (c) Mega auctions rebuild squads; mini auctions top up with small purses (mega coefficient −24%).

A2. Replacement should be what a team gets for nothing; defining it by playing time captures the real fringe, while "worst 20% of performances" selects on bad luck and moves with each season's noise.

A3. "Fourteen matches is mostly luck. On past seasons, keeping about a third of last season's difference from average forecasts better than keeping all of it — so I pay for the part likely to repeat."

A4. Either price buys selection (sunk cost, reputation), or price carries real information but selected players' per-match differences are small against noise. Separate them by comparing equal projections at different prices, or using injury replacements as a natural experiment.

A5. Log-price regression predicts the median; prices are skewed (smearing factor 1.75), so the 615 predictions sum to ₹1,298.6 crore against ₹1,803.8 crore spent. For the top end use market comparables.

A6. Unspent money is worthless, so a big purse with weak alternatives loses little by buying — hence PBKS's ₹22.39 crore walk-away for KL Rahul, far above the ₹12.5-crore-per-win exchange rate.

A7. The purse pays the slab regardless; KKR's salaries of 13, 12, 12 and 12 against a ₹61-crore slab total save the owners money at the players' expense, with other franchises unaffected.

A8. Stars upgrade scarce playing slots (168 player-matches, 56 overseas); the cheap band's ₹4.7 crore per win also includes players who never played.

A9. Spearman 0.306 against the room's 0.325 is a tie: public data reproduces most of what scouts know, but doesn't add to it, and outcomes are too noisy for anyone to rank well.

A10. Fitness and injury (medical records); age (public elsewhere, not in the register); unrecorded domestic form (scouting). Also leadership and role fit.

A11. Cosine similarity matches the mix of value (a death hitter for a death hitter); it fails when shapes match but levels differ wildly.

A12. Auctions are held in November–December; counting later matches leaks future form into the market model and inflates its fit.

Part C — Code It

C1. Phase value card (reads the chapter's cached season table from code/01_value_currency.py).

for p in ("powerplay", "middle", "death"):
    nb = r[f"bat_balls_{p}"]
    rows.append({"year": y, "phase": p, "bat_balls": nb, "bat_rar": r[f"bat_{p}"],
                 "bat_rar_per100": 100 * r[f"bat_{p}"] / nb, "share_of_bat_balls": nb / bat_balls, ...})

Full code: appendices/code/i_answers.py (ch34_c1).

RR Pant (IPL; Chapter 34's all-skills currency, runs above replacement)
 year     phase  bat_balls  bat_rar  bat_rar_per100  share_of_bat_balls  bowl_balls  bowl_rar
 2025 powerplay         53      3.9             7.3               0.262           0       0.0
 2025    middle        108      0.0             0.0               0.535           0       0.0
 2025     death         41     25.7            62.7               0.203           0       0.0
 2026     death         45     42.1            93.6               0.199           0       0.0
…
  share of 2025-26 balls faced before over 16: 79.9%
Aniket Verma (IPL; Chapter 34's all-skills currency, runs above replacement)
 2025    middle         82     47.7            58.2               0.577           0       0.0
 2026    middle         21    -20.6           -98.1               0.389           0       0.0

Pant's death batting is his best phase per 100 balls yet took only a fifth of his balls — deployment, not talent, is the lever (M6). Verma's 2025 middle overs made him Anchor B's cheap star; in 2026 the same phase went to −20.6.

C6. Price by projected-value rank.

fr["rank"] = fr.groupby("season")["value_cr"].rank(ascending=False, method="first")
fr["band"] = pd.cut(fr["rank"], [0, 10, 30, 60, 1000], labels=["1-10", "11-30", "31-60", "61+"])
fr.pivot_table(index="season", columns="band", values="price_cr", aggfunc="median", observed=True)

Full code: appendices/code/i_answers.py (ch34_c6).

       auction  buys   1-10  11-30  31-60   61+
season                                         
2022      mega   204   6.88   8.38   2.80  0.50
2024      mini    72   4.90   3.10   0.20  0.20
2025      mega   182  12.00   8.88   3.90  0.75
2026      mini    77   7.90   2.00   0.75  0.30
…

The room pays more for higher-ranked players, but the top gradient is shallow — in 2022 the model's top ten cost less than its 11th–30th — and steeper in mini auctions, where small purses concentrate money on consensus players. Compare bands within a season.

Part D — Judgment & Format Transfer

D2. Reply to Wendell. "You're right: Verma won SRH matches in 2025 and no model built on this data would have singled him out. With no record in the snapshot, ours valued him as an anonymous newcomer at ₹1.68 crore — still about five times his ₹30-lakh price. The 46 players bought at ₹30 lakh in 2025 produced 399.2 RAR across two seasons on ₹27.6 crore of salary, mostly from three of them (Prince Yadav 149.9, Digvesh Singh 97.8, Verma 71.5). Nobody could have picked which three; a team that bought several and played them was likely to find one. The edge is the portfolio, not the pick — and the pick didn't last (1.9 RAR in 10 matches in 2026). Your scouts can do what the model can't: choose which ₹30-lakh players go in the portfolio."


Chapter 35 — Betting Analytics

Exercises: Chapter 35 exercises · Chapter: Cricket Betting Analytics

As in the chapter, every price is illustrative (the snapshot has no bookmaker odds); these are forecasting exercises, not advice to bet. Betting is illegal in most Indian states and regulated elsewhere. If gambling is causing harm, the self-exclusion schemes in A10 and the helplines in §35.1 exist for that. Every Part B item is answered in the chapter.

Part A — Conceptual

A1. Implied probability (1/odds) includes the margin, so a market sums above 1; de-vigged probability removes it. Comparing a model's fair probability with 1/odds shows a "bad price" everywhere.

A2. "It is huge, mostly illegal and unmeasured; every headline figure is an extrapolation, so we say 'very large' rather than print a falsely precise number."

A3. The 2025 Act is a central law banning online money games, their advertising and payments, with an Online Gaming Authority to classify games. Betting is a state subject (Entry 34, State List), hence the question of legislative power; challenges were transferred to the Supreme Court in September 2025 and were pending at the chapter's last check.

A4. Predict each match only from information before it, updating in date order. Broken by any season aggregate that includes the match (season win %, an average in matches India won).

A5. Real edges are small and results noisy, so honest curves are ragged (a 5% edge at evens needs about 1,533 bets to show); a smooth climb means the model saw the results (+37.0% hindsight ROI).

A6. Closing-line value: beating the final pre-match price, which aggregates everyone's information. Far less noisy than profit; the book has no prices to compute it.

A7. Log-growth peaks at the Kelly fraction, returns to about zero at twice Kelly and goes negative beyond; half Kelly keeps about three-quarters of the growth with smaller drawdowns.

A8. Wickets change the state, which the model counts (gap −0.3 points); a big over also carries information about the pitch and bowlers that the state lacks (+6.8 points outside the IPL).

A9. Fixing a small specific event. Lord's 2010 had 16 no-balls — above the median Test's 10, but 29% of Tests had as many — and was exposed by journalism and a trial, not data.

A10. GAMSTOP (Great Britain): one registration blocks online gambling with Gambling Commission licensees. BetStop (Australia, live 21 August 2023): licensed providers may not take bets from or market to registrants.

A11. Long shots win less often than their prices imply. Testing needs historical prices matched to results; the snapshot has results only.

A12. Profit depends on price, not win rate: Case Study 2's ≥ 0.80 favourites won 86.6% and still lost (−1.3% at fair prices, −6.0% with a 5% margin).

A13. A good decision has positive expected value at the time. Backing Sri Lanka at 4.61 on a 0.217 event returned ≈ 1.00 — no edge — and happened to win. Judge decisions over many cases (Theme 6).

A14. At what prices (winners at 1.30 need 76.9%)? Is this the whole record chosen in advance? And 50 tips is far too few (about 1,500 needed for a 5% edge).

Part C — Code It

C1. A de-vig table.

for m in ["multiplicative", "additive", "power", "shin"]:
    t[m] = bet.devig(o, m)
t["spread_pp"] = 100 * (t[methods].max(axis=1) - t[methods].min(axis=1))

Full code: appendices/code/i_answers.py (ch35_c1).

Test match, 3-way (illustrative)
selection   odds  raw_implied  multiplicative  additive  power   shin  spread_pp
     Home 2.0000       0.5000          0.4590    0.4703 0.4705 0.4673     1.1445
     Draw 3.7500       0.2667          0.2448    0.2369 0.2374 0.2390     0.7900
     Away 3.1000       0.3226          0.2962    0.2928 0.2921 0.2937     0.4074

The Test spread is not "well under one point": it reaches 1.14 because this illustrative book's margin is large (8.9%), and methods disagree in proportion to the margin removed. In the many-runner top-batter market (in the full output) the additive method pushes long shots down hardest. Method choice matters most at the extremes and in high-margin books.

C5. Fractional Kelly with an uncertain edge (pure simulation). 4,000 bettors draw a true edge from U(−2%, +6%) but stake c × Kelly for a believed 5% edge at 2.50.

f_full = float(bet.kelly_fraction(1.05 / odds, odds))
edge = rng.uniform(-0.02, 0.06, n_bettors)
wins = rng.random((n_bettors, n_bets)) < ((1 + edge) / odds)[:, None]

Full code: appendices/code/i_answers.py (ch35_c5).

  c  stake_pct  median   p10  p_below_1
0.1       0.33   1.030 0.909      0.390
0.4       1.33   1.069 0.649      0.426
1.0       3.33   0.922 0.267      0.520
…
c maximising the 10th percentile: 0.1

The smallest multiplier protects the 10th percentile best; even the median bettor loses at full Kelly, because the true edge averages 2%, not 5%. Use c ≈ 0.1–0.25 — or stake nothing until the edge is verified.

Part D — Judgment & Format Transfer

D2. Wendell and the big over. The cricket half is supported: outside the IPL, after a 15-plus-run over, chasers won 61.3% against a state-only forecast of 54.6% (+6.8 points, 95% interval +5.0 to +8.4, 1,838 chases). It does not follow that markets misprice it. Our benchmark is a pre-2023 state-only table, while real in-play prices see pitch, remaining overs and batters; if "every punter knows it", it is probably priced; and the book has no in-play prices to test. Verdict: add recent scoring (or a scoring-environment estimate) to the win-probability model; "therefore bet on it" would need real historical prices and a closing-line test, which this book does not have.


Chapter 36 — Fantasy Cricket Analytics

Exercises: Chapter 36 exercises · Chapter: Fantasy Cricket Analytics

Short answers to A3, A5, A8, A10 and every Part B item are in the chapter. The promised full discussions of D1, D3 and D5 are below.

Part A — Conceptual

A1. Ownership: share of entries containing a player. Leverage: chance of being among the match's top 11 scorers minus ownership. Chalk: the heavily owned picks. No public ownership data exist, so ownership is modelled and labelled 🧪.

A2. The Act bans online money games "whether based on skill, chance or both", so the skill-versus-chance argument lost its legal force. Analytically, a single-match ICC of 0.078 means one night is mostly luck; a season-long free league rewards small consistent edges.

A4. Decisions depend on shape: grand-league captaincy needs the upper tail, head-to-head may prefer a floor (Klaasen SD 33.1 against Rahul's 83.0 at the same 85.9 average), and contest optimisation needs the chance of clearing the field's 99th percentile.

A6. By-mean captaincy maximises expected total (head-to-head); by-upside suits top-heavy grand leagues. Over 2023–26 upside gained about 2 points per captain (90% interval −3 to +7).

A7. The top pick's estimate is biased up by selection: the mean rule's captain averaged 78.9 simulated against 69.9 real, so an 87-point forecast means about 78.

A9. The points are real, but ownership, leverage and percentiles are measured against a simulated field.

Part C — Code It

C1. Points by phase. Batting points split into a per-phase base (runs plus four and six bonuses) and a residual (milestones, strike-rate band, duck) shared pro rata to runs.

ln["bat_pts"] = fz.fantasy_points(ln, is_bowler=(ln["role"] == "BOWL").to_numpy(), breakdown=True)["batting"]
ph = balls_2026_no_wides.groupby(["match_id", "batter_id", "phase"]).agg(
    runs=("runs_batter", "sum"), fours=("is_four", "sum"), sixes=("is_six", "sum"))
ph["base"] = ph["runs"] + 4 * ph["fours"] + 6 * ph["sixes"]
alloc = base + (bat_pts - base.sum(1))[:, None] * run_share

Full code: appendices/code/i_answers.py (ch36_c1).

IPL 2026 batting player-matches: 1137; max |phase sum - batting points| = 0.000000
             name                        team  innings  bat_pts  powerplay  middle  death  death_pct
        JC Archer            Rajasthan Royals       10    108.0        0.0    25.4   82.6       76.5
         RK Singh       Kolkata Knight Riders       11    519.0        0.0   171.4  347.6       67.0
        DA Miller              Delhi Capitals       10    389.0        4.0   128.7  256.3       65.9
…

"Ten or more innings" lets in lower-order bowlers (Archer); filter on balls faced. Among batters, finishers lead. Death share measures where points come from, driven by batting position — not death skill.

C2. Is the simulator honest about Narine? A filter on the chapter's backtest cache (code/_cache/ipl_2026_backtest.parquet):

SP Narine (BOWL): 13 matches | below p10 0, above p90 0 | mean PIT 0.399 | sim mean 82.9 v actual 60.5
B Kumar (BOWL): 16 matches | below p10 1, above p90 6 | mean PIT 0.614 | sim mean 54.9 v actual 75.5

Full code: appendices/code/i_answers.py (ch36_c2). The cache holds 13 Narine matches (fewer than the exercise's 14–16). His band was wide enough but its centre too high; the forecast fell through the season (92.8 → 70.6) as 2026 data arrived. Bhuvneshwar's six top-tail misses are §36.4's bowler pattern: clustered wickets make independent-ball bands too narrow.

Part D — Judgement and format transfer

D1. Would this work in Tests? Three changes are unavoidable. Innings length: no ball cap, so Chapter 10's survival curves replace "out per ball with a cap". Two innings and early finishes: whether the fourth innings happens depends on the first three, so simulate the match as a sequence. Declarations and draws truncate batting and remove bowling chances; Chapter 29's session model, Chapter 33's declaration timing and Chapter 16's spells supply the frame. The ICC would be higher: it rises with balls faced or bowled per match, and a Test gives far more of both, so stable player differences make up more of single-match variance. Recompute with the platform's Test points values, which the chapter did not verify.

D3. Wendell's Chepauk spinner. The simulator's only venue-sensitive inputs are league par and player rates, so his view enters as adjustments: raise the spinner's p_wkt, lower his rpl, lower the opener's rpb against spin, perhaps give spin more overs. Rerun and see whether the spinner's mean or p90 overtakes the opener's — Wendell's knowledge inside the distribution. To test it, use a pitch label known pre-match and a backtest. Start from Chapter 22's venue effects (shrunk with k = 75 games to about −4 to +5 runs), estimate any spin adjustment only from earlier matches, and compare MAE and PIT for spinners and openers at "turning" venues with and without it. Expect a small effect at an ICC of 0.078. Pre-register the rule and log Wendell's calls before each match so they can be scored too.

D5. When would leverage work? Three conditions. (1) Tails must be right. §36.4 says they weren't: the 10–90 band held 77.0% (target 80%), bowlers' bands 73.2%, and top-scorer Brier 0.0393 barely beat uniform 0.0400 — so leverage chased noise in fringe players. Check: a flat PIT for the player types leverage favours, and P(top scorer) clearly beating uniform. (2) Ownership must be measured. Against our crowd model, the optimiser exploits the model's blind spots. Check: collect real post-lock ownership for a season and calibrate the crowd model, with results holding across β. (3) Large fields and top-heavy payouts. In small fields expected points win. Check: simulate the real contest size and payout table and confirm the contest-optimal lineup's expected percentile isn't far below the mean lineup's (§36.8: 56 against 67). Judge over hundreds of contests; four or five top-1% finishes are noise.


Chapter 37 — Broadcasting and Media Analytics

Exercises: Chapter 37 exercises · Chapter: Broadcasting and Media Analytics

Every Part B item has a worked answer in the chapter's <details> blocks.

Part A — Conceptual

A1. What happened: Rashid Khan 4–0–17–3. Compared with what: the rest of the match went at 11.17, so 4.25 was 0.38× the match rate. How unusual: 111 of 10,408 earlier IPL spells of 18+ balls were that far below their match (notability 1.97).

A2. The team analyst reviewing every over; the social graphic deliberately keeps one claim for a few-second viewer. They serve different readers.

A3. A WP swing belongs to a delivery; WPA to a player (sum of his swings). Kuldeep's −0.728 includes his last-ball run-out under the v0 non-striker convention — a bookkeeping story, not his cricket.

A4. Choosing the table per match chooses the story (Miller's six: 73-point cliff on the era table, 60-point step pooled); only a model fixed in advance has a published error and stays consistent across nights.

A5. Rahul has 61 balls against Rashid (weight 0.17 at k = 302) but 718 against leg-spin, which shrinks far less and describes a persistent tendency.

A6. storytelling.as_of(df, date) keeps rows strictly before the match. Harm ranking: betting/fantasy inputs (money staked on leaked backtests), pre-match WP/par graphics, then commentary stat packs (Rahul's season "593 runs" before a match in which he had 1 in 2 innings).

A7. A simulated wheel looks real and changes with the seed (Rahul's off-side share 16.3% under one, 34.8% under another), so the 🧪 label must sit on the image.

A8. Rarity multiplies, so on a log scale each tenfold step adds 1.0; a linear share can't separate 1 in 100 from 1 in 10,000.

A9. It blocks claims that assume complete records: "no earlier ninth-wicket stand reached 71" is true in the data, not a world record.

A10. The snapshot has no social-media data; you need your own analytics and a pre-registered A/B test sized with ab_sample_size.

Part C — Code It

C2. The haul fact. How many earlier IPL spells (18+ legal balls, completed non-D/L matches before the day) had at least as many wickets and were no more expensive?

hb = st._spells(st._match_frame(history)); hb = hb[hb["legal"] >= 18]
top = mb.sort_values(["wkts", "econ"], ascending=[False, True]).iloc[0]
k_rel = int(((hb["wkts"] >= top["wkts"]) & (hb["rel_econ"] <= top["rel_econ"])).sum())
fact_score = st.notability(k_rel, len(hb))

Full code: appendices/code/i_answers.py (ch37_c2).

B Kumar 4 for 23 off 24 legal balls (economy 5.75, 0.67 x rest of match)
  wickets >= and relative economy <=  :    96 of 10,746 earlier spells  notability 2.05
Rashid Khan 3 for 17 off 24 legal balls (economy 4.25, 0.38 x rest of match)
  wickets >= and economy <=           :   156 of 10,408 earlier spells  notability 1.82
  wickets >= and relative economy <=  :    37 of 10,408 earlier spells  notability 2.45
…

Bhuvneshwar Kumar's 4 for 23, which the Raipur notes missed, would now lead them. Relative economy is the fairer second condition; on GT v DC the haul and spell facts describe the same spell, so keep the haul version and state the rule in its pool string.

C6. ab_plan.

def ab_plan(p_base, lifts, n_available):
    rows = [{"lift": f"{l:.0%}", "needed per version": st.ab_sample_size(p_base, l),
             "powered at n": st.ab_sample_size(p_base, l) <= n_available} for l in lifts]
    return pd.DataFrame(rows), st.ab_mde(p_base, n_available)
HYPOTHETICAL INPUT: baseline share rate 2% is an assumed number, not a measurement.
lift  needed per version  powered at n
 10%               80682         False
 20%               21109         False
 50%                3826          True
Minimum detectable lift at 15,000 per version: 23.9%

With 15,000 viewers per version only lifts of about 24% or more are detectable: test a bolder change or pool posts, and never report a null as "no difference".

Part D and M — Judgement

D5. Eye test against data. A coach would add three things to "3 for 17 while the rest went at 11.17". Strengthen: if he bowled the middle overs to set batters on a flat pitch, relative economy understates it. Reframe: a top-edge to long-on and a ripping leg-break are both "a wicket" in the data. Weaken: if Delhi chose to see him off, part of the economy was their plan. Line: "Three for 17 on a night when everyone else went at more than eleven — about one spell in a hundred in IPL history has been that far below its match — and Delhi never got after him." The number gives the scale; the eye supplies the why.

M1 (with Chapter 6). Where Chapter 37 shrinks. Par: venue +4.9 raw shrunk to +3.1 (k = 54.8 matches). Matchup card: Rahul v leg-spin shrunk from 124.5 to 128.6 (k = 302); the 61-ball head-to-head is context only. Venue chase record: 8 of 19 with a Wilson interval of 23–64%, not a bare 42%. Projection: median with an 80% range. A/B: the minimum detectable lift. Notability: k floored at 1. In every case the unshrunk number is more dramatic and less likely to repeat.


Chapter 38 — Building a Cricket Analytics Career

Exercises: Chapter 38 exercises · Chapter: Building a Cricket Analytics Career

All ten Part B items have worked answers in the chapter.

Part A — Conceptual

A1. Before: matchups.py, batting.py, bowling.py, bowling_plan.py. During: live.py, explore.py. After: charts.py, impact.py/winprob.py. Season: projection.py, valuation_batting.py, auction.py.

A2. Performance analyst (inside a team), data journalist (published stories), trader/quant (pricing for a licensed operator), data scientist/engineer (models and pipelines). Titles mix them — read the duties.

A3. Matches (530 → 1,821) proxy demand, but staffing models differ (in-house, seasonal, tendered services) and part of the growth is recording (T20I status for all members from 2018), not work.

A4. Balls within an innings aren't independent; resampling innings keeps that dependence, while resampling balls gives intervals far too narrow.

A5. "99th percentile SR among the 86 batters with ≥300 balls in IPL 2025–26 and full-member men's T20Is 2025–26" — at a 1,000-ball minimum Suryavanshi drops out.

A6. 1 − 0.312 − 0.126 = 0.562 goes to the league average, via the constant 58.46 ≈ 0.562 × 104.7: regression to the mean.

A7. How many reports, who chose to report, and whether the group matches the role; salary sites also omit contract terms the verified adverts show.

A8. Three finished, reproducible pieces show you can deliver; thirty notebooks only show exploration.

A9. Leaking information, mishandling personal player data, and overclaiming — the 🧪 rule guards against the last.

A10. Analysis can be bought as a service with thresholds favouring providers, so joining or building a provider is another route in.

A11. Volunteered limits earn trust. Another: the report pools the IPL with full-member T20Is without a translation factor (Chapter 26) and ignores fielding and running.

Part C — Code It

C3. Carry-over for bowlers' economy. Season-adjusted economy = runs per over above par, with par the league's runs per legal ball in the same year and phase applied to the bowler's own balls.

b["par_r"] = b["par_rpb"] * b["legal"]
s = b.groupby(["bowler_id", "year"]).agg(balls=("legal", "sum"), runs=("rc", "sum"), par=("par_r", "sum"))
s["econ_adj"] = 6 * (s["runs"] - s["par"]) / s["balls"]
# keep >= 150 legal balls; join seasons N-1 and N-2 by bowler_id; OLS econ_adj ~ lag1 + lag2

Full code: appendices/code/i_answers.py (ch38_c3).

IPL bowlers, all three seasons >= 150 legal balls: n = 280 bowler-seasons, 74 bowlers, target seasons 2010-2026
lag1     0.358
lag2     0.305
R^2 0.254; residual SD 0.78 runs per over
Weight left for the league average: 1 - 0.358 - 0.305 = 0.337
Mean season-adjusted economy in the sample: -0.32 runs per over

Economy carries over far more than batters' SR+ (0.663 against 0.438 of the past two seasons), and the season before last matters almost as much as last — a stable skill with moderate noise, consistent with Chapter 25 (k ≈ 487 legal balls). The −0.32 mean is survivor selection.

C6. Teams × matches per team, men's T20 leagues, 2025 (ch38_c6).

league  matches  teams  matches_per_team  team_matches
   ntb      132     18              14.7           264
   ipl       74     10              14.8           148
   ilt       65      6              21.7           130
   bpl       48     11               8.7            96
…

Calendar years cut across seasons (the BPL's 11 "teams" are two seasons' sides), so group by season. Team-matches measure work, but staffing models decide jobs — eighteen counties may each employ analysts while a six-team league buys from one provider — and visas and networks matter more than volume.

Part D — Judgement

D2. Carry-over in Tests. Sample size argues larger: 1,000–2,000 balls a year measures a batter far better than 200–260 IPL balls, so reliability n/(n + k) rises. Changing conditions argue smaller: a home subcontinent year followed by SENA tours changes the difficulty of the balls faced (Chapter 10's visitor-difficulty index), real variation that doesn't repeat. Condition-adjust each season first, then expect a weight above the IPL's 0.312 — and check it on the data.

D5. Reusing the IPL coefficients for women's T20Is. No. The constant encodes IPL pars and a league-regular mean of about 104.7; women's T20Is have their own pars, a wider full-member/associate spread and more spin (51–54% of legal balls). A calendar year of T20Is holds far fewer balls than an IPL season, so the weight on last year should be smaller, and fixture lists change the opposition mix. Build it: SR+ against women's full-member pars by year and phase, full-member matches only (or a team-strength term), fit on batters with a stated minimum and report n and R². If too few qualify, pool with the WPL, WBBL and The Hundred (each against its own par), or use empirical-Bayes shrinkage with women's k (Chapter 11: 269 balls for strike rate). Never transplant the men's numbers.


Chapter 39 — Capstone: Your Cricket Analytics Platform

Exercises: Chapter 39 exercises · Chapter: Capstone: Your Cricket Analytics Platform

The exercises already give model answers to all of Part B, and pointers for A1, A3, A4, A9, C1–C7, D1–D3, D5 and E2. The open project work (C5, E1–E3 and your own dashboard as a whole) has no single answer key; instructors assess it with the Crease capstone rubric (Rubrics, §4).

Part A — Conceptual

A2. Layer 1, data and model functions (wp_model, match_centre_data, predictor, live_chain and the rest) compute and are cached. They must never read a widget or touch the screen, and never fit on data that includes the match being shown; they take plain arguments such as year or as_of so that the same arguments always give the same answer. Layer 2, figure builders (fig_wp, fig_matchup, fig_live_path …) turn computed results into a matplotlib figure. They must never load data or fit a model. Layer 3, page functions (page_match_centre …) arrange widgets and display what layers 1 and 2 return. They must never do analysis. A fourth "never" applies across layers: never mutate an object that st.cache_resource returned (that is why the dashboard builds a fresh predictor rather than calling Predictor.update on the cached one).

A6. A reproduction test asserts that the assembled platform still produces a number an earlier chapter published, given the same inputs. A smoke test asks "does it run?"; a reproduction test asks "is it the same?" The chapter's three: Bengaluru 0.865 at the innings break of the IPL 2026 final (Chapter 20, WP v1 fitted 2023–25), Gujarat 0.571 before the match with the announced team sheets and home advantage (Chapter 24), and Bengaluru's 0.154 title chance on the eve of IPL 2026 (Chapter 28). India's 0.465 on the eve of the 2026 men's T20 World Cup is a fourth.

A10. (1) Two Elo systems. WP v1 uses a plain walk-forward Elo inside each competition (K = 20, no home bonus, no pull towards the mean between seasons), which had Bengaluru 33 points ahead (1,612 v 1,579). The pre-match model uses the IPL's tuned Elo (K = 10, a 50-point home bonus, a 25% pull between seasons), which had the sides 6 points apart (1,535 v 1,541). (2) Home. The pre-match model's home term is worth about six points here (0.577 v 0.514); WP v1 has no home term. (3) Team sheets. The pre-match model sees who is playing; WP v1 sees only the score. The disagreement points to the assumption that matters most, home advantage at a final, which is why 39.6 recommends showing the range (about 51% to 58% for Gujarat) rather than one number.

Part C — Code It

C2. Bowlers' share of positive WPA. winprob.wpa sums by player and drops the team, so go one level down to impact.wpa_table, which keeps batting_team. A bowler plays for the other side.

mc = app.match_centre_data("ipl", "1535465")            # the dashboard's cached layer-1 call
teams = list(mc["curve"]["batting_team"].unique())
other = {teams[0]: teams[1], teams[1]: teams[0]}
bat = impact.wpa_table(mc["curve"], by="batter")
bat = bat[bat["batter"] != "extras"].assign(team=lambda t: t["batting_team"])
bowl = impact.wpa_table(mc["curve"], by="bowler")
bowl = bowl.assign(team=bowl["batting_team"].map(other))
pos = lambda t: t[t["wpa"] > 0].groupby("team")["wpa"].sum()
# bowl_share = bowl_wpa_pos / (bat_wpa_pos + bowl_wpa_pos)

Full code: appendices/code/i_answers.py (ch39_c2).

IPL 2026 final (WP v1 era-only, fitted 2023-25)
                       team  bat_wpa_pos  bowl_wpa_pos  bowl_share
             Gujarat Titans        0.002         0.008       0.847
Royal Challengers Bengaluru        0.161         0.334       0.676

WPL 2026 final (WP v1 fitted on women's T20 chases before 2026)
             Delhi Capitals        0.278         0.044       0.136
Royal Challengers Bengaluru        0.849         0.024       0.027

Bengaluru won both finals in opposite ways. In the IPL final two-thirds of their positive WPA (0.334 of 0.495) came from the ball: Rasikh Salam +0.112, Bhuvneshwar Kumar +0.105, Hazlewood +0.064 and Krunal Pandya +0.054 did their work while Gujarat batted and the match was still open, so by the time Kohli batted there was little probability left to add. In the WPL final 97% came from the bat, most of it Mandhana's +0.659, because that match was decided in the chase: Bengaluru began it at 0.302 on the women's model. Gujarat's row is a reminder of what WPA is: a side that was behind from the first ball and never caught up has almost no positive WPA to share, so its 0.847 is a large share of a tiny total.

C7. Reproduction tests. Pin the inputs (fitting window, freeze date, simulations, seed) as well as the answers, and mark the tests slow so the 3-second smoke suite stays fast. A sketch of project/tests/test_reproduce.py:

import sys
from pathlib import Path
import pytest
PROJECT = Path(__file__).resolve().parents[1]
sys.path[:0] = [str(PROJECT.parent / "toolkit"), str(PROJECT)]
import app
from crease.fielding import load_xis

TOL = 0.002      # the book prints three decimals; 0.002 allows rounding, not drift
GT, RCB, FINAL = "Gujarat Titans", "Royal Challengers Bengaluru", "1535465"

@pytest.mark.slow
def test_final_innings_break_wp():
    """Ch 20: WP v1 fitted on 2023-25 chases (app.wp_model's policy for 2026) gives RCB 0.865."""
    c = app.match_centre_data("ipl", FINAL)["curve"]
    row = c[(c["innings"] == 2) & (c["legal_before"] == 0)].iloc[0]
    assert abs((1 - row["wp_bat1"]) - 0.865) <= TOL

@pytest.mark.slow
def test_final_prematch():
    """Ch 24: pooled logit frozen on 31 May 2026, announced sheets, GT at home -> 0.571."""
    xi = load_xis("ipl"); xi = xi[xi["match_id"] == FINAL]
    p = app.predictor("ipl", "2026-05-31").predict_match(
        GT, RCB, home=GT, xi_a=xi.loc[xi["team"] == GT, "player_id"].tolist(),
        xi_b=xi.loc[xi["team"] == RCB, "player_id"].tolist())["p_a"]
    assert abs(p - 0.571) <= TOL

@pytest.mark.slow
def test_world_cup_2026_india():
    """Ch 28: 10,000 simulations, seed 28 (fixed inside app.world_cup_2026_sim)."""
    s = app.world_cup_2026_sim(n_sims=10000)["summary"].set_index("team")
    assert abs(s.loc["India", "p_title"] - 0.465) <= TOL

Run the fast suite with pytest project/tests -m "not slow" and everything with pytest project/tests (register the slow marker in a pytest.ini to silence the warning). The same three checks, run by ch39_c7 in appendices/code/i_answers.py:

PASS  RCB WP at innings break, IPL 2026 final (Ch 20): 0.8649 (book 0.865)
PASS  GT pre-match, announced sheets + home (Ch 24): 0.5715 (book 0.571)
PASS  India title, 2026 men's T20 World Cup eve (Ch 28): 0.4650 (book 0.465)

All three pass, in under a minute on a laptop. If one fails after a change, the failure names the chapter whose pipeline drifted.

Part D — Judgement

D4. Kohli and the WPA chart. "Virat Kohli's 75 not out off 42 was the innings of the final, and the scorecard rightly makes him player of the match: he took Bengaluru home without giving Gujarat a sniff, gaining 0.085 of a win and losing only 0.012. But a win-probability model shows where the final was decided, and it was earlier. Gujarat lost three wickets in their first eight overs, and Rasikh Salam's 3 for 27 (+0.112) and Bhuvneshwar Kumar's 2 for 29 (+0.105) left them on 155 in a league whose recent first innings had averaged 191.7. By the innings break Bengaluru were already 86.5% to win, so Kohli was finishing a job the bowlers had set up. Both things are true: the best innings, and not the biggest swing." (WPA measures contribution to winning given the state; the scorecard measures output. Neither is wrong, and the paragraph names the model.)


Chapter 40 — The Future of Cricket Analytics

Exercises: Chapter 40 exercises · Chapter: The Future of Cricket Analytics

The exercises already give model answers to A2, A3, A5, A6, A9, A10 and all of Part B.

Part A — Conceptual

A1. A confidence interval covers the average level (the line); a prediction interval adds season-to-season scatter, so it covers next season's actual value. A franchise faces one real season, so use the prediction interval — which still assumes the game stays the same game.

A4. Behaviour: IPL captains fielding first (55.2% in the first season → 82.4% in 2026); top-order batters' share of IPL overs (26.4% → 18.5%, Chapter 21). Composition: a "Pakistan home record" that includes UAE Tests (Chapter 6), or women's T20I aggregates that move with the share of associate matches.

A7. Pitch, line, speed, swing and spin (ball-tracking); shot direction (ball-tracking or coded video); fielding positions (player tracking or video); drops and misfields (hand-charting); running and workload (wearables, training logs).

A8. Compute first, write second, and check every number in the prose against a computed fact (C7 automates this).

Part C — Code It

C1. A two-segment model for IPL scoring. Same first-innings series as the chapter; pick the break year with the smallest residual sum of squares.

s = first_innings_by_year("ipl")["mean"]
for brk in range(2015, 2025):
    a, b = s[s.index < brk], s[s.index >= brk]
    rss[brk] = ((a - a.mean()) ** 2).sum() + ((b - b.mean()) ** 2).sum()

Full code: appendices/code/i_answers.py (ch40_c1).

2021    1423.4
2022     838.4
2023     627.7
2024     935.8
…
Chosen break: 2023 (second segment starts that season)
  seasons  n  mean
2008-2022 15 163.1
2023-2026  4 189.8
Pooled residual SD 6.1; 2027 if the second segment continues flat: 189.8 (90% prediction interval 178.0-201.6)

The data find 2023, the first Impact Player season, without being told, and the 189.8 plateau matches the chapter's scenario C. But a break chosen from ten candidates flatters the fit, and the second segment rests on four seasons: "continues flat" is an assumption.

C7. A grounding score. Numbers are matched only against facts about a subject named in the same sentence (integers exactly, rates within 0.005).

for sent in re.split(r"(?<=[.!?])\s+", text):
    cands = [f for f in facts if f[0].split()[-1] in sent] or facts
    for x in re.findall(r"\d[\d,]*\.?\d*", sent):
        n = float(x.replace(",", "").rstrip(".")); nums_all += 1
        if any(abs(n - v) <= tol for _, _, v in cands): matched += 1
        else: unmatched.append(n)

Full code: appendices/code/i_answers.py (ch40_c7).

Text: Royal Challengers Bengaluru made 161 to win the final. Virat Kohli made 75 not out off 44 balls, a strike rate of 178.57. Gujarat Titans had posted 158.
Grounding score 0.60; unmatched numbers: [44.0, 158.0]

Exactly the two planted errors are flagged. Limits: "75 balls" would pass because 75 matches his runs (parse units too), and the score can be gamed by writing fewer numbers (pair it with a coverage measure).

Part D — Judgement

D2. The "fatigue meter". "We'd recommend against it. The only public measure is match balls, which misses nets, training and domestic cricket: in the book's test 79.5% of weeks had no match balls, so 56.6% of bowling weeks looked like 'spikes' — gaps in the record, not the body. The workload–injury link is a contested association from full team records, and an on-screen health claim about a named player can harm contracts and selection. Show instead overs in this match and series, spell lengths against his usual (Chapter 16), and measured pace if you hold a tracking feed, labelled as speed, not fatigue. Leave fitness to the medical staff."

D3b. Toss decisions in Tests. In the IPL, fielding first spread while chasers won 54.7% whether they chose to chase or not — no edge. In Tests, toss winners won 54.2% of 729 decided matches (Chapter 22), but that concerns winning the toss, not the decision. The decision carries information only if captains can read conditions that change the value of batting first: deterioration (about 0.83–0.87 pitch-wear ratios in the subcontinent, Chapter 29) or a seaming first morning. Test it by comparing toss winners' win rates by decision within each conditions bucket against toss losers handed the same decision, controlling for strength with pre-match Elo (Chapter 24). Expect wide intervals and report them.