Case Study 1 — The IPL 2026 Final, Rebuilt Ball by Ball

Format: T20 (men's franchise) · Data: Cricsheet match 1535465 · Code: code/case_study_01.py, code/02_parse_and_cache.py

Setup

On 31 May 2026, Royal Challengers Bengaluru beat Gujarat Titans by five wickets in the IPL final at the Narendra Modi Stadium in Ahmedabad, chasing 156 with two overs to spare. Virat Kohli finished on 75 not out from 42 balls and was named player of the match.

That paragraph is what a newspaper prints. This case study asks a different question: if all you had were the 233 rows of the ball-by-ball table, how much of the match's story could you reconstruct — and where would the rows mislead you if you weren't careful? It is the chapter's toolkit put to work on a single match, the scale at which coaches, broadcasters and fans actually think.

Kavya Subramanian, who builds match graphics for The Long Room, puts the stakes plainly: "On a final night I've got maybe ninety seconds of airtime for a graphic. If the over-by-over numbers are off by one wide, someone on social media will have the scorecard open and will tell the whole internet." Every number below is computed, not typed in.

The data

The match has 233 delivery rows: 124 in Gujarat's innings and 109 in Bengaluru's. From code/02_parse_and_cache.py:

Innings totals:
                                     runs  wickets  legal_balls  deliveries overs
innings batting_team                                                             
1       Gujarat Titans                155        8          120         124  20.0
2       Royal Challengers Bengaluru   161        5          108         109  18.0

Four of Gujarat's deliveries and one of Bengaluru's were not legal balls. Across both innings the final had 5 wides, no no-balls, no byes and 2 leg-byes. The rows record the first over as nine deliveries for six legal balls — the opening example of Chapter 2.

We need three tools from the chapter: groupby on over to build an over-by-over table, cumsum() (a cumulative sum — the running total, row by row) to build the score after each over and at each wicket, and the toolkit's phase column to split each innings into powerplay, middle and death.

f = balls[(balls["match_id"] == "1535465") & ~balls["super_over"]].sort_values("delivery_seq")
per_over = (f.groupby(["innings", "batting_team", "over"])
            .agg(runs=("runs_total", "sum"), wickets=("is_wicket", "sum"),
                 deliveries=("runs_total", "size"), legal=("is_legal", "sum"))
            .reset_index())
per_over["cum_runs"] = per_over.groupby("innings")["runs"].cumsum()

Sorting by delivery_seq first matters: a running total is only meaningful in the order things happened.

Analysis

Over by over

         runs       wickets      cum_runs       
innings     1     2       1    2        1      2
over                                            
1        13.0   5.0     0.0  0.0     13.0    5.0
2         5.0  18.0     0.0  0.0     18.0   23.0
3         6.0  13.0     1.0  0.0     24.0   36.0
4         6.0  19.0     1.0  0.0     30.0   55.0
5         9.0   8.0     0.0  1.0     39.0   63.0
6         6.0   7.0     0.0  1.0     45.0   70.0
7         5.0  11.0     0.0  0.0     50.0   81.0
8         5.0   7.0     1.0  0.0     55.0   88.0
9         4.0   3.0     0.0  2.0     59.0   91.0
10        4.0   9.0     0.0  0.0     63.0  100.0
11        4.0   9.0     0.0  0.0     67.0  109.0
12        6.0   7.0     0.0  0.0     73.0  116.0
13       10.0  10.0     1.0  0.0     83.0  126.0
14       16.0   6.0     0.0  1.0     99.0  132.0
15        6.0   7.0     1.0  0.0    105.0  139.0
16       10.0   6.0     0.0  0.0    115.0  145.0
17        6.0   3.0     1.0  0.0    121.0  148.0
18       16.0  13.0     0.0  0.0    137.0  161.0
19        8.0           1.0         145.0       
20       10.0           1.0         155.0       

(The blank cells in overs 19–20 for innings 2 are real: the chase ended in the 18th over. pandas' pivot leaves them missing; the script prints them as blanks.)

Manhattan chart of runs per over for both innings of the IPL 2026 final, with wicket markers

📊 Figure (described): A paired bar chart of runs per over for Gujarat Titans (blue) and Royal Challengers Bengaluru (orange) across 20 overs, with black triangles marking wickets and grey bands marking the powerplay (overs 1–6) and death (16–20). Bengaluru's bars tower over Gujarat's in overs 2–4 (18, 13 and 19 runs against 5, 6 and 6). The takeaway: the chase was effectively won in the powerplay, and Bengaluru could afford a quiet middle and death.

The phase story

Phase splits:
                                       runs  wickets  legal  run_rate
batting_team                phase                                    
Gujarat Titans              powerplay    45        2     36      7.50
                            middle       60        3     54      6.67
                            death        50        3     30     10.00
Royal Challengers Bengaluru powerplay    70        2     36     11.67
                            middle       69        3     54      7.67
                            death        22        0     18      7.33

The final was decided in the first six overs. Gujarat scored 45 for 2 in the powerplay; Bengaluru scored 70 for 2. That 25-run gap is larger than the 6-run margin by which Bengaluru's total exceeded Gujarat's — they won the powerplay by more than they needed and then managed the rest. Gujarat's middle overs, 60 runs off 54 balls at 6.67 an over, left them needing a big finish; their death overs (50 off 30) were good but not enough to repair it.

Put the powerplay in the chaser's terms. After six overs Bengaluru were 70 for 2, needing 86 more from 84 balls — a required rate of 6 × 86 / 84 ≈ 6.14 an over, with eight wickets in hand. That is slower than the 6.67 an over Gujarat themselves had managed in the middle overs, their weakest phase. From that point the chase asked Bengaluru to bat less well than their opponents had batted at their worst. They did a little better than that — 69 off 54 in the middle overs, 7.67 an over — and the death overs became a formality: 22 runs off 18 balls, no wickets lost.

This "what was required from here?" framing is the seed of everything in Part IV. The required run rate, the wickets in hand and the balls remaining together define a match state; Chapter 19 turns match states into expected runs, and Chapter 20 into a win probability. Here we can only describe the state; later we'll be able to price it.

Who did the damage? The case-study script lists the five most expensive overs:

 innings                batting_team  over       bowler  runs  wickets  deliveries
       2 Royal Challengers Bengaluru     4     K Rabada    19        0           6
       2 Royal Challengers Bengaluru     2     K Rabada    18        0           6
       1              Gujarat Titans    14     JA Duffy    16        0           6
       1              Gujarat Titans    18 JR Hazlewood    16        0           7
       1              Gujarat Titans     1     JA Duffy    13        0           9

Kagiso Rabada — who finished the season as its leading wicket-taker, 29 wickets (§2.11 of the chapter) — conceded 37 runs in his first two overs of the final. One of the season's best bowlers had two of its most expensive overs on the biggest night. That is not a contradiction; it is Theme 6. Variance is not failure: a bowler with an economy of 9.68 across a season will have overs of 18 and 19, and sometimes they come in a final.

Fall of wickets

 innings  over  ball_in_over      player_out wicket_kind         bowler  score  wkt
       1     3             2    Shubman Gill      caught   JR Hazlewood     22    1
       1     4             4 B Sai Sudharsan      caught        B Kumar     26    2
       1     8             6        N Sindhu      caught   Rasikh Salam     55    3
       1    13             1      JC Buttler     stumped      KH Pandya     73    4
       1    15             1     Arshad Khan      caught   JR Hazlewood     99    5
       1    17             1       R Tewatia      caught   Rasikh Salam    115    6
       1    19             3       JO Holder      caught        B Kumar    142    7
       1    20             2     Rashid Khan      caught   Rasikh Salam    151    8
       2     5             3         VR Iyer      caught Mohammed Siraj     62    1
       2     6             1      D Padikkal      caught       K Rabada     63    2
       2     9             2      RM Patidar      caught    Rashid Khan     89    3
       2     9             5       KH Pandya         lbw    Rashid Khan     91    4
       2    14             6        TH David      caught    Arshad Khan    132    5

Gujarat lost both openers — Gill and Sai Sudharsan, the season's second- and third-highest run-scorers — by 26 in the fourth over. Bengaluru lost two wickets four legal balls apart (over 5 ball 3, over 6 ball 1) at 62 and 63, and Rashid Khan took two in the ninth over, but by then the score was 91 for 4 after nine overs with 65 needed off 66 balls. Kohli was never dismissed.

The score column was built with groupby("innings")["runs_total"].cumsum() including the wicket ball itself — the standard fall-of-wickets convention, since a batter can be run out going for a run that is still scored. Different conventions give different numbers; write yours down.

What it means (and doesn't)

What the rows tell you well: the shape of the match. A Manhattan and a phase table make the argument "the final was won in the powerplay" with evidence anyone can check. Every number is reproducible from a free file.

What the rows can't tell you:

  • Why Rabada's first two overs went for 37. Length? Line? A small boundary? Cricsheet records the outcome of each ball, not where it pitched (Chapter 2, §2.10). A broadcaster with ball-tracking would know; we don't.
  • Whether the toss mattered. Bengaluru won it and chose to field. One match is no evidence either way — Chapter 22 asks the question across hundreds of matches.
  • How likely Bengaluru were to win at each point. The table says 91 for 4 after nine; whether that was a 70% or a 90% position needs a model built from many matches. That's Chapter 9's first win-probability table and Chapter 20's full model.

Where the rows would mislead the careless:

  • Counting rows as balls would give Gujarat a 124-ball innings.
  • Summing is_wicket per bowler would credit run-outs to bowlers (none occurred in this match, but the habit will hurt you in the next one).
  • Filtering balls[balls.season == "2026"] works for the IPL, but the same code for the WPL's 2026 season returns nothing — it is labelled "2025/26".

Discussion questions

  1. Bengaluru won the powerplay by 25 runs and the match by five wickets. Construct an argument that the powerplay wasn't the decisive phase. What evidence from the tables would you use?
  2. Gujarat scored 50 off their last 30 balls but lost three wickets doing it. Was that a good death performance? Against what baseline would you judge it? (Chapter 5 builds phase baselines.)
  3. Rabada had the two most expensive overs of the final and the most wickets of the season. How should an analyst write about a single bad match for a good player without either hiding it or overreacting?
  4. Kavya needs one graphic for ninety seconds of airtime. Which single number or chart from this case study would you give her, and why?

Your turn

Pick another IPL 2026 playoff — the Eliminator (1535463, Rajasthan Royals v Sunrisers Hyderabad, won by Rajasthan by 47 runs, player of the match V Suryavanshi) or Qualifier 2 (1535464, Rajasthan Royals v Gujarat Titans, won by Gujarat by seven wickets, player of the match Shubman Gill). Adapt code/case_study_01.py by changing FINAL_ID, and produce: the over-by-over table, the phase splits, the fall of wickets and the Manhattan chart. Then write 200 words answering: in which phase was the match decided, and what evidence shows it? Check your scorecard totals against the match result in load_matches("ipl") before you write a word.