Case Study 1 — The Take-Home Task: "Find Us a Death Bowler" (SA20, 2023–2026)

Setup

Take-home tasks are the most common written test in analytics hiring, and they share a shape. You get a public dataset, one cricket question, a deadline (usually two to seven days), and an instruction like "no more than two pages and one figure". The organisation is testing three things at once. Can you answer the question? Do you know what the data can't support? Can someone who doesn't code read your answer?

Here's a brief of exactly that kind, set by us, for a fictional SA20 side. No real franchise asked this question.

"We're short of a death bowler for next season. Using public ball-by-ball data for the SA20 (2023–2026), rank the bowlers who have bowled at the death (overs 16–20) on how hard they are to score off. Tell us who's genuinely good and who's had a lucky few overs. Two pages, one chart, code attached."

Nusrat took the brief as practice. This case study follows her through it, including the point where her first approach broke.

The data

The SA20 has been played four times in the book's data snapshot (the 2022/23 to 2025/26 seasons). In the death overs that adds up to:

SA20 2023-2026 death overs: 5,858 legal balls, 122 matches, league economy 9.88
SA20 bowlers with >= 60 death balls: 32

Economy here is the book's standard bowling definition: runs charged to the bowler (wides and no-balls included; byes, leg-byes and penalty runs excluded) per six legal balls. To count people rather than spellings, we pin every bowler by Cricsheet registry id before calling the toolkit's bowling_summary, the same trick the chapter's scouting report uses.

Thirty-two bowlers with at least 60 death balls (ten overs) is a usable list. But most of them have bowled between 60 and 160 death balls across four seasons, which is the small-sample territory where, as Chapter 6 showed, a handful of overs can make anyone look brilliant or hopeless.

Analysis

Step 1: the first attempt, and why it failed

