Every delivery in the IPL, treated as a random variable. Generating functions, Markov chains and Poisson processes fitted to 1,185 real matches, then put to the test.
Fit the probability of each outcome on a single legal ball. Its probability generating function G(s) holds everything; raising it to the sixth power gives the exact distribution of runs in an over, with no simulation. Drag the sliders to change how the batter plays.
H(s,t) = Σ pr,w sr tw per ball, so an over is H(s,t)6. Partial derivatives at (1,1) give the means and the covariance of runs and wickets; the coefficients give joint probabilities.
Let Xt be runs in over t of a first innings. The process is covariance stationary if E[Xt] is constant and Cov(Xt, Xt+h) depends only on the lag h. Below, every diagonal of the covariance matrix should be one flat colour if that holds.
For a covariance stationary process each line is flat. Choose a lag.
Treat each legal ball as a state: Dot, Run (1–3), Boundary (4/6) or Wicket. Estimate the transition probability matrix from consecutive balls, test the order of the chain, and follow Pn to its stationary distribution.
Commentators say dot balls build pressure that brings a wicket. If so, P(Wicket | k dots in a row) should climb with k.
Call each ball a trial: boundary or not. Independent trials give a Binomial(6, p). Markov-dependent trials let the chance depend on the last ball: P(B | B) = vs P(B | no B) = . Which one matches the spread of real overs?
If wickets were a Poisson process in balls, the rate would be constant, gaps between wickets geometric, counts in a window Poisson, and wicket times uniform given how many fell. Each postulate is checked below, and so is splitting: boundaries thinned into fours and sixes.
A homogeneous process would be a flat line at the dashed average.
Boundaries split into fours and sixes. If boundaries form a Poisson process, each stream is Poisson (mean = variance) and the two are independent.
Homogeneous Poisson (constant λ) against the non-homogeneous rate λ(t) learned from the data. Press bowl a few times and watch where the wickets cluster.
A chase is a Markov chain on (runs needed, balls left, wickets in hand). "Won" and "Lost" are absorbing; every other state is transient. Ball probabilities come from real second innings, by era, phase, wickets and required rate, and the absorption probability is solved exactly by recursion.
What the five models say, how they were built, and where they break.
Every part follows the same loop: derive what the theory predicts, compute it exactly (generating functions, matrix powers, recursion), then test it on held-up real deliveries with χ², Kolmogorov–Smirnov, ANOVA and calibration checks. All fitting is in analysis/build_data.py; the site recomputes the models live in the browser.
Ball outcomes ignore who is batting and bowling, so every team is "average". Wides and no-balls are modelled as +1 with no ball used. Matches decided by D/L or a super over are excluded. The chase model assumes balls are independent given the state, and Part 1 shows real overs are more variable than that, so it is a little overconfident.