Skip to main content

Cricbay DRR calculation technique made easy


Seaon is coming to an end and everyone is closely watching team DRR and here is an simple method of predicting match DRR.

10 is the magic number to get 0.50 DRR.


Bat first

win by 10 runs and your DRR will be 0.50.
likewise 20 runs diff will give 1.00 DRR etc


Bat second

You need the below formula to calcuate balls required to get 0.50 DRR.
(runs/runs+10) * 120)
i.e.
chasing 60 runs you will need ==> 60/70 * 120 ==> 103 balls to get 0.50 DRR
chasing 80 you will do ==> 80/90 * 120 ==> 108 balls to get 0.50 DRR

Note: if you are still wondering how to calculate loosing DRR just remember DRR lost by one team is gain by others i.e. just put a minus infront of winners DRR.
Note: All the calculations are rounded to nearest decimal.



--- Wondering how I got to the nos ---

Bat first

DRR formula ==> (Runs scored/Ball faced - Runs gave/Balls bolwed) * 6
If you bat first and win that way you and your oppoent will end up playing 120 balls either by playing all balls or loosing all wickets.
Let b == Balls faced == Balls bolwed == 120, r1 is runs scored and r2 is runs gave. Now apply the variables to the formula.
( r1/b - r2/b ) * 6
(r1 - r2) * 6 / 120
(r1 - r2) * 1/20
i.e If r1 - r2 equals 10 then DRR will be 10 * 1/20 ==> 0.50

Bat Second

Let x == Runs gave == Runs chased ==> this a variable
Let y is balls needed to chase x runs. Now apply these to formula
(x/y - x/120) * 6 ==> i.e. (x/y - x/120) should be equal to 0.166 so when multiply by 6 will get 1 DRR
x/y - x/120 = 0.166
(120x - xy) / 120y = 0.166
120x -xy = 0.166 * 120y
120x -xy = 19.92.y
120x = 19.92y + xy
120x = y (x + 19.92)
y = 120x / (x+20)
y = x/x+20 * 120
i.e. for DRR 0.50 you need to find balls by x/x+20 * 120

eg to get 0.50 DRR for below runs you need following balls.

chasing 50 runs balls = 50/60 * 120 ==> 100
chasing 60 runs balls = 60/70 * 120 ==> 103
chasing 70 runs balls = 70/80 * 120 ==> 105
chasing 80 runs balls = 80/90 * 120 ==> 108
chasing 90 runs balls = 90/100 * 120 ==> 109

Hope this helps every team member keep a tap on DRR.

Comments

Popular posts from this blog

JPA 2 new feature @ElementCollection explained

@ElementCollection is new annotation introduced in JPA 2.0, This will help us get rid of One-Many and Many-One shitty syntax. Example 1: Stores list of Strings in an Entity @Entity public class Users implements Serializable {     private static final long serialVersionUID = 1L;     @Id     @GeneratedValue(strategy = GenerationType.AUTO)     private Long id;     @ElementCollection     private List<String> certifications = new ArrayList <String> ();     public Long getId() {         return id;     }     public void setId(Long id) {         this.id = id;     }     public List <String> getCertifications() {         return certifications;     }     public void setCertifications(List <String> certifications) {         this.certifications = certifications;     } .. }         Users u = new Users();         u.getCertifications().add("Sun Certified Java Programmer");         em.persist(u); Generated Tables    Users    Co

Reuse JPA Entities as DTO

Note : Major design advantages of JPA Entities are they can detached and used across tiers and networks and later can by merged. Checkout this new way of querying entities in JPA 2.0 String ql = " SELECT new prepclass2.Employee (e.firstname, e.lastname) FROM Employee e "; List<Employee> dtos = em.createQuery(ql).getResultList(); The above query loads all Employee entities but with subset of data i.e. firstname, lastname. Employee entity looks like this. @Entity @Table(name="emp") public class Employee implements Serializable {     private static final long serialVersionUID = 1L;     @Id     @GeneratedValue(strategy = GenerationType.AUTO)     private Long id;     @Column     private String firstname;     @Column     private String lastname;     @Column     private String username;     @Column     private String street;     @Column     private String city;     @Column     private String state;     @Column     private String zipc

Validating CSV Files

What is CsvValidator ?   A Java framework which validates any CSV files something similar to XML validation using XSD. Why should I use this ?   You don't have to use this and in fact its easy to write something your own and also checkout its source code for reference. Why did I write this ?   Some of our projects integrate with third party application which exchanges information in CSV files so I thought of writing a generic validator which can be hooked in multiple projects or can be used by QA for integration testing. What is the license clause ?   GNU GPL v2 Are there any JUnit test cases for me checkout ?  Yes,  source How to integrate in my existing project ? Just add the Jar which can be downloaded from here  CsvValidator.jar  and you are good. Instantiate  CsvValidator c onstructor which takes these 3 arguements          // filename is the the file to be validated and here is a  sample         // list - defines all the fields in the above csv file ( a