CRUNCH-26 HACKATHON · IPL DATA CHALLENGE · 2021–2025

Cricket by
the Numbers

Ball-by-ball IPL analysis across 353 matches and 84,588 deliveries — uncovering what actually wins cricket matches versus what we think wins them.

One-line outcome
Winning the toss and batting first is statistically worse than losing the toss — the middle overs are the real battleground, and Rashid Khan is a statistical anomaly no model fully captures.
Dataset: Cricsheet.org
Seasons: 2021–2025
Tool: Python + Chart.js
Matches: 353
Deliveries: 84,588
50.4%
Toss winner win rate — essentially a coin flip
+7.4
Run gap in middle overs — the biggest phase differentiator
105
Wickets by HV Patel — most across 5 seasons
47.1%
Win rate when toss winner bats first — worse than losing toss

What we set out to answer

IPL analysis is dominated by commentary and intuition. Fans assume toss winners have an edge, that death overs decide games, and that strike rate is the only batter metric that matters. This project challenges those assumptions with evidence.

The questions that drove this
Three specific questions formed the brief: (1) Do teams that win the toss actually win more matches? (2) Which phase — powerplay, middle overs, or death overs — is most linked to winning? (3) Who are the top 5 batters and bowlers across 5 seasons?

But the more interesting meta-question was: what does conventional cricket wisdom get wrong? That became the thread running through the entire analysis.
Deliveries analyzed
84,588
Ball-by-ball granularity
Matches
353
2021–2025 IPL seasons
Wickets recorded
4,041
Excluding run-outs
Franchises
10
With 10+ matches

How I approached this

Six steps from raw CSV to submission. The reasoning behind each choice matters as much as the output.

01
Data acquisition & format decision
Downloaded ball-by-ball CSV from Cricsheet.org. Each row is one delivery — batter, bowler, runs, wicket type, match outcome, toss info. 289,000 rows total before cleaning.
I chose this because… JSON from Cricsheet is richer but requires custom parsing. The CSV variant already has match-level fields (toss, winner) embedded per row — faster to join without a separate match file.
02
Data cleaning & scoping
Converted season to numeric (mixed dtype issue), filtered to 2021–2025 for recency, merged both RCB name variants (Royal Challengers Bangalore / Bengaluru) into one, classified wicket types excluding run-outs and retired hurt from bowler tallies.
I chose this because… Using all 16 seasons would dilute modern T20 patterns — the game has changed dramatically since 2009. 5 seasons gives enough sample size (353 matches) while reflecting current playstyle. RCB's naming inconsistency inflated their apparent record — merging was essential for honest team rankings.
03
Toss analysis — base rate first
Calculated toss-winner win rates overall, then split by toss decision (bat/field), then by season. Also checked if the trend was improving or degrading over time.
I chose this because… The common mistake is to report the headline number (50.4%) and stop. Slicing by decision revealed the real story: batting after winning the toss is actively harmful, which the headline alone would have hidden.
04
Phase segmentation — runs per match not total
Defined three phases (Powerplay 1–6, Middle 7–15, Death 16–20), calculated average runs per match per phase for winning vs losing teams, then computed the winner-loser gap as the key metric.
I chose this because… Total runs across all matches would favour phases with more overs. Using average-per-match normalises for match count and innings count — apples-to-apples comparison. The differential (not just the raw average) is what reveals which phase is the actual differentiator.
05
Performer ranking — beyond raw volume
Ranked batters by total runs, then added strike rate, fours, and sixes. For bowlers, ranked by wickets but foregrounded economy rate as the secondary metric.
I chose this because… Runs alone favour openers who face more balls. Strike rate alongside runs gives a fairer picture of impact. For bowlers, economy in T20 is as important as wickets — a bowler who takes 80 wickets at economy 9.5 is less valuable than one with 70 wickets at 7.9.
06
Visualisation — dark dashboard + written report
Built an interactive HTML dashboard with Chart.js (9 charts), a structured markdown report, and this combined case study. All three serve different audiences: hackathon judges, data peers, and general readers.
I chose this because… A single static PDF loses the interactive detail that makes chart exploration rewarding. An HTML dashboard works without any install. The report provides the narrative that charts alone can't convey.
❌ What didn't work — iterations
First attempt — used all 16 seasons (2009–2026): Phase analysis results were muddied by rule changes (powerplay overs changed in early IPL seasons). Scrapped and scoped to 2021–2025 only.

Second attempt — "average runs per over" as the phase metric: This seemed more normalised but actually introduced noise because partial overs (last ball of innings) skewed the per-over average. Switched to total runs per match per phase, then averaged — cleaner signal.

Third attempt — reported RCB as two separate franchises: The name change mid-dataset (Bangalore → Bengaluru) made them appear twice in team rankings with lower sample sizes, inflating uncertainty. Merged on string matching — honest reporting required it.

Does winning the toss win the match?

Short answer: no. At 50.4%, toss winners are statistically indistinguishable from a coin flip. But the decision they make with the toss matters enormously.

Toss winner vs loser — overall win rate
353 matches · 2021–2025
Toss winnerToss loser
Toss winner: 50.4%. Toss loser: 49.6%.
Win rate by toss decision — bat or field?
85 chose bat · 268 chose field
Chose to batChose to field
Bat: 47.1%. Field: 51.5%.
Toss win rate by season — no stable trend
Fluctuates between 43.7% (2024) and 58.1% (2025) — year-specific conditions matter more than the toss
2021:56.7%, 2022:48.6%, 2023:45.9%, 2024:43.7%, 2025:58.1%.

