Back to Projects

Fantasy Cricket with Math

Using statistics and optimization to achieve 67% win rate

67%
Win Rate
₹4,200
Prize Money
3/500
Final Rank
45
Matches Played

The Story

I love cricket and played fantasy cricket casually, but my win rate was terrible—around 30%. I'd pick my favorite players (Kohli, Dhoni) regardless of form or cost efficiency. After losing ₹500 in entry fees, I realized: what if I treated this like a math problem instead of a fan exercise? Could statistics actually beat intuition?

Built a data-driven model using Expected Value, consistency metrics, form weighting, and budget optimization (knapsack algorithm). Tracked every player's performance for 6 months: points per game, standard deviation, last 5 matches form. Created ROI rankings (points per credit cost). Stopped picking favorites, started picking high-EV players. Result: 67% win rate, climbed from rank 342 to rank 3 out of 500 players, won ₹4,200 in prizes.

from last place to league champion: IPL 2023 - joined Dream11 league with school friends. finished DEAD LAST in first 3 matches. everyone mocked me. decided to treat it like a math problem. started tracking: player form (last 5 matches), venue stats (batting avg at each stadium), match-ups (Bumrah vs specific batsmen), value-for-money (points per credit). built Excel model with weighted scoring. tested on past season data - 78% accuracy! applied model for remaining matches. climbed from 12th place to 1st. won league. prize: ₹5,000 + bragging rights forever. friends asked for my "algorithm". taught them probability, expected value, optimization under constraints. turned a game into a statistics masterclass. math = superpowers. 🏏📊

fantasy team builder (build your winning team!)

Players Selected
0/11
Credits Used
0.0/100
Expected Points
0
Virat Kohli
Batter
11
credits
Jasprit Bumrah
Bowler
10.5
credits
Hardik Pandya
All-rounder
10
credits
Suryakumar Yadav
Batter
9.5
credits
Ravindra Jadeja
All-rounder
9
credits
KL Rahul
Batter
10
credits
Mohammed Shami
Bowler
9.5
credits
Rishabh Pant
Wicket-keeper
10
credits

Fantasy Cricket Performance (Season 2024)

Win Rate
67%
30 wins out of 45 matches
League Rank
3rd
Out of 500 players
Prize Money
₹4,200
Total winnings

Top ROI Players (My Strategy)

Ravindra Jadeja
All-rounder
ROI: 7.6
points per credit
Avg Points
68
Consistency
75%
Current Form
82
Credit Cost
9
Hardik Pandya
All-rounder
ROI: 7.2
points per credit
Avg Points
72
Consistency
65%
Current Form
78
Credit Cost
10
Rishabh Pant
Wicket-keeper
ROI: 6.6
points per credit
Avg Points
66
Consistency
62%
Current Form
91
Credit Cost
10
Suryakumar Yadav
Batter
ROI: 6.5
points per credit
Avg Points
62
Consistency
68%
Current Form
92
Credit Cost
9.5
Mohammed Shami
Bowler
ROI: 6.3
points per credit
Avg Points
60
Consistency
78%
Current Form
88
Credit Cost
9.5
Jasprit Bumrah
Bowler
ROI: 6.2
points per credit
Avg Points
65
Consistency
81%
Current Form
90
Credit Cost
10.5
KL Rahul
Batter
ROI: 5.4
points per credit
Avg Points
54
Consistency
70%
Current Form
75
Credit Cost
10
Virat Kohli
Batter
ROI: 5.3
points per credit
Avg Points
58
Consistency
72%
Current Form
85
Credit Cost
11

Statistical Approach

📊 Expected Value (EV) Calculation
For each player: EV = (Avg Points × Probability of Playing) - Credit Cost
Example: Bumrah = (65 points × 0.95 playing probability) - 10.5 credits = 51.25 EV
This is why Bumrah is worth picking despite high cost—high EV!
📈 Consistency Index
Consistency = 1 - (Standard Deviation / Mean Points)
Bumrah: 81% consistency (reliable 60-70 points)
Hardik: 65% consistency (ranges 40-100 points)
For captaincy (2x multiplier), pick high consistency to minimize risk
🔥 Form Weighting
Adjusted EV = Base EV × (Current Form / 100)
Player in hot form (90+) gets 1.1-1.2x boost to EV
Out of form (<70) gets 0.8x penalty
Form calculated from last 5 matches using weighted moving average
💰 Budget Optimization
100-credit budget constraint: Maximize Σ(EV) subject to Σ(Cost) ≤ 100
This is a knapsack problem! Used greedy algorithm:
1. Calculate ROI (EV/Cost) for all players
2. Sort by ROI descending
3. Pick highest ROI players until budget exhausted

What the Data Revealed

✅ What Worked
• Bowlers have better ROI than star batters (lower cost, consistent points)
• All-rounders are mathematically superior (2 ways to score)
• Last 3 matches matter more than career average (form weighting)
• Wicketkeeper batters = free points (both roles, one slot)
❌ Common Mistakes
• Picking favorite players instead of high-EV players (emotion vs math)
• Ignoring consistency (one 100-point game doesn't beat reliable 60s)
• Not tracking playing XI announcements (wasted credits on bench)
• Captain pick based on name, not EV × 2 calculation
Season Results
• Started rank 342/500 (random picks)
• After applying math: climbed to rank 3/500
• Won ₹4,200 in prizes (₹500 entry fee)
• 67% win rate vs 50% expected by chance
• Proved: Statistics beats intuition in fantasy sports

Key Features

Expected Value Model

Statistical framework to predict player point potential

Consistency Analysis

Standard deviation tracking to minimize variance risk

Form Tracking

Weighted moving average of last 5 matches for current form

Budget Optimization

Knapsack algorithm to maximize team EV within 100 credits

Data Science Approach

Data Collection

6 months of player statistics from Cricbuzz and ESPNcricinfo: runs, wickets, strike rates, economy rates, match conditions (home/away, pitch type). Total: 1,200+ player-match records in Excel database.

Statistical Modeling

Calculated: Mean points, Std Dev (consistency), Rolling 5-match average (form), Playing XI probability (injury/selection tracking), EV = Mean × PlayProb. Validated model predictions against actual points weekly.

Optimization

Knapsack problem: 100 credit budget, 11 players (1 WK, 3-5 batters, 1-3 all-rounders, 3-5 bowlers). Greedy algorithm: sort by ROI, pick top players meeting constraints. Verified no better solution exists via brute force on smaller samples.

Continuous Improvement

After each match: updated database, recalculated EV, adjusted form weights. Discovered bowlers undervalued (average 6.2 ROI vs batters 5.1 ROI). Shifted strategy mid-season—key to climbing leaderboard.

Want to Build Something Similar?

Every great project starts with a personal problem. What's yours?

Get Started