Chapter 10 Exercises — Batting in Test Cricket

Difficulty legend: ⭐ recall and explain · ⭐⭐ calculate and interpret · ⭐⭐⭐ build, extend or judge · ⭐⭐⭐⭐ open-ended research.

All real-player numbers come from the chapter's scripts run on the book's data snapshot (Cricsheet men's Tests, December 2001 – October 2026). The one exercise that uses invented numbers (D7) says so. Remember that "career" in this chapter means career within the snapshot: Test coverage is thin before about 2006, so batters who debuted earlier have partial records here.

Work through Part A before anything else; if you can't answer A1, A3 and A5 in your own words, re-read §10.1, §10.7 and §10.6 respectively. Parts B and C reuse the chapter's real outputs, so you can check your arithmetic against the text. Part D has no single right answer; a good answer uses numbers from the chapter, names a limitation, and says what extra data would change the conclusion.

Code exercises assume you're in the chapter directory with the toolkit and project/crease/ importable, as in code/01_test_currency.py. Selected answers are in Appendix I.


Part A — Conceptual ⭐

A1. Write the identity linking batting average, balls per dismissal and strike rate. Explain in two sentences why, in Test cricket, the first factor carries most of the information, while in T20 cricket the second does.

A2. Explain the difference between conversion % as this book defines it (hundreds ÷ fifty-plus scores) and the "hundreds ÷ fifties" ratio you sometimes see. Which one can exceed 100%? Which is a probability?

A3. The chapter calls a not-out innings censored in survival analysis. Explain what is censored, why treating not-outs as dismissals biases P(lasting 100 balls) downwards, and why simply deleting them biases it upwards.

A4. Cricsheet has no session labels. Name the two "clocks" the chapter used instead, and give one cricket question each clock can answer that the other can't.

A5. Why does the chapter split the over-of-innings hazard into "new" (fewer than 30 balls faced) and "set" batters before reading the second-new-ball effect? What would go wrong without the split?

A6. A pundit says a batter "averages 81 in wins and 27 in losses, so he wins matches for his side". Using the language of Chapter 4, explain the flaw in one paragraph.

A7. What does the visitor difficulty index hold constant that the raw "home top order v visiting top order" comparison does not? What does it still fail to separate?

A8. The beta-binomial prior for conversion is "worth 56 fifty-plus scores". Explain to a cricket fan with no statistics what that means for how we should read a batter with 25 fifty-plus scores and a conversion of 48%.

A9. The Cox model's concordance is 0.532. Is the model useless? Explain what a concordance near 0.5 means here, and what the hazard ratios are still good for.

A10. The chapter found "no nervous nineties": the dismissal risk per ball is 1.17% on scores of 90–99 against 1.29% on 80–89. A former player replies, "Rubbish, I was terrified in the nineties." Give two reasons both statements can be true at once. (Think about who reaches the nineties, and what the batter does in them, given that SR rises from 59.1 to 65.6.)

A11. Explain why the chapter defines "average against pace" using only dismissals credited to a bowler of that type. What would go wrong if run-outs were included, and why does that make the numbers slightly larger than the batter's overall average?


Part B — Calculation & Interpretation ⭐⭐

B1. Cheteshwar Pujara's Test record in the snapshot: 7,160 runs, 16,165 balls, 164 outs. Compute his average, strike rate and balls per dismissal, and check that the identity from A1 holds.

Answer

Average = 7,160 ÷ 164 = 43.66. SR = 100 × 7,160 ÷ 16,165 = 44.29. Balls per dismissal = 16,165 ÷ 164 = 98.6. Check: 98.6 × 0.4429 = 43.66. ✔

B2. Joe Root has 41 hundreds from 110 fifty-plus scores. The conversion prior is Beta(a = 18.9, b = 37.3). Compute his raw conversion and his shrunk conversion (s + a) ÷ (n + a + b). How much did shrinkage move him, and why so little?

Answer

Raw = 41 ÷ 110 = 37.3%. Shrunk = (41 + 18.9) ÷ (110 + 56.2) = 59.9 ÷ 166.2 = 36.0% (the chapter's table, with unrounded prior values, shows 36.1%). It moved only about 1.2 points, because 110 chances is about twice the prior's strength (56) and his raw rate is already close to the pool rate (33.7%).

B3. From the milestone ladder for positions 1–7: 56.2% of innings that reach 50 go on to 75, and 60.8% of those that reach 75 go on to 100. Compute the implied P(100 | 50) and compare it with the pool conversion rate (33.7%). What does the comparison suggest about whether conversion is a special skill?

Answer

0.562 × 0.608 = 0.342, or 34.2%, almost exactly the pool rate. The 50-to-100 journey behaves like two ordinary rungs of a survival ladder, so there's no extra "conversion" hurdle at 100 in the aggregate. Conversion mostly reflects the same survival skill that drives average.

B4. The visitor difficulty index for South Africa is based on 30,539 actual runs against 37,907 expected. For New Zealand it is 31,297 against 29,999. Compute both indices and write one sentence about each.

Answer

South Africa: 100 × 30,539 ÷ 37,907 = 80.6, so visiting batters made about 19% fewer runs per dismissal than they did on other tours. New Zealand: 100 × 31,297 ÷ 29,999 = 104.3, so visitors did slightly better than on their other tours.

B5. Set batters (30+ balls faced) at positions 1–7 face 156,503 balls in overs 61–80 with a hazard of 1.133%, and 56,270 balls in overs 81–90 with a hazard of 1.516%. Compute balls per dismissal in each block and the percentage increase in risk.

Answer

Overs 61–80: 100 ÷ 1.133 = 88.3 balls per dismissal. Overs 81–90: 100 ÷ 1.516 = 66.0. Risk rises by (1.516 − 1.133) ÷ 1.133 = 33.8%, about a third more dismissals per ball once the second new ball is available.

B6. The Cox model gives hazard ratios of 1.091 for batting away and 1.275 for the fourth innings. (a) What is the combined hazard ratio for a fourth-innings away batter, assuming the effects multiply? (b) If a home first-innings batter's per-ball dismissal risk is 1.2%, what is the corresponding risk for the away fourth-innings batter, and the balls per dismissal for each?

Answer

(a) 1.091 × 1.275 = 1.391. (b) 1.2% × 1.391 = 1.67% per ball. Balls per dismissal: 100 ÷ 1.2 = 83 against 100 ÷ 1.67 = 60. That is roughly the gap between a first-innings and a fourth-innings top-order batter in the chapter's raw table (78.9 against 60.7).

B7. Steve Smith: naive share of innings reaching 100 balls = 0.313; Kaplan–Meier P(≥100) = 0.358; 18 not-outs below 100 balls; 227 innings. Explain the 4.5-point difference using the not-outs. Would the gap be bigger or smaller for a batter who often bats at No. 7?

Answer

The naive share counts the 18 short not-outs as failures to reach 100 balls. Kaplan–Meier keeps them in the denominator only while they were batting, then removes them without recording a dismissal, so the estimated survival is higher. A No. 7 batter is left not out (often running out of partners) more often, so the gap between naive and Kaplan–Meier would usually be bigger.

B8. Mominul Haque averages 47.27 at home and 26.15 away; the median home–away gap among 133 qualifying batters is 5.69. In one paragraph, say how unusual Mominul is, and name two non-skill explanations you'd want to rule out before calling him a "home-track batter".

Answer

His gap of 21.12 is about four times the median and among the six largest of the 133. Non-skill explanations: (1) schedule: Bangladesh's away Tests include many in the hardest countries to tour (the visitor index puts South Africa, Australia, India and England below 94), while home Tests are against every visitor; (2) small samples: 69 away innings is enough for a real signal but leaves an average with a wide interval. Batting position and role changes across his career are a third possibility to check.

B9. The pace–spin split for top-order batters by state:

State Type Average Balls per dismissal Share of that state's balls
New (<30 faced) pace 29.55 61.1 71.2%
New (<30 faced) spin 32.38 66.4 28.8%
Set (30+ faced) pace 38.82 72.6 55.2%
Set (30+ faced) spin 47.13 88.0 44.8%

(a) Compute the spin-minus-pace gap in average for new and for set batters. (b) Explain why the overall "average against spin" is inflated relative to a like-for-like comparison. (c) A batter's raw split is 45 against pace and 60 against spin. Without more data, what can you say about how much of that gap is "being good against spin"?

Answer

(a) New: 32.38 − 29.55 = 2.83. Set: 47.13 − 38.82 = 8.31. (b) Spin bowls a much larger share of its balls to set batters (who average more against everything), while pace gets most of the new-batter balls. The raw pace–spin comparison mixes batter state with bowler type. (c) Very little. Some of the 15-run gap is expected from the timing of spin alone. You'd need the batter's split by state (or by over of the innings) to judge, and then shrinkage, because the spin dismissals are usually the smaller sample.

B10. England's top order (positions 1–7), from the chapter's second case study:

Window Innings Average SR Balls per dismissal
Jan 2018 – May 2022 694 31.11 48.1 64.7
Jun 2022 – Oct 2026 650 39.13 71.6 54.7

Check that each row satisfies average ≈ balls per dismissal × SR ÷ 100. Then decompose the change in average: how much would the average have changed if only SR had changed (holding balls per dismissal at 64.7), and if only balls per dismissal had changed (holding SR at 48.1)?

Answer

Before: 64.7 × 0.481 = 31.1 ✔. After: 54.7 × 0.716 = 39.2 ✔ (rounding). SR only: 64.7 × 0.716 = 46.3 (+15.2). Survival only: 54.7 × 0.481 = 26.3 (−4.8). The faster scoring more than paid for the shorter innings: the 8.0-run actual rise is the +15.2 from tempo minus about 4.8 from survival, plus an interaction term (about −2.4).


Part C — Code It ⭐⭐–⭐⭐⭐

C1. Build this metric — "time-adjusted balls per dismissal" (⭐⭐). Using tb.era_baseline(inns), compute every batter's relative balls per dismissal: their balls per dismissal divided by the ball-weighted era baseline (base_bpd), mirroring relative_average. Write it as a function relative_bpd(inns, player, baseline). Output: a table for all batters with 80+ innings at positions 1–7, sorted descending, with columns bpd, era_bpd, relative_bpd. Does anyone overtake Chanderpaul?

C2. Analyze this match (⭐⭐). Pick any Test in the snapshot that ended in a draw with the side batting fourth losing 7 or more wickets. (Hint: build all fourth innings, keep result == "drawn", count wickets.) For the drawing side, produce a table of each batter's balls faced and runs, and a worm of the innings using the code in case_study_01.py. Output: the table, one figure, and two sentences on who "saved" the match in balls.

C3. Evaluate this player (⭐⭐). Write start_set_profile(balls, inns, batter) that returns the batter's hazard in balls 0–19, 20–49 and 50+ faced, with counts. Run it for Babar Azam, Shubman Gill, Dimuth Karunaratne (FDM Karunaratne) and Dean Elgar (D Elgar). Output: a 4 × 3 table of hazards and a sentence about which batter is the most "dangerous to bowl to once set".

C4. Evaluate this player (⭐⭐⭐). Split Virat Kohli's Test record by calendar year using career_card(inns[inns.batter == "V Kohli"], by="year"). Plot average and balls per dismissal by year, with innings counts annotated. Then choose a split point before looking at the plot (write it in a comment), and test whether average differs across the split using a permutation test on per-innings runs and outs (shuffle the era labels 5,000 times, random_state=10). Output: the plot, the observed difference and the permutation p-value. Write three sentences on what the split shows and why choosing it in advance matters.

C5. Predict this match (⭐⭐⭐). Using km_summary, build a simple fourth-innings "survival need" calculator. Given a batting side's top-six batters, estimate for each batter P(lasting at least n balls) for n = 60, 120, 180, using only their fourth-innings Kaplan–Meier curve if they have 15+ fourth innings and their all-innings curve otherwise. Apply it to Pakistan's top six at Karachi in March 2022 using only innings before that match (filter start_date < "2022-03-12"). Output: a 6 × 3 table and one paragraph on whether the data would have predicted Babar's 425 balls (hint: it wouldn't, and that's the point of theme 6).

C6. Settle this debate (⭐⭐⭐). The "nervous nineties" result used all top-order batters. Repeat hazard_by_score for (a) openers only (position 1–2), (b) positions 5–7, and (c) the fourth innings only. Output: three hazard curves on one figure (10-run bins, 0–150), with the 90–99 bin highlighted. Is there any subgroup in which the nineties hazard is higher than the eighties?

C7. Optimize this strategy (⭐⭐⭐). Use hazard_by_over to estimate, for set batters, the extra dismissals per 60 balls caused by the second new ball (overs 81–90 against overs 61–80). Then estimate the cost in runs using the chapter's top-order average. Output: a short paragraph advising a captain whether to take the second new ball immediately, with the numbers. Note what the data can't tell you (when the ball was actually taken, its condition).

C8. Build this metric — a home-adjusted average (⭐⭐⭐). Write conditions_adjusted_average(inns, player) that re-weights a batter's average to a neutral schedule: compute their average in each host-country cell, shrink each cell toward their overall average with a normal–normal shrinkage of strength k = 10 dismissals (crease.uncertainty.shrink_normal), and then average the cells using the league's overall share of top-order dismissals by host country as weights. Run it for the five batters in the debate plus Mushfiqur Rahim and Babar Azam. Output: a table with raw average, adjusted average and the change. Who gains and who loses from a neutral schedule?

Expected shape: seven rows; columns raw_avg, adj_avg, change. Check that the adjusted average of a batter who played everywhere in league proportions barely moves.

C9. Analyze this match — the Delhi rearguard (⭐⭐). For the Delhi Test of December 2015 (match id 903609), compute South Africa's fourth-innings dismissal hazard per ball in 20-over blocks, separately for set and new batters, and compare with the league curve from hazard_by_over. Output: a small table and a two-line figure. Did South Africa's rearguard collapse at a time the league curve would predict (the second new ball after 80 overs), or somewhere else? Use the fall-of-wickets list (crease.explore.fall_of_wickets) to support your answer.


Part D — Judgment & Format Transfer ⭐⭐⭐

D1. Would balls per dismissal be a useful headline metric for a T20 batter? Use the identity from A1 and Chapter 5's binding-constraint idea to argue your answer, and say what metric you'd lead with instead.

D2. Does "conversion" have a sensible ODI analogue? Define one (e.g. 50 → 100 in ODIs, or 30 → 60 in T20Is), say what it would measure, and predict whether it would be more or less reliable than the Test version. Justify the prediction with sample sizes.

D3. Eye test vs data. Imran Qureshi argues that the visitor index treats every English Test as the same trip, when a June morning under cloud with a new Dukes ball is "a different sport" from a dry August afternoon. Design a study using only Cricsheet data (start dates and venues) that would partly test his claim, and say clearly which part of his claim no Cricsheet study could test.

D4. Case Study 2 shows England's top order scoring faster but lasting fewer balls after June 2022, while winning a higher share of matches. Write a 200-word argument for and against the claim "England's approach made their batters better". Use at least four numbers from the case study.

D5. The debate card ranks Labuschagne fifth of five on every weighting. Write a paragraph that is fair to him, using his era-relative rank (21st of 70) and at least one split from the chapter where he looks strong, and explain why "fifth of these five" and "a fine Test batter" are both true.

D6. Format transfer — survival curves in ODIs. Kaplan–Meier is used in this chapter for Tests. In ODIs, an innings can also end because the 50 overs run out. Is a not-out at the end of the 50th over "censored" in the same sense as a Test not-out? Argue whether Kaplan–Meier P(lasting 60 balls) is a meaningful ODI statistic for an opener, and for a No. 6.

D7. The selector's brief. A national selector has to choose one of two batters for a tour of South Africa (visitor index 80.6, the hardest in the data). Batter X: career average 44, home 52, away 36, average against pace in SENA conditions 31 from 18 dismissals. Batter Y: career average 39, home 40, away 38, average against pace in SENA 37 from 41 dismissals. Using this chapter's framework (§10.9), write the 150-word note you'd send to the selector, including what you'd want shrunk and what extra information you'd ask for. (These two batters are hypothetical; the numbers are invented for the exercise, not drawn from the data.)


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

M1. Chapters 6 + 10 (⭐⭐). Chapter 6 introduced split-half reliability. The chapter found conversion's half-vs-half r = 0.28 and average's 0.44 across 94 batters. Use the Spearman–Brown formula 2r ÷ (1 + r) to compute full-career reliabilities, and explain what fraction of the observed spread in each is noise.

M2. Chapters 5 + 10 (⭐⭐). Chapter 5 reported that half of top-order Test innings end within 41 balls (2016 onward, full-member matches, positions 1–4). This chapter's Kaplan–Meier median for positions 1–4 over the whole snapshot is 45 balls. Give two reasons the two numbers differ, using §10.1's era baseline as one of them.

M3. Chapters 8 + 10 (⭐⭐⭐). Chapter 8 built boundary and dot-ball metrics for white-ball cricket. Compute dot % and boundary-ball % for the five batters in this chapter's debate using batting_summary on Test deliveries. Does the batter with the highest strike rate (Root) get there through fewer dots or more boundaries? Output a 5 × 4 table (SR, dot %, boundary-ball %, boundary-run %).

M4. Chapters 9 + 10 (⭐⭐⭐). Chapter 9 defined value as change in win probability. Sketch (in words and pseudocode, no full model needed) how you'd measure the value of Babar Azam's 425 balls at Karachi in a three-result format, where the "win probability" of the fourth innings is really a draw probability for Pakistan. What state variables would the model need that a T20 model doesn't?

M5. Chapters 4 + 10 (⭐⭐). Chapter 4 showed not-out inflation for white-ball finishers. Using career_card, find the batter with 80+ Test innings and the highest not-out percentage. Compute their average and their runs per innings, and their Kaplan–Meier median balls. Which of the three numbers best describes their value?

M6. Chapters 7 + 10 (⭐⭐). Use the chart functions from Chapter 7 (crease.charts.worm and crease.charts.partnership_bars) to draw the fourth innings of the Karachi Test of March 2022 (Pakistan v Australia, start date 2022-03-12). Annotate the point at which Pakistan's batters had used half of the 171.4 overs, and the score at that point. Which partnership consumed the most balls?


Part E — Research & Extension ⭐⭐⭐⭐

E1. The first Test of a tour. Test Imran's claim from the chapter's Eye test: visiting batters do worst in the first Test of a series. Define series from the data (consecutive Tests between the same two teams in the same host country within, say, 60 days), label each Test's position in its series, and compute the visitor difficulty index separately for first Tests and later Tests. Report the samples and an honest interval (bootstrap by series). Write it up as a two-page note.

E2. Women's multi-day cricket. The snapshot contains no women's Tests. Identify where ball-by-ball data for women's Tests could be obtained (describe the sources honestly; don't assume one exists), and design the analysis you would run: which of this chapter's metrics would transfer, which would be unreliable with so few matches, and how you'd borrow strength from women's ODI batting to stabilise them.

E3. A survival model with batter random effects. The Cox model in §10.7 treats all top-order batters as interchangeable apart from context. Extend it with a batter-level term: either a stratified Cox model (strata=["batter"] in lifelines) or a two-step approach that shrinks each batter's hazard toward the pool before adding context. Compare concordance with the chapter's 0.532, and discuss whether "who is batting" or "the context" explains more of the innings length.