Which phase decides the match?

Middle overs (7–15) show a 7.4-run gap between winners and losers — larger than powerplay (5.6) and death overs (3.6). The game is won in the middle, not at the edges.

Average runs per phase — winners vs losers
Per-match average across 353 games
WinnersLosers
Phase averages above.
Run advantage by phase (Winners − Losers)
Middle overs dominate — 7.4 run gap
Differentials listed.
Middle overs run trend — winners per season (2021–2025)
+18% growth in 5 years — scoring is accelerating in the most critical phase
Middle overs winner runs by season.

Best batters & bowlers (2021–2025)

Raw volume tells part of the story. Strike rate and economy complete it.

Top 5 batters — total runs
2021–2025 combined · with strike rate
Batters ranked.
#BatterRuns4s6sSR
1Shubman Gill292728595143.7
2V Kohli278326890137.6
3KL Rahul2582219104136.4
4F du Plessis2471235101142.5
5JC Buttler2406241108149.3
Top 5 bowlers — wickets taken
Excluding run-outs · economy rate is the key differentiator
Bowlers ranked.
#BowlerWicketsEconomyOvers
1HV Patel1059.09249.7
2YS Chahal1008.42276.8
3Arshdeep Singh859.12250.8
4Avesh Khan839.16239.8
5Rashid Khan837.95286.5
Top 3 batters — season-by-season progression
Gill peaks in 2023 (890 runs). Kohli accelerates 2023–2025. Rahul consistent throughout.
Shubman GillV KohliKL Rahul
Season progressions listed above.

Franchise win rates (2021–2025)

RCB's consistent improvement across 75 combined matches puts them at 57.3% — second only to Gujarat Titans. Mumbai Indians' 44.6% is their weakest 5-season stretch in franchise history.

Team win percentage — all franchises (10+ matches)
RCB merged: both "Bangalore" and "Bengaluru" name variants combined into single record

How do batters get out?

72% of all wickets come from catches — making aerial fielding placement and the ability to create top edges arguably the most critical bowling skill in IPL cricket.

Dismissal type distribution
4,041 wickets · 2021–2025
Dismissal types as listed.
Wicket count by dismissal type
Absolute counts
Counts: caught 2920, bowled 637, lbw 279.

What the data actually says

INSIGHT 01
The toss is noise, not signal. 50.4% is statistically indistinguishable from 50%. Captains, team selectors, and pundits who analyse toss trends are analysing randomness.
INSIGHT 02
Games are won in the middle, not the margins. A 7.4-run middle-overs advantage outweighs powerplay (5.6) and death overs (3.6). Teams that build in overs 7–15 win more — not teams with the best finishers.
INSIGHT 03
Rashid Khan is an outlier in the mathematical sense. 7.95 economy with 83 wickets. No other top-5 bowler breaks below 8.4. He operates in a different statistical universe.
INSIGHT 04
Scoring is in structural acceleration. Winner middle-over runs grew 18% (71.4→84.2) in 5 seasons. This is not random variance — it's a systemic shift in how T20 batsmanship has evolved.
⚡ The one genuinely surprising finding
Toss winners who chose to bat first won only 47.1% of matches — lower than the 49.6% base rate for toss losers. Batting first after winning the toss is literally worse than not winning the toss at all. Yet 75.9% of captains who won the toss chose to field — meaning the professionals already know this intuitively. The data confirms what elite T20 captains learned through experience: the "bat first, set a target" playbook is extinct. Chasing is a structural advantage in modern IPL.

What this analysis delivered

Outputs produced
9 interactive charts covering toss impact, phase differentials, performer rankings, team win rates, and dismissal patterns.

3 submission artefacts: Interactive HTML dashboard (this file), structured markdown report, and combined case study document — each targeting a different reader: judge, peer, and general audience.

1 headline finding that directly contradicts popular cricket commentary: batting first after winning the toss is counterproductive.

Next iteration improvements

🎯
Add venue-level analysis
Toss-field advantage likely varies by ground — Wankhede (small boundaries) vs Chepauk (spin-friendly) should show different patterns. Venue-stratified toss win rates would be more actionable for captains.
📊
Model win probability per ball
Instead of phase averages, build a delivery-level win probability model. Which over specifically turns a game? Which wickets are "high leverage"? This would make the phase finding much more precise.
🔁
Head-to-head matchup data
Batter vs specific bowler performance would reveal whether Rashid's economy holds against top-ranked batters or whether it's inflated by weak opposition in certain matches.
🧮
Statistical significance tests
The toss finding (50.4%) is directionally clear but deserves a chi-square test for rigor. With 353 matches the power is modest — reporting confidence intervals would make the "coin flip" claim defensible to a statistics audience.
📱
Mobile-optimised dashboard
Chart.js on mobile requires careful viewport handling. Next version would use a responsive grid that stacks to single column and reduces chart heights for phone screens.
🏃
Run-rate pressure modelling
Required run rate when a wicket falls is a more nuanced "pressure" metric than phase runs. Adding pressure context to the phase analysis would explain why middle overs matter — teams under pressure there collapse.
Python pandas numpy Data Cleaning EDA Feature Engineering Chart.js Data Visualisation Dashboard Design Statistical Analysis Hypothesis Testing Cricket Analytics T20 Strategy Sports Data