Nusrat's first move was the right idea: shrink each bowler's economy toward the league's death economy, with a strength k (in balls) estimated from the data. The method is Chapter 6's. Split the observed spread of bowlers' economies into noise (what pure chance would produce, given each bowler's number of balls) and signal (what's left). Then set k = noise variance per ball ÷ signal variance.

On the SA20 alone, with the usual minimum of 120 death balls per bowler for estimating the spread, it gave this:

(SA20 alone would give 9 cells and k = 82: too few to trust)

Nine bowlers. You can't estimate the spread of true talent from nine data points, any more than you can estimate a batter's true strike rate from nine balls. The estimate of k would swing wildly if one bowler had one bad night. This is the moment that separates a good take-home from a weak one. A weak answer uses the number anyway. A good answer notices it can't be trusted and finds more evidence.

Step 2: borrow strength from other leagues

Death bowling is a similar skill in every men's T20 league, even though the leagues' scoring levels differ. So we estimate k across all eleven men's T20 competitions in the snapshot from 2023 to 2026, centring each bowler's economy on his own league's average first, so that a high-scoring league doesn't look like bad bowling:

def fit_k(d, by, min_balls):
    """Signal/noise split of economy across bowler-cells with >= min_balls; k = noise / signal."""
    t = bowling_summary(d, by=by)
    t = t[t["balls"] >= min_balls]
    sigma2 = noise_per_ball(d)
    noise = (sigma2 / t["balls"]).mean()
    lg = t.groupby(level="competition")["economy"].transform("mean")
    obs = (t["economy"] - lg).var()
    tau2 = obs - noise
    return {"cells": len(t), "sd_obs": np.sqrt(obs), "sd_noise": np.sqrt(noise),
            "sd_signal": np.sqrt(max(tau2, 0)), "k": sigma2 / tau2 if tau2 > 0 else np.nan}
Pooled men's T20 leagues 2023-2026, death overs: 91,312 legal balls; 227 bowler-league cells >= 120 balls
  SD of economy (league-centred) 1.22 = noise SD 0.84 + signal SD 0.89  ->  k = 158 balls
  Stability, same bowler same league, 2023-24 vs 2025-26 (>= 60 balls each): n = 124, r = 0.44

Read the decomposition as a sentence. Among death bowlers with at least twenty overs in a league, economies spread with a standard deviation of 1.22 runs per over. Pure chance alone would produce about 0.84 of that, and real differences between bowlers account for about 0.89. (Variances add, not standard deviations: 0.84² + 0.89² ≈ 1.22².) Skill and luck are roughly equal partners at this sample size. That's why k = 158 balls, a little over 26 overs: a bowler needs about 26 death overs before his own record counts for as much as the league average does in our estimate.

The stability check agrees. The same bowler's death economy in the same league correlates at r = 0.44 between 2023–24 and 2025–26. That's real but modest, about what you'd expect when one half-period is typically 60 to 150 balls.

Step 3: the ranking

With k = 158, each SA20 bowler's shrunk economy is (balls × own economy + 158 × 9.88) ÷ (balls + 158), with a 90% interval from the same normal model:

Top 12 by shrunk death economy:
            name  balls  runs  wickets  economy  econ_shrunk  lo90  hi90  dot_pct  boundary_pct  wkts_per_24  rank_raw  rank_shrunk
        A Nortje    152   151       16     5.96         7.96  6.91  9.00    51.97         13.82         2.53         1            1
Mujeeb Ur Rahman    143   178        9     7.47         8.73  7.67  9.79    41.26         12.59         1.51         3            2
      RJ Gleeson    159   215       16     8.11         8.99  7.96 10.02    38.99         15.72         2.42         4            3
        M Jansen    270   389       24     8.64         9.10  8.21  9.99    41.11         19.63         2.13         6            4
         CJ Dala     66    82       12     7.45         9.16  7.93 10.39    45.45         15.15         4.36         2            5
      Noor Ahmad     72   103        3     8.58         9.47  8.26 10.69    34.72         19.44         1.00         5            6
    OEG Baartman    261   404       30     9.29         9.51  8.61 10.41    36.40         19.54         2.76         8            7
      GC Viljoen    158   247       16     9.38         9.63  8.60 10.66    34.81         18.99         2.43         9            8
       N Mokoena     60    92        7     9.20         9.69  8.45 10.94    41.67         20.00         2.80         7            9
        TA Boult     96   151        5     9.44         9.71  8.56 10.87    23.96         16.67         1.25        10           10
     Rashid Khan     72   114        4     9.50         9.76  8.55 10.97    36.11         19.44         1.33        11           11
       AU Rashid     70   113        7     9.69         9.82  8.60 11.04    40.00         21.43         2.40        12           12

Rank changes raw -> shrunk: median 1, max 3 (CJ Dala: raw rank 2 -> 5)
Bowlers whose 90% interval overlaps the leader's: 17 of 31

SA20 death bowlers, raw and shrunk economy

📊 Figure (described): For the 15 SA20 bowlers with the best shrunk death economy (minimum 60 death balls, 2023–2026), an orange dot marks raw economy and a blue diamond the shrunk economy, joined by a grey line, with balls bowled labelled. A dashed vertical line marks the league death economy, 9.88. Anrich Nortje's raw 5.96 shrinks to 7.96 and stays first. CJ Dala's raw 7.45 on only 66 balls shrinks to 9.16, falling from second to fifth. Bowlers with more balls (Marco Jansen 270, Ottneil Baartman 261) move least. The takeaway: shrinkage reorders the list modestly but changes how confident each placing is.

What it means (and doesn't)

What the data supports. Anrich Nortje is the best single bet on this evidence. His raw economy of 5.96 over 152 balls is nearly four runs an over below the league, and even after heavy shrinkage (to 7.96) his interval's upper end (9.00) sits below the league average of 9.88. He also has the highest dot-ball percentage on the list (52.0%) and the lowest boundary rate among the leaders (13.8%), so it isn't a few lucky wickets keeping the runs down. He took 16 wickets in those 152 balls as well. Marco Jansen is the most reliable second option. His 270 balls are the biggest sample in the top tier, and his interval (8.21–9.99) is the narrowest. Mujeeb Ur Rahman, a spinner, sits second after shrinkage on 143 balls, which is unusual enough at the death to deserve a look at when in the death overs he bowled.

What the data doesn't support. A confident ordering. Seventeen of the other 31 bowlers have 90% intervals that overlap Nortje's. Overlapping intervals are a conservative test, but the message is clear: the data says Nortje is very probably better than the league average, and the most likely of anyone to be the best, but it can't rule out that half the list is roughly as good. Below the top two or three, the order is mostly noise on four seasons of SA20 data. CJ Dala (as Cricsheet names him) illustrates it. Twelve wickets and an economy of 7.45 on 66 balls looks like a find, and his raw rank was second, but 66 balls is eleven overs. Shrinkage moves him to fifth, with an interval running from 7.93 to 10.39. He's a name to watch, not a signing to build a plan around.

What the data can't see. Economy at the death depends on whom you bowl to and when. An over at 19.1 against a set finisher is harder than one at 16.1 against a new batter. The ranking doesn't adjust for batter quality or for the over within the death phase, and a full answer would add both (the context features of Chapter 14's expected-wickets model are a start). Cricsheet also records no lengths or speeds. Whether Nortje's numbers come from yorkers, pace or slower balls is a video question. And none of this says anything about fitness, availability, or what he'd cost, which the brief didn't ask about and the write-up should mention anyway.

How Nusrat wrote it up (first paragraph): "On four seasons of public SA20 data, our best single bet at the death is Anrich Nortje (economy 5.96 on 152 death balls, 7.96 after adjusting for sample size, 90% range 6.9–9.0 against a league average of 9.88). Marco Jansen is the most reliable second option, on the largest sample. Beyond that the data can't rank bowlers with confidence: 17 of the other 31 have ranges overlapping Nortje's, so the choice among them should rest on video, matchups and price. Our sample-size adjustment borrows strength from all men's T20 leagues, because the SA20 alone is too small to estimate how much death economy is skill."

That paragraph is the whole answer. The second page is for the method and the limits.

Discussion questions

  1. The brief asked for "how hard they are to score off". Is economy the right single metric for that, or would boundary percentage be better? Chapter 14 found death economy correlates 0.94 with boundary % but −0.51 with dot %. What does that suggest?
  2. Pooling across leagues assumes the spread of true death-bowling skill is similar in every league, even if the average differs. When might that be wrong? (Think about a league with many associate or domestic-only players.)
  3. Nusrat dropped bowlers below 60 death balls. A franchise might care most about exactly those bowlers, the ones the market hasn't priced yet. How would you present a bowler with 30 death balls honestly?
  4. How would the ranking change if the side's home ground were unusually high-scoring? Which tool from Chapter 22 would you use?
  5. The brief said "code attached". What would you check before attaching it, so a reviewer can run it in five minutes?

Your turn

Rebuild this take-home for The Hundred, men's or women's competition (load_deliveries("hnd"), filtered by gender). The Hundred is ball-based, so its "death" phase is balls 76–100 and the book's phase column already encodes it. Estimate k honestly: decide whether The Hundred alone has enough bowlers, and if it doesn't, choose a pooled set of competitions and justify the choice in one sentence. Produce the same table, the same figure, and a one-paragraph answer that starts with the decision.