Midterm Examination — Parts I–III (Chapters 1–18)
Coverage: Part I (Chapters 1–7), Part II (Chapters 8–13) and Part III (Chapters 14–18).
Time: 2 hours. Total: 100 points.
| Section | Content | Points |
|---|---|---|
| A | Multiple choice: 15 questions × 2 points | 30 |
| B | Short answer: 6 questions × 5 points | 30 |
| C | Data question, using real numbers from the book | 20 |
| D | Short coding task | 20 |
Instructions for students. Calculators are allowed. Section D can be done on a lab machine with the book's data, or on paper; on paper, write the code you would run and the output you expect. Every number in this paper is from the book's data snapshot (Cricsheet, downloaded 18 November 2026). State the format and the sample size whenever you make a comparison.
Instructor notes. Answer keys are in collapsible blocks. For a no-code version (coaching or journalism courses), replace Section D with two extra Section B questions and reweight Section C to 40 points. Section C can be done entirely from the printed numbers and needs no code.
Section A — Multiple choice (30 points)
Choose one answer for each question.
A1. In the book's definitions, a batter's balls faced are:
a) all deliveries while the batter was on strike, including wides b) deliveries faced as striker, excluding wides; no-balls count c) legal deliveries only, so both wides and no-balls are excluded d) deliveries faced as striker or non-striker
A2. The first over of the 2026 IPL final had six legal balls and three wides. How many rows does it occupy in the deliveries table?
a) 6 b) 7 c) 9 d) 12
A3. In T20 cricket, the book's "death" phase is:
a) overs 15–20 b) overs 16–20 c) overs 17–20 d) the last 30 balls faced by the batting side, whenever the innings ends
A4. MS Dhoni was not out in 41.32% of his IPL innings. By roughly what factor does that inflate his batting average relative to his runs per innings?
a) 1.41 b) 1.59 c) 1.70 d) 2.41
A5. Among 76 men who played all three formats, which pair of measures moves together most strongly?
a) Test average and T20I strike rate b) ODI strike rate and T20I strike rate c) Test bowling average and T20I economy d) Test average and ODI strike rate
A6. Chapter 6 estimates that IPL strike rate needs about 98 balls before it is "half signal". Using r(n) = n / (n + k), what is the reliability of a strike rate built on 98 balls?
a) 0.25 b) 0.50 c) 0.75 d) 0.98
A7. About what share of the spread in IPL team-season win records does Chapter 6 attribute to luck?
a) 30% b) 59% c) 75% d) 92%
A8. After 15 overs at Newlands in January 2017, Sri Lanka's chase looked level with South Africa's innings on one chart, but the other showed them scoring at 7.73 an over while needing 10.80. Which chart showed the second picture?
a) The worm b) The Manhattan c) The run-rate chart d) The partnership bars
A9. In Chapter 8's analysis of IPL season-to-season repeatability, which batting measure repeated least?
a) Strike rate b) Batting average c) Boundary-run percentage d) Dot percentage
A10. At Newlands, who had the largest win-probability added on the field, by Chapter 9's WP v0 model?
a) Niroshan Dickwella (player of the match), batting b) Seekkuge Prasanna, batting c) Imran Tahir, bowling d) Asela Gunaratne, batting
A11. In men's Tests, the per-ball dismissal risk on scores of 90–99 is 1.17%, against 1.29% on 80–89. What does this suggest?
a) Batters are more nervous in the nineties b) There is no evidence of "nervous nineties" in this data c) Batters in the nineties face weaker bowling d) The difference proves batters play more carefully in the nineties
A12. In Chapter 11's out-of-sample test of batter–bowler matchups (lower error is better), raw head-to-head records scored 404, ignoring matchups 220, and shrunk matchups 208. Which conclusion is right?
a) Raw matchups are the best predictor because they are the most specific b) Matchups carry no information at all c) Raw matchups are worse than ignoring them; shrunk toward the bowler's type, they help a little d) Shrinkage and ignoring matchups are equivalent
A13. The often-quoted claim that the best IPL death bowlers exceed 30% dot balls is misleading because:
a) almost no death bowler reaches 30% b) 57.4% of 68 regular IPL death bowlers clear 30%, so it is ordinary c) dot balls are not recorded at the death d) the claim applies only to Test cricket
A14. In Chapter 15, an LBW model built on the simulated tracking layer scored an AUC of 0.823. When the dismissal labels were shuffled before simulating, it scored 0.503. What does this show?
a) The model is excellent and robust b) The model's skill came from the simulation having been told which balls were LBWs c) Real Hawk-Eye data would give an AUC of 0.503 d) LBWs cannot be predicted at all
A15. Chapter 16's model of men's Tests found that each extra ten dot balls faced by the striker comes with an odds ratio of 0.848 for a wicket on the next ball. In plain words:
a) Dots build pressure that brings wickets b) Dots come with slightly lower odds of a wicket next ball; their value is the runs they cost c) Dots have no relationship with wickets d) The model is wrong because it ignores the bowler
Answer key — Section A
| Q | Answer | Explanation |
|---|---|---|
| A1 | b | Wides don't count as balls faced; no-balls do. (Bowling balls, by contrast, are legal deliveries only.) |
| A2 | c | Nine rows: every delivery is a row, legal or not. Counting rows as balls is the classic Chapter 2 error. |
| A3 | b | T20 phases are 1–6, 7–15 and 16–20 (1-based overs). |
| A4 | c | 1 ÷ (1 − 0.4132) ≈ 1.70. His average is 38.30 against 22.48 runs per innings. |
| A5 | b | ODI and T20I strike rates correlate at ρ = 0.80; Test average and T20I strike rate at ρ = −0.01. |
| A6 | b | 98 / (98 + 98) = 0.50. That's what "half signal" means. |
| A7 | d | About 92% in the IPL; among men's full-member T20I sides, about 59%. |
| A8 | c | The worm shows cumulative runs at each over; the run-rate chart compares current and required rates. |
| A9 | b | Batting average repeated least (r 0.209), boundary-run % most (0.572) on Chapter 8's filter. |
| A10 | c | Imran Tahir's bowling, +0.525. Prasanna +0.504, Gunaratne +0.377, Dickwella +0.157. |
| A11 | b | Risk is lower on 90–99 than on 80–89. (d) overclaims: the data shows the pattern, not the mechanism. |
| A12 | c | Raw matchups are mostly noise; shrinking them toward the type record gives a small gain. |
| A13 | b | What separates the best death bowlers is boundaries conceded. |
| A14 | b | The placebo test: a coin-flip AUC once the layer is conditioned on fake dismissals. |
| A15 | b | Dots matter because they cost runs, not because they summon wickets. |
Section B — Short answer (30 points)
Answer each in 4–8 sentences.
B1. Selection on the outcome (5 points). Rohit Sharma's ODI average in the Cricsheet data is 58.46 in matches India won (171 innings) and 36.01 in matches they lost (96 innings). A commentator says this proves he is "a big-match player who wins games". Explain what is wrong with the inference, and use one further number from Chapter 4 to support your answer.
Model answer
The split conditions on the result, and the result partly depends on Rohit's own score. When an opener scores heavily, his team is more likely to win, so his runs are sorted into "wins" because they helped cause the wins. Almost every batter shows the same pattern: on Chapter 4's filter, 102 of 103 ODI batters average more in wins. And Rohit's win/loss ratio (58.46 ÷ 36.01 ≈ 1.62) is below the median of 1.74. So the split doesn't single him out. A better question reverses the direction: given Rohit's score band, how often did India win? Chapter 4 shows India winning 54.4% of the time when he is out for under 10 and 76.5% when he makes a hundred: a real 22-point association, far calmer than the "58.46 against 36.01" story. That measures how much his scoring is associated with winning, which is the question the commentator meant to ask.
Marking: 2 points for identifying selection on the outcome / reverse causation; 2 for a supporting number (102 of 103, or 1.62 below 1.74); 1 for proposing a better question or method.
B2. Anchor B and its caveats (5 points). At the 2025 mega auction, Rishabh Pant cost ₹27 crore and Aniket Verma ₹30 lakh (base price). In IPL 2025's middle overs, Pant scored 141 off 108 balls with 8 dismissals (runs above replacement −28.5) and Verma 139 off 82 with 4 dismissals (+26.5). What does this pair show about the IPL auction, and what two caveats must always accompany it?
Model answer
It shows that price and phase-specific value can diverge sharply. The market paid about ninety times as much for the batter who, in that season's middle overs, cost his side runs against a replacement-level batter, while the cheap batter added them. The pair was found by a systematic search rather than picked by hand, and the gap survives a venue adjustment. That's evidence that the auction can be an exploitable market (Theme 4).
Caveats: (1) it did not persist: in 2026 Verma made 16 off 21 balls in the middle overs; and (2) Pant was the better death-overs batter in both seasons, so a franchise pays for more than one phase. The deeper lesson is about small samples: 82 and 108 balls are well short of the balls a strike rate needs before it is mostly signal.
Marking: 2 for the market-inefficiency point; 1 each for the two caveats; 1 for connecting to sample size.
B3. Three sports (5 points). Chapter 5 estimates the cost of one extra wicket on a side's final total as about 5.3 runs at 10 overs in a men's T20I, 19.1 runs at 25 overs in an ODI, and 42.8 runs at 40 overs of a Test first innings. Explain why the cost differs so much, and what it implies for comparing a bowler's economy across formats.
Model answer
The scarce resource differs. In T20, balls run out long before wickets: only 16.3% of men's T20I innings are all out, so losing a wicket costs a little batting depth but rarely ends the innings early. In Tests, 72.8% of innings end all out, so a wicket removes a large share of the runs the innings would otherwise have made, and with no over limit there is plenty of time to make them. ODIs sit between. For bowlers, the exchange rate between runs and wickets changes with format. In T20, economy (runs per over) carries most of the value. In Tests, taking wickets matters far more than saving runs, which is why Chapter 16 uses average × strike rate. Comparing raw economy across formats ignores this exchange rate.
Marking: 2 for "wickets scarce in Tests, balls scarce in T20" with a supporting figure; 2 for the implication for bowling metrics; 1 for clarity.
B4. Names, ids and withheld data (5 points). A student's write-up says: "Rashid Khan's T20 career in the data: 500 wickets in 392 matches at an economy of 6.90." Identify two problems with this sentence and say how the student should have handled each.
Model answer
(1) It is not his career. Cricsheet withholds Afghanistan's men's internationals, so Rashid appears in
the data only through the franchise leagues (plus one World XI T20I). The figure must be labelled "in the
franchise leagues in the data", with the gap stated. (2) Name collisions. There are three different
"Rashid Khan"s in men's T20Is. Any cross-competition aggregate by name risks merging people. The student
should pin the player by registry id: group by bowler_id, or use cricdata.only_player(balls, "Rashid
Khan"), which is how Chapter 2 arrived at its figure.
Marking: 2½ points per problem (identification plus fix).
B5. Simulated data (5 points). Chapter 14 built two expected-wickets models for IPL bowling: one using only match context (out-of-fold AUC 0.617) and one adding simulated tracking columns (AUC 0.648). A classmate says the second model is better and should be used to rate bowlers. Respond.
Model answer
The extra skill is leakage from the simulator, not information about bowling. The simulated locations are
drawn conditioned on the real outcome: a real bowled or LBW is more likely to be given a full, straight
simulated location. A model that uses those columns partly reads the answer back. Chapter 15's placebo
test shows the same thing (AUC 0.823 falls to 0.503 with shuffled labels). The simulated layer is for
learning the method. No sim_ number is a fact about a real player, so the model can't rate real
bowlers. With a real Hawk-Eye feed, a tracking-based xW model could add genuine information, and it would
have to be validated the same way.
Marking: 2 for "leakage from outcome-conditioned simulation"; 1 for the rule that sim_ numbers aren't
facts; 1 for the placebo or audit idea; 1 for what real tracking data would change.
B6. Eye test against data (5 points). Wendell Baptiste, a former first-class seamer, says: "In a Test, you build pressure with dots and the wicket comes." Using one result from Part III, give the data's response, then give one thing Wendell might see that the outcome data cannot.
Model answer
Chapter 16 controlled for batter quality, time at the crease, the new ball and bowling type in men's Tests, and found that ten more dots faced by the striker come with an odds ratio of 0.848 for a wicket next ball: slightly lower, not higher. Dots matter because they cost the batting side runs, which counts when they need runs, not because they summon wickets. Wendell can see things the data can't: the line and length of those dots, whether the batter is playing and missing or leaving comfortably, a change of plan, a tiring bowler, footmarks. Cricsheet records outcomes, not how close a ball came to taking a wicket. A good answer integrates both, for example: "dots alone don't raise the odds, but a spell of play-and-misses might, and the data can't see the difference."
Marking: 2 for the 0.848 result correctly interpreted; 2 for a specific thing the data cannot see; 1 for integration rather than dismissal of either side.
Section C — Data question (20 points)
Chapter 4 prints these IPL career figures (Cricsheet, 2008–2026) for Jasprit Bumrah and Ravichandran Ashwin, by phase. Balls are legal deliveries; runs are runs conceded.
| Bowler | Phase | Balls | Runs | Economy |
|---|---|---|---|---|
| JJ Bumrah | Powerplay (1–6) | 1,266 | 1,465 | 6.94 |
| JJ Bumrah | Middle (7–15) | 942 | 1,033 | 6.58 |
| JJ Bumrah | Death (16–20) | 1,423 | 1,943 | 8.19 |
| R Ashwin | Powerplay (1–6) | 1,252 | 1,480 | 7.09 |
| R Ashwin | Middle (7–15) | 2,857 | 3,347 | 7.03 |
| R Ashwin | Death (16–20) | 601 | 825 | 8.24 |
Both have taken 187 IPL wickets in the data.
C1 (4 points). Compute each bowler's overall economy from the table. Show your working.
C2 (4 points). Compute the share of each bowler's balls bowled at the death and in the middle overs.
C3 (5 points). Bumrah is cheaper than Ashwin in every phase. Explain why his overall economy is nevertheless higher, and name the phenomenon.
C4 (4 points). Compute Bumrah's economy if he had bowled Ashwin's phase mix (that is, weight Bumrah's phase economies by Ashwin's phase shares). What does the result tell a selector?
C5 (3 points). Chapter 4's fix is economy against a season-and-phase par: Bumrah −1.57 runs per over, Ashwin −0.80. In one or two sentences, explain why this measure is fairer than raw economy, and one thing it still leaves out.
Answer key — Section C
C1. Economy = 6 × runs ÷ balls. - Bumrah: balls 1,266 + 942 + 1,423 = 3,631; runs 1,465 + 1,033 + 1,943 = 4,441; 6 × 4,441 ÷ 3,631 = 7.34. - Ashwin: balls 1,252 + 2,857 + 601 = 4,710; runs 1,480 + 3,347 + 825 = 5,652; 6 × 5,652 ÷ 4,710 = 7.20.
(2 points each: 1 for totals, 1 for the economy.)
C2. - Bumrah: death 1,423 ÷ 3,631 = 39.2%; middle 942 ÷ 3,631 = 25.9% (powerplay 34.9%). - Ashwin: death 601 ÷ 4,710 = 12.8%; middle 2,857 ÷ 4,710 = 60.7% (powerplay 26.6%).
(1 point per correct share.)
C3. Simpson's paradox. An overall rate is a weighted average of the phase rates, weighted by each bowler's own phase mix. Bumrah bowled 39.2% of his balls in the most expensive phase (the death); Ashwin bowled 60.7% of his in the cheapest (the middle overs). Being cheaper in every phase can't overcome carrying about three times the weight on the expensive phase. The pooled comparison reverses because the two bowlers were given very different jobs.
(2 for naming and defining the paradox; 2 for the weighted-average mechanism with the shares; 1 for "role, not skill".)
C4. Using Bumrah's phase economies (6.94, 6.58, 8.19) and Ashwin's shares (0.266, 0.607, 0.128): 0.266 × 6.94 + 0.607 × 6.58 + 0.128 × 8.19 ≈ 1.85 + 3.99 + 1.05 ≈ 6.88 (about 6.88–6.89 depending on rounding), against Ashwin's actual 7.20. On the same job, Bumrah would be about 0.3 runs an over cheaper. For a selector: compare bowlers on a common phase mix (standardisation) or against phase par, never on raw career economy. And the answer to "who is better?" depends on which overs you need bowled.
(2 for the calculation; 2 for the interpretation.)
C5. Par compares each over with what the league conceded in the same phase and season, so death overs and high-scoring seasons no longer count against the bowler who was given them. It still leaves out wickets (economy ignores them; Chapter 4 prices a T20 wicket at about 6 runs at halfway), the quality of batters faced, venues and conditions, and the uncertainty in each estimate.
(2 for why it is fairer; 1 for a valid omission.)
Section D — Short coding task (20 points)
Use the book's toolkit. You may consult Appendix A and Appendix B.
D1 — Find the bugs (8 points). A classmate wrote this to rank IPL batters by death-overs strike rate:
import pandas as pd
from cricdata import load_deliveries
ipl = load_deliveries("ipl")
death = ipl[ipl["over"] > 16]
g = death.groupby("batter")
table = pd.DataFrame({"runs": g["runs_total"].sum(), "balls": g.size()})
table["sr"] = 100 * table["runs"] / table["balls"]
print(table.sort_values("sr", ascending=False).head(10))
Identify four problems, and for each say what it does to the result. (The over column is 1-based.)
D2 — Write it properly (12 points). Write a short script that:
- loads IPL deliveries and computes career batting figures by phase with
batting_summary; - prints Virat Kohli's (
V Kohli) and Suryakumar Yadav's (SA Yadav) runs, balls, outs and strike rate in each phase; - ranks IPL batters by death-overs strike rate among those with at least 500 death-overs balls, and prints the top five;
- prints the reliability r = n / (n + 98) of Kohli's and Suryakumar's death-overs strike rates, using Chapter 6's k ≈ 98.
Then write two sentences: does the data support the claim that Suryakumar is the better IPL death-overs batter?
Answer key — Section D
D1 (2 points per problem, any four):
1. over > 16 drops over 16. The death is overs 16–20, so this needs >= 16, or better, use the
phase column (ipl["phase"] == "death").
2. runs_total includes extras. Wides, no-ball extras, byes and leg-byes are credited to the batter,
inflating runs. Batting runs are runs_batter.
3. g.size() counts every row, including wides. Balls faced exclude wides, so balls are overstated
(deflating strike rate). Combined with problem 2 the errors partly offset, which makes them harder to
spot.
4. No minimum sample. Batters with a handful of death balls top the table. Chapter 6: a strike rate on
20 balls is mostly noise.
5. (Also acceptable) Grouping by name, not batter_id, risks merging people who share a name, and
super-over rows are not excluded. The toolkit's batting_summary handles wides, runs off the bat and
super overs correctly.
D2 (reference solution):
import sys
from pathlib import Path
BOOK = Path(__file__).resolve().parents[3] # adjust to where you save the script
sys.path.insert(0, str(BOOK / "toolkit"))
from cricdata import load_deliveries, batting_summary
ipl = load_deliveries("ipl")
by_phase = batting_summary(ipl, by=["batter", "phase"])
print(by_phase.loc[["V Kohli", "SA Yadav"], ["runs", "balls", "outs", "strike_rate"]])
death = batting_summary(ipl[ipl["phase"] == "death"])
top = death[death["balls"] >= 500].sort_values("strike_rate", ascending=False)
print(top[["runs", "balls", "outs", "strike_rate"]].head(5))
k = 98
for name in ["V Kohli", "SA Yadav"]:
n = death.loc[name, "balls"]
print(name, n, round(n / (n + k), 3))
Expected output (book's snapshot):
runs balls outs strike_rate
batter phase
V Kohli middle 4286 3407 95 125.80
powerplay 3477 2684 76 129.55
death 1573 835 60 188.38
SA Yadav middle 2730 1894 70 144.14
powerplay 1017 721 22 141.05
death 834 468 44 178.21
runs balls outs strike_rate
batter
AB de Villiers 1868 838 42 222.91
RR Pant 1095 540 43 202.78
AD Russell 1432 731 58 195.90
V Kohli 1573 835 60 188.38
RG Sharma 1527 843 62 181.14
V Kohli 835 0.895
SA Yadav 468 0.827
Interpretation: No. On career IPL numbers Kohli's death-overs strike rate (188.38 off 835 balls) is higher than Suryakumar's (178.21 off 468), and both samples are large enough to be mostly signal (reliability about 0.89 and 0.83). The popular story is backwards. The real gap is in the middle overs, where Suryakumar scores at 144.14 against Kohli's 125.80. A strong answer adds context: Kohli usually reaches the death as a set opener, while Suryakumar often arrives earlier, so neither raw figure is a fully fair comparison. Chapter 8's season- and phase-adjusted SR+ keeps the same order (Kohli 120.5, Suryakumar 110.7).
Marking D2: correct use of batting_summary with phase (3); Kohli/Suryakumar table (3); filtered top
five (3); reliability (1); interpretation with sample sizes (2). Accept equivalent code. Award full marks
for paper answers whose code would produce this output.
After the exam
Use the results diagnostically. Weak scores on A6, A7, B2 and D2's reliability line point to Chapter 6, the most important chapter in the book. Revisit it before Part IV, which leans on shrinkage throughout. Weak scores on B4, B5 and A14 point to data provenance (withheld data, name collisions, simulated layers). See Common Struggles for fixes.