Case Study 1 — Thirty off Thirty: Rebuilding the 2024 Men's T20 World Cup Final

Setup

Kensington Oval, Barbados, 29 June 2024. India, batting first in the final of the Men's T20 World Cup, made 176 for 7. South Africa, chasing 177, reached the end of the 15th over on 147 for 4. Heinrich Klaasen had just taken 24 off an Axar Patel over. They needed 30 off 30 balls with six wickets in hand.

They lost by seven runs.

Every cricket fan has a view on that match — about pressure, about Jasprit Bumrah, about a famous catch on the boundary. This case study does something more modest and more useful for a beginner: it uses only the tools of Chapter 3 — find_matches, format_scorecard, over_by_over, filters, groupby and merge — to rebuild the match from its ball-by-ball record, and then asks one honest question of the wider data: how often do chasing sides in that position actually win?

The match is in the book's men's T20I data (t20s_male) with Cricsheet id 1415755. The full script is code/case_study_01.py.

The data

Two tables, loaded in one line each:

balls, games = load_deliveries("t20s_male"), load_matches("t20s_male")

find_matches confirms the match and its result:

match_id start_date team1        team2 winner  win_by_runs player_of_match
 1415755 2024-06-29 India South Africa  India          7.0         V Kohli

The scorecard's top half, from explore.scorecard():

India 176/7 (20 ov), extras 7
   batter                  how_out  runs  balls  fours  sixes
RG Sharma c H Klaasen b KA Maharaj     9      5      2      0
  V Kohli    c K Rabada b M Jansen    76     59      6      2
  RR Pant c Q de Kock b KA Maharaj     0      2      0      0
 SA Yadav   c H Klaasen b K Rabada     3      4      0      0
 AR Patel      run out (Q de Kock)    47     31      1      4
   S Dube   c DA Miller b A Nortje    27     16      3      1

South Africa 169/8 (20 ov), extras 9
      batter                          how_out  runs  balls  fours  sixes
RR Hendricks                      b JJ Bumrah     4      5      1      0
   Q de Kock c Kuldeep Yadav b Arshdeep Singh    39     31      4      1
  AK Markram       c RR Pant b Arshdeep Singh     4      5      1      0
    T Stubbs                       b AR Patel    31     21      3      1
   H Klaasen            c RR Pant b HH Pandya    52     27      2      5
   DA Miller           c SA Yadav b HH Pandya    21     17      1      1

India were 34 for 3 in the fifth over (the full fall of wickets, from format_scorecard: 1-23, 2-23, 3-34). Virat Kohli's 76 off 59 and Axar Patel's 47 off 31 rebuilt the innings to 106 before Axar was run out in the 14th over. Kohli was player of the match.

The bowling cards tell the other half. India's six bowlers:

  Bowling                 O  M    R  W   Econ
  Arshdeep Singh          4  0   20  2   5.00
  JJ Bumrah               4  0   18  2   4.50
  AR Patel                4  0   49  1  12.25
  Kuldeep Yadav           4  0   45  0  11.25
  HH Pandya               3  0   20  3   6.67
  RA Jadeja               1  0   12  0  12.00

Read those two blocks together and a split jumps out: the three seamers — Arshdeep, Bumrah, Hardik Pandya — bowled 11 overs for 58 runs and seven wickets. The two spinners bowled eight overs for 94 runs and one wicket, and Jadeja's single over cost 12. A team whose spinners went at more than eleven an over won a World Cup final. The rest of this case study is about how.

Analysis

Step 1: the chase, over by over

explore.over_by_over() gives runs and wickets per over with running totals. Three new columns — runs still needed, balls left, and the two run rates — are one line each, because pandas does arithmetic on whole columns:

ch = obo[obo["innings"] == 2].copy()
ch["need"] = target - ch["cum_runs"]
ch["balls_left"] = (20 - ch["over"]) * 6
ch["current_rr"] = (ch["cum_runs"] / ch["over"]).round(2)
ch["required_rr"] = (6 * ch["need"] / ch["balls_left"].where(ch["balls_left"] > 0)).round(2)

