Part I — Foundations
Here is a cricket argument you have almost certainly heard in some form. Kohli is the accumulator: he averages in the high thirties but he can't finish, and his death-overs strike rate is about 139. Suryakumar averages under 30, but at the death he goes at 190-plus. It's a tidy story about the steady anchor and the explosive improviser, and it comes with numbers attached, so it sounds settled. The first outline of this book used exactly those numbers.
Then we computed them. Across every ball of every IPL match from 2008 to the end of the 2026 season — 1,243 matches and 295,732 deliveries, free to download from Cricsheet — Virat Kohli's batting average is 40.42 and Suryakumar Yadav's is 33.68. Kohli's strike rate in overs 16–20 is 188.38, which is higher than Suryakumar's 178.21. The real gap between them is in the middle overs, where Suryakumar has scored at 144.14 and Kohli at 125.80. Every number in the argument was wrong, and wrong in the direction that matters.
Even the corrected numbers aren't a fair race, though. Kohli usually reaches the death overs as a set opener, forty balls in; Suryakumar usually walks in during the middle overs and has to start fast against spin. So the average and the strike rate tell different stories, the phase splits tell a third, and none of them is a fair verdict until you know who bowled, what the match needed and how many balls the number rests on.
Part I is about getting from the first kind of argument — confident numbers from memory — to the second kind: numbers you computed yourself, from data you can download, with their limits stated. It's the foundation for everything else in the book, and it's the one part every reader should take seriously, whichever route you follow afterwards.
What this part argues
Part I makes four claims, and the rest of the book stands on them.
- Cricket's traditional statistics mislead in specific, predictable ways. Batting average, economy rate and career aggregates aren't wrong arithmetic. They answer questions nobody should be asking in most modern cricket, and they pool things that shouldn't be pooled.
- Test, ODI and T20 cricket are three different sports. They share a ball, a bat and twenty-two yards, and very little else analytically. Runs, balls and wickets trade at different exchange rates in each, so a number can't be judged until you know which format produced it.
- Most of what you see in a cricket number is luck. A T20 innings is 20 to 60 balls and an IPL league stage is 14 games. Small samples mislead, extreme numbers drift back, and honest analysis puts an interval round every estimate and pulls it toward what we already knew.
- You can check all of this yourself. The data is public, the tools are free and the code runs on an ordinary laptop. A fan in Dhaka with a slow connection can reproduce every number in this book.
It comes first because every later chapter assumes it. When Part II measures a batter's strike rate against the league par for the same season and phase, it uses the par Chapter 4 builds. When Part III shrinks a bowler's wicket rate toward the league mean, it uses the shrinkage Chapter 6 teaches. When Part V asks whether a model is any good, it relies on Chapter 6's habit of checking a claim against what happened next.
The questions it answers
- Why is cricket, which records every ball, so far behind baseball in using what it records?
- What exactly is in the free ball-by-ball data, what is missing, and what is withheld?
- How do you get from a raw match file to a scorecard, a leaderboard and a phase table, in code you wrote yourself?
- Where can a batting average or an economy rate be trusted, and where does it lie?
- What counts as a good performance in a Test, an ODI and a T20, and does skill in one format tell you anything about another?
- How many balls does a strike rate need before it means something, and how much of a hot start will last?
- Which chart answers which cricket question, and which charts quietly answer the wrong one?
How the chapters build
Chapter 1 — Cricket's Moneyball Moment. The Kohli and Suryakumar table above is the chapter's hook. From there it measures how much data cricket produces (6,420,141 deliveries from 17,186 matches in this book's snapshot) and how fast the game has changed: the IPL's average first-innings score rose from 157.5 in 2012 to 195.7 in 2026. It explains what Moneyball actually was and why cricket has been slow to have its own version. It also introduces the four real examples that run through all forty chapters: a T20I chase at Newlands in January 2017 that turned on a single over, an auction pair that exposes the IPL market, Rohit Sharma's ODI average in wins and losses, and a batter's weakness against one type of bowling that decided a World Cup semi-final.
Chapter 2 — Cricket Data. The first over of the 2026 IPL final had six legal balls and three wides, so it appears in the data as nine rows. Count rows and call them balls and you have miscounted the most important match of the season before it is a minute old. This chapter downloads the data, explains how a Cricsheet match file is structured, and makes every decision about what a "ball", a "run" and a "dismissal" are. It also shows what the data can't give you: no line or length, no shot direction, no dropped catches, and no Afghanistan men's internationals, which Cricsheet withholds. It ends with an audit checklist you'll run on every new dataset.
Chapter 3 — Python and pandas for Cricket. Nusrat Jahan, a
statistics student in Dhaka who builds the book's project alongside you, types her first line of code:
sum([0, 0, 6, 4, 6, 6]), Shashank Singh's 22 off Josh Hazlewood's last over in the 2025 IPL final. By
the end of the chapter she has rebuilt that final's scorecard from 252 raw deliveries. Every idea in the
chapter — variables, loops, functions, then filtering, groupby, merge and pivot_table — arrives
with a cricket question attached. You need no programming experience to start it.
Chapter 4 — Why Traditional Cricket Statistics Lie. Jacques Kallis and Andre Russell have almost identical IPL batting averages, 28.55 and 28.20. Russell scored 224 more runs off 700 fewer balls. That is the first of four lies the chapter finds in real data. The wrong denominator: MS Dhoni was not out in 41.32% of his IPL innings, inflating his average 1.70 times over his runs per innings. The missing dimension: an average ignores pace, and economy ignores wickets. Conditioning on the outcome: 102 of 103 ODI batters average more in wins. And mixing unlike things: Jasprit Bumrah is cheaper than Ravichandran Ashwin in every IPL phase but dearer overall, 7.34 to 7.20, because he bowls far more of the expensive overs. For each lie the chapter builds a first fix, starting with runs above par.
Chapter 5 — The Three Formats as Three Different Sports. Cheteshwar Pujara, the archetypal Test batter, once made 100 off 61 balls in a domestic T20. Suryakumar has played one Test innings: 8 off 20. Neither fits the cliché attached to him. The chapter computes each format's exchange rates: 3.31 runs an over in men's Tests against 8.42 in men's T20Is, and a wicket every 55.5 balls against one every 17.6. It finds that 72.8% of Test innings end all out against 16.3% of men's T20I innings, so the scarce resource is wickets in one format and balls in the other. The result that matters most for scouting comes last. Among 76 men who played all three formats, Test average and T20I strike rate are essentially unrelated (ρ = −0.01), while ODI and T20I strike rates move together (ρ = 0.80).
Chapter 6 — Statistical Thinking for Cricket. Ajinkya Rahane opened IPL 2023 with 209 runs off 105 balls, a strike rate of 199.0, against a career mark of 120.7. He scored at 139.3 for the rest of the season. Across every IPL batter-season from 2009 to 2026, only about 31% of a hot start's excess survives. This is the most important chapter in Part I. It covers how many balls a stat needs before it is half signal (about 98 for strike rate, about 554 for dismissal rate), bootstrap intervals, shrinkage, Bayesian updating, Simpson's paradox and the "averages more in wins" trap. It also finds that about 92% of the spread in IPL team records is what luck alone would produce. Shrunk toward the league, Ellyse Perry's WPL average of 64.80 becomes 46.45: still excellent, and far more believable.
Chapter 7 — Visualizing Cricket. After 15 overs at Newlands, the worm shows Sri Lanka's chase level with South Africa's innings. The run-rate chart for the same balls shows Sri Lanka scoring at 7.73 an over and needing 10.80. Both charts are correct. They answer different questions, and choosing the wrong one tells the wrong story. The chapter builds the whole cricket chart repertoire: Manhattans, worms, run-rate and partnership charts, heat maps, small multiples, radars, and the control chart that shows the IPL's 2023–2026 scoring sitting above anything earlier seasons could explain as noise. It is also the first place you meet the book's simulated tracking layer. Wagon wheels, pitch maps and beehives need data that isn't public, so the chapter draws them from simulated locations attached to real outcomes, labels every one 🧪, and never states a simulated number as a fact about a real player.
What you build: the first Crease modules
Across the book you build Crease, a working cricket analytics platform. It is a Python package in
project/crease/ plus a dashboard, and each chapter adds one module. Part I lays the foundation:
| Chapter | Module | What it gives you |
|---|---|---|
| 1 | — | An environment check: Python, the libraries, the toolkit and the data all in place |
| 2 | data.py |
Loading, caching and filtering helpers; season tables; a player registry that keeps people with the same name apart |
| 3 | explore.py |
Scorecards, over-by-over tables, leaderboards and phase tables for any match or competition |
| 4 | traditional.py |
The traditional numbers plus "where it lies" diagnostics: not-out inflation, runs above par, economy against par |
| 5 | formats.py |
Format profiles and baselines, so any player can be measured against the right format and era |
| 6 | uncertainty.py |
Bootstrap intervals, normal and beta-binomial shrinkage, prior fitting |
| 7 | charts.py |
Manhattans, worms, run-rate charts, partnership bars, heat maps, control charts, radars, and the simulated wagon wheel, pitch map and beehive |
These modules carry weight later. uncertainty.py is used, directly or in spirit, in nearly every
chapter that follows: the matchup shrinkage of Chapter 11, the conversion rates of Chapter 10, the
expected-wickets luck analysis of Chapter 14 and the projections of Part V. formats.py supplies the
baselines Chapter 10 compares Test batters against. charts.py sets the visual rules the whole book
follows: batting-first side in blue, chasing side in orange, wickets as red crosses, a colour-blind-safe
palette. Its functions draw the figures in Parts II to VIII, through to the broadcast graphics of
Chapter 37 and the
dashboard you assemble in
Chapter 39.
What overturns conventional wisdom
Part I's headline findings, each computed from the book's data snapshot:
- The famous Kohli–Suryakumar death-overs story is backwards. On career IPL numbers, Kohli's death-overs strike rate is higher (188.38 to 178.21). The real gap is in the middle overs.
- Average and strike rate barely know each other. Among the 58 IPL batters with 1,500 or more balls, the correlation between them is 0.16. Against runs above par, average correlates 0.06 and strike rate 0.73. In T20, the average is close to blind.
- "He averages more in wins" says almost nothing about the player. Rohit Sharma's ODI average is 58.46 in India's wins and 36.01 in their losses. That looks like a big-match player until you see that 102 of 103 ODI batters (on Chapter 4's filter) average more in wins, and that Rohit's ratio of 1.62 is below the median.
- A bowler can be cheaper in every phase and dearer overall. Bumrah beats Ashwin in the powerplay, the middle and the death, and trails him on career economy. The data contains 40 such pairs.
- Test skill tells you almost nothing about T20 skill. Test average and T20I strike rate are uncorrelated across the 76 men who played all three formats. ODI and T20I skills do travel together.
- Hot starts cool. About 31% of an early-season surge in strike rate survives the rest of the season. Extreme numbers regress, and the commentary box rarely makes allowance for it.
- Most of an IPL table is luck. Roughly 92% of the spread in IPL team-season records is what chance alone would produce. Among men's full-member T20I sides the figure is about 59%.
Learning paths through Part I
Every route through the book starts here. How closely to read depends on your track.
🏏 Fan Track: Read Chapters 1, 4, 5 and 6 closely. They carry the cricket argument, and Chapter 6 is the most important idea in the book. Skim Chapter 2 for what the data does and doesn't record. Chapter 3 is optional if you won't code. Read Chapter 7 for the figures: it teaches you to read a worm, a Manhattan and a run-rate chart properly. You can skip every code block in the part and still follow every argument.
📊 Analyst Track: Read everything and run everything. Chapters 2 and 3 set the data habits the whole book assumes: balls faced exclude wides, super overs are left out, check row counts after every merge, and pin a name to one person before aggregating. Chapter 6 is your statistical toolkit for the next 34 chapters. Build all six modules and get each
project_checkpoint.pyto run cleanly before you move on.🎰 Betting Track: Read the whole part, with special care on Chapter 5 (exchange rates and the price of a wicket) and Chapter 6 (randomness, shrinkage and the luck share). In Chapter 7, §7.3 and §7.7 matter most: the run-rate chart is the in-play question drawn as a picture, and the control chart is how you tell a real shift in scoring from noise.
🏆 Fantasy Track: Read the whole part. Chapter 3's leaderboards with minimum-sample filters (§3.6) and phase pivot tables (§3.7) are the techniques you'll use most when picking a side. Chapter 6 will stop you chasing last week's hot hand.
🧑💼 Franchise Track: Read Chapters 1, 4, 5 and 6 closely. Chapter 4's corrections (pace, economy against par, the price of a wicket, venue effects) change who you would pay for, and Chapter 5's §5.9 tells you how much a Test or ODI record is worth as evidence for T20 scouting. In some directions it is worth almost nothing. Skim Chapters 2, 3 and 7 for what your analysts will be doing.
Before you begin
- [ ] Read How to Use This Book and About the Data, so you know what the snapshot covers (through the 2026 IPL season, Cricsheet data downloaded in November 2026) and what it leaves out.
- [ ] Follow Setting Up Your Environment: Python 3.10
or later, the libraries in
requirements.txt, and the book's toolkit on your path. - [ ] Have an internet connection for the first download of the data. Chapter 2 walks you through it, caches everything locally, and after that the book's code runs offline.
- [ ] Keep a scorecard from a match you know well in mind. You'll be asked to rebuild one, and it helps to know what the answer should look like.
- [ ] Bring one cricket number you are sure of. By the end of Part I, check it.
Chapters in This Part
- Chapter 1 — Cricket's Moneyball Moment: Why the Most Data-Rich Sport on Earth Is 20 Years Behind Baseball in Analytics
- Chapter 2 — Cricket Data: Sources, Formats, Ball-by-Ball Records, and Building Your Analytical Toolkit
- Chapter 3 — Python and pandas for Cricket: Wrangling Ball-by-Ball Data from Your First Line of Code
- Chapter 4 — Why Traditional Cricket Statistics Lie: Batting Average, Economy Rate, and the Metrics That Mislead
- Chapter 5 — The Three Formats as Three Different Sports: How Test, ODI, and T20 Require Different Analytical Frameworks
- Chapter 6 — Statistical Thinking for Cricket: Probability, Bayesian Reasoning, Sample Size, and Not Being Fooled by Randomness
- Chapter 7 — Visualizing Cricket: Manhattans, Worms, Wagon Wheels, Pitch Maps, and Charts That Tell the Story of a Match