(.where(ch["balls_left"] > 0) turns the zero balls left after the 20th over into a missing value, so we never divide by zero — the same guard as Chapter 3's batting_strike_rate, in vectorised form.)

 over         bowler  runs  wickets  cum_runs  cum_wickets  need  balls_left  current_rr  required_rr
    1 Arshdeep Singh     6        0         6            0   171         114        6.00         9.00
    2      JJ Bumrah     5        1        11            1   166         108        5.50         9.22
    3 Arshdeep Singh     3        1        14            2   163         102        4.67         9.59
    4      JJ Bumrah     8        0        22            2   155          96        5.50         9.69
    5       AR Patel    10        0        32            2   145          90        6.40         9.67
    6  Kuldeep Yadav    10        0        42            2   135          84        7.00         9.64
    7       AR Patel     7        0        49            2   128          78        7.00         9.85
    8  Kuldeep Yadav    13        0        62            2   115          72        7.75         9.58
    9       AR Patel     9        1        71            3   106          66        7.89         9.64
   10      HH Pandya    10        0        81            3    96          60        8.10         9.60
   11      RA Jadeja    12        0        93            3    84          54        8.45         9.33
   12  Kuldeep Yadav     8        0       101            3    76          48        8.42         9.50
   13 Arshdeep Singh     8        1       109            4    68          42        8.38         9.71
   14  Kuldeep Yadav    14        0       123            4    54          36        8.79         9.00
   15       AR Patel    24        0       147            4    30          30        9.80         6.00
   16      JJ Bumrah     4        0       151            4    26          24        9.44         6.50
   17      HH Pandya     4        1       155            5    22          18        9.12         7.33
   18      JJ Bumrah     2        1       157            6    20          12        8.72        10.00
   19 Arshdeep Singh     4        0       161            6    16           6        8.47        16.00
   20      HH Pandya     8        2       169            8     8           0        8.45          NaN

South Africa's current run rate and required run rate through the chase in the 2024 T20 World Cup final

📊 Figure (described): Two lines across the 20 overs of South Africa's chase. The blue "run rate so far" line starts low (South Africa were 14 for 2 after three overs) and climbs steadily to 9.80 after the 15th over. The orange "required from here" line hovers between 9 and 10 for fourteen overs, then plunges to 6.00 after Axar Patel's 24-run 15th over — the moment the chase looked won — before shooting up to 10.00 after the 18th over and 16.00 after the 19th. The crossover and re-crossover of the two lines is the whole match in one picture.

For fourteen overs, the required rate barely moved: South Africa scored at roughly the rate they needed and lost wickets slowly. The 15th over changed everything — 24 runs, required rate down from 9.00 to 6.00. Then the last five overs went: 4, 4, 2, 4, 8. Twenty-two runs off 30 balls, four wickets.

Step 2: who bowled the last five overs?

A filter and the toolkit's bowling_summary answer it:

last5 = balls[(balls["match_id"] == MID) & (balls["innings"] == 2) & (balls["over"] >= 16)]
print(bowling_summary(last5)[["balls", "runs", "wickets", "dots", "economy"]])
                balls  runs  wickets  dots  economy
bowler                                             
HH Pandya          12    10        3     6      5.0
JJ Bumrah          12     6        1     7      3.0
Arshdeep Singh      6     4        0     3      4.0

Bumrah's two death overs cost six runs, with seven dot balls out of twelve. Hardik Pandya's two cost ten and took three wickets — Klaasen with the first ball of the 17th over, and David Miller and Kagiso Rabada in the 20th. Arshdeep's 19th went for four. Sixteen of the 30 balls were dots.

And Klaasen, by phase, from batting_summary(..., by=["batter", "phase"]):

                  runs  balls  strike_rate
batter    phase                           
H Klaasen middle    49     22       222.73
          death      3      5        60.00

Forty-nine off 22 in the middle overs, three off five at the death before he was caught by Rishabh Pant off Pandya. The batter who had taken the game away from India was gone at the start of the end.

Step 3: how often do chasers win from there?

Here is where the data earns its keep. A fan's instinct says "30 off 30 with six wickets is a near-certainty". Is it? We can count. The function in code/case_study_01.py, state_after_15, uses only Chapter 3 tools:

  1. Filter the matches table to games with a winner, no D/L revision, and 20 overs a side.
  2. Group the deliveries by match to get the first-innings total, and the second innings' runs and wickets after 15 overs.
  3. Keep only chases that reached the 16th over (so we are looking at the same decision point).
  4. Merge with the matches table to get the winner, and compare it to the chasing team.
similar = s[s["need"].between(25, 35) & (s["wkts15"] <= 4)]
Men's T20Is: chases that reached the 16th over with a result (no D/L): 2650
  needing 25-35 off 30 with at most 4 down: 270 chases, won 251 (93.0%)
  needing exactly 30 at 4 down: 5 chases, won 4
          size   mean
band                 
(24, 28]   106  0.943
(28, 31]    74  0.932
(31, 35]    90  0.911

IPL: chases that reached the 16th over with a result (no D/L): 1110
  needing 25-35 off 30 with at most 4 down: 137 chases, won 131 (95.6%)
  needing exactly 30 at 4 down: 4 chases, won 4
          size   mean
band                 
(24, 28]    50  1.000
(28, 31]    36  0.917
(31, 35]    51  0.941

In all men's T20Is in the data, chasing sides that reached the 16th over needing 25–35 with no more than four wickets down won 251 of 270 times — 93.0%. In the IPL, 131 of 137, 95.6%. Of the five men's T20I chases that stood at exactly 30 needed off 30 with four down, four were won. The fifth is this match.

What it means (and doesn't)

What it means. South Africa's defeat was rare — a position that chasing sides in the data convert more than nine times in ten. That is a fact computed from 270 comparable chases, not a feeling, and it is exactly the kind of fact that pandas gives a beginner in twenty lines: filter, group, merge, compare. It also reframes the story. India's last five overs — 22 runs conceded, 16 dots, four wickets — were not just "good death bowling"; they were the kind of five overs that happens in about one chase in fourteen from that position (19 of 270).

What it doesn't mean.

  • It is not a win-probability model. We used a crude "similar situation" filter — a band of 25–35 runs and a wicket cut-off — and treated every chase in the band as equal. The bands mix very different chases: different venues, eras, team strengths, and associate-nation matches alongside full-member ones (the men's T20I data includes them all). Within the band, the win rate falls from 94.3% for 25–28 needed to 91.1% for 32–35, so the exact position matters. Chapter 9 builds a proper lookup table and Chapter 20 a calibrated model; this case study is the beginner's version of their first step.
  • It is not a judgement on the players. "93% of chases were won from here" does not mean South Africa "choked" with 93% certainty. It means the event was unusual. Unusual events happen — in a sport with thousands of chases, a 7% outcome should occur dozens of times. Theme 6 of the book: variance is not failure.
  • The data cannot tell you the most famous moment. Miller's dismissal, first ball of the 20th over, appears in our data as c SA Yadav b HH Pandya. Anyone who watched knows it was a catch taken on the boundary rope, and that a few inches either way it was six runs and a different final. Cricsheet records the outcome — caught, by whom — not the location. This is the gap Wendell keeps pointing at.
  • Small cells. "Exactly 30 needed at four down" has five chases in men's T20Is and four in the IPL. You should never quote a percentage from a cell that small without the count beside it. "4 of 5" is honest; "80%" is not.

A last observation, and the reason this match is a good beginner's case study: the numbers that decided the final are not exotic. They are economy, dots, runs per over and a win rate from a filtered table — all things you can now compute. What made them powerful was putting them in order (the over-by-over table) and in context (the 270 similar chases).

Discussion questions

  1. India's two front-line spinners, Axar Patel and Kuldeep Yadav, conceded 94 runs in eight overs and India still won. Using the over-by-over table, identify the two overs in which South Africa scored most, and say whether a captain should have done anything differently. What would you need to know that the data does not contain?
  2. Our "similar chases" filter used runs needed and wickets lost. Name two other things about a chase after 15 overs that would change your estimate, and say whether each is in the toolkit's columns.
  3. The win rate in the IPL band (95.6%) is higher than in men's T20Is (93.0%). Suggest two reasons, and say how you could test one of them with a filter.
  4. Is it fair to call a defeat from a 93%-won position a "choke"? Write the strongest argument for and against, using the numbers.
  5. The batting card shows Klaasen at 52 off 27. The phase split shows 49 off 22 in the middle and 3 off 5 at the death. Which version would you put on a broadcast graphic, and why?

Your turn

Pick another men's T20 World Cup final in the data — find them with find_matches(games[games["event_name"].fillna("").str.contains("World Cup")], stage="Final") and choose one of the full-member finals (2021 Dubai or 2022 Melbourne, or the 2026 final in Ahmedabad). For that match:

  1. Print the scorecard and the over-by-over chase table with need, balls_left and both run rates.
  2. Identify the over after which the required rate was lowest, and the chasing side's state at that moment.
  3. Run state_after_15 (or adapt it to a different over) and report how often chasers in that state won — with counts, not just percentages.
  4. Write 200 words: was the result a surprise, and what did the data not see?