PDA

View Full Version : Chinaman's Dynamic Formula


chinaman
February 23, 2004, 03:35 PM
Much has been said about NRR and how to calculate it. However the NRR itself can not answer some very important questions. Chinaman's Dynamic Formula is here to answer them accurately.

I must admit, I was confused anwsering these questions even few days ago. This formula is the result of that failure.

The formula does look teeth breaking. But in the form of an html form, it should be a breeze. I have it in Excel format (see attachment) but don't know how to make it in html. Anyone can give me a hand for a trial web page to see how it works. If everything turns out ok, we may put it up some where in our site for the fans and coaches alike to get answers on the fly.


Chinaman's Dynamic Formula addresses following three issues:

1. If the Team Bat First, the minimum runs required to score to achieve a Target NRR.
2. If the Team Bat Last, the minimum Run Rate required to topple the oponent's score and achieve a Target NRR.
3. If the Team Bat Last, the maximum numbers of Overs required to topple the oponent's score and achieve a Target NRR.


With the formula, we can see that,

if we batted FIRST against India, we had to:

Score atleast 239 runs to achieve 1.18 NRR or
Score atleast 238 runs to achieve 1.179 NRR (which was just above NZ's NRR)

if we batted LAST against India, we had to:

Just win the game if they scored anything above 238.
Win the game at a run rate of atleast 4.77 if they scored anything below 238 or
Win the game within a maximum of 42 overs if they scored just 200 (Could be calculated for any score)

Feel free to play with the formula in excel. Feedback? Error? Feel free to post.


PS, Please don't laugh at the name, will change it later. But it was meant to give some laugh though!

[Edited on 2-24-2004 by chinaman : TR to TRun]

[Edited on 2-25-2004 by chinaman : Formula and link removed]

billah
February 23, 2004, 04:26 PM
Very concise, Chinaman bhai. Let's not forget to send a copy to the U-19 coach. For future use, you know.

Navarene
February 23, 2004, 05:08 PM
Very concise


Not sure if it is in very concised or in a deliberated form, but one thing is for sure that we cricket fans in this forum are now concerned about the importance of Net Run Rate issue. Given the thought that more and more ODI tournaments are being played nowadays and the NRR will be computed if the points of two or more teams are the same. That's why it is important for the think-tank or the coach of a team to have the clear perception about NRR.

After all, we all know why Shaun Maclean Pollock of South Africa was sacked from captaincy for not electing to bat first in a last world cup match.

reverse_swing
February 23, 2004, 05:28 PM
Originally posted by Navarene
[quote]


After all, we all know why Shaun Maclean Pollock of South Africa was sacked from captaincy for not electing to bat first in a last world cup match.

Pollock was not sacked because of this. This is totally baseless. They played their last match against Srilanka.And in that match Srilanka won the toss. Pollock did not have a clear idea about D/L method as that match was rain affected.

Scorecard of that match (http://statserver.cricket.org/link_to_database/ARCHIVE/WORLD_CUPS/WC2003/SCORECARDS/POOL-B/RSA_SL_WC2003_ODI40_03MAR2003.html)

[Edited on 23-2-2004 by rezwan1977]

Navarene
February 23, 2004, 06:21 PM
Thank you Rezwan for pointing out my mistake. Yes, you are right, Pollock was not sacked for miscomputing anything about NRR, but for "miscalculated the target needed in the rain-hit tie against Sri Lanka"
source (http://www.thatscricket.com/news/2003/03/15/1503pollock1.html)

Anyway, hope you see the essence of my post still doesn't defer much from whether Pollock miscomputed the target according to D/L method or NRR method.

rafiq
February 23, 2004, 06:32 PM
Chinaman I don't have time to test this formula right now but I trust Adnan will give it a thorough run through and I, apparently along with Coach McInnes and his wife, trust Adnan's math. In any case, conceptually it sounds easy enough to follow and all jokes aside, you have done a great service to cricket. This spreadsheet or applet needs to be put on all coach's PDAs or the very least send it to the laptop-carrying statistician who goes around with the national team these days. cheers

chinaman
February 24, 2004, 11:50 PM
Thank you for all the encouragements.

Dr. Z was very kind to convert this formula into an online calculator. He has been intrumental in the development of the project. I owe him big time.

Now that the calculator is born, we named it "Target Run, Rate and Over Calculator" or simply TRROC. We hope TRROC will help us prepare decisivly for future challenges should the need arise.

Please feel free to report suggestions, bugs and errors.

Link to TRROC (http://www.banglacricket.com/tools/nrr.php)

AsifTheManRahman
February 25, 2004, 12:18 AM
I'm surprised that Adnan bhai hasn't yet made any posts to this string...:lol:

rafiq
February 25, 2004, 01:37 AM
Zunaid, Chinaman: my 10 second review is that there is a disconnect between the 3 things the calculator is supposed to calculate and the online form. Maybe the user can choose which of the three things they want to calculate, and then fill out the appropriate data. Right now you can input data for each line and come up with something meaningless or an error.

chinaman
February 25, 2004, 01:41 AM
Please explain. Has been working fine with me.

Try playing with BD-India data:

Target Net Run Rate: 1.18 or whatever you like
Total Overs For: 62.2
Total Overs Against: 99.2
Total Runs For: 298
Total Runs Against: 299

rafiq
February 25, 2004, 01:44 AM
I'm sure the calc works fine with the right data as in above example. But it's not clear what data the user has to supply and what will be calculated - separate the user input from the results. Z might know what I am talking about.

Zunaid
February 25, 2004, 01:47 AM
Originally posted by rafiq
Zunaid, Chinaman: my 10 second review is that there is a disconnect between the 3 things the calculator is supposed to calculate and the online form. Maybe the user can choose which of the three things they want to calculate, and then fill out the appropriate data. Right now you can input data for each line and come up with something meaningless or an error.

Could you give some examples of data you plugged in - I haven't put in a lot of data validation to ensure that the right data is entered - just minimals ones... For example you could enter - values.

Your input will help to make this idiot proof. :)

thanks for kicking the tires

- Zunaid

Zunaid
February 25, 2004, 01:51 AM
to add to the above ,,

i could just put in 1, 2, 3, 4, 5 in sequence and get some meaningless output..

chinaman
February 25, 2004, 01:51 AM
I think I got it.

You are right, the "Opponents Score (if batting first)" is the only optional data and it is used to compute the "Target Over".

All other fields are required and both Target Run and Required Run Rate are generated.

Let's see what Dr. Z thinks to make it more user friendly. He's been working on it all day long and might give another thought later on.

Zunaid
February 25, 2004, 01:55 AM
Not all day ...

just stealing company time a little bit here and a little bit there ..

I will wait for additional comments before I make the next major update...

I am also looking at UI issues - how to make it clear and simple. Looks like one useful addition would be to mark things as required and optional and reject invalid input data.

Any others?

- Zunaid

rafiq
February 25, 2004, 02:00 AM
depending on how much time you want to spend on it, here are suggestions.

1. Ask user what they want to calculate - from the 3 things listed on the top of the page. Based on that, only allow user input for relevant data needed to calculate that choice. I would imagine all fields will be mandatory. Show result at the end.

2. To trap for meaningless data entry, you can put in some validation and rules - again not sure what you are coding in.

3. If there is an error, explain why.

This doesn't have to be done overnight. You should protect the IP around it (maybe?), not sure if this is available on other sites. In fact, a calculator section would be welcome on live sites like crickinfo eg NRR or D/L calculations on the fly as people are following live games.

fab
February 25, 2004, 02:03 AM
I just tried it out

Data: (Current England U19 team if they want to get 1.95)
Target Net Run Rate: 1.95
Total Overs For: 50
Total Overs Against: 50
Total Runs For: 306
Total Runs Against: 209
Opponents Score (if batting first): 250

Result:
Warning: Division by zero in /home/banglacr/public_html/tools/nrr.php on line 133
Warning: Division by zero in /home/banglacr/public_html/tools/nrr.php on line 135


Data: (For Zimb U19 to go from -1.947 to 1.94)
Target Net Run Rate: -1.940
Total Overs For: 50
Total Overs Against: 30
Total Runs For: 141
Total Runs Against: 143
Opponents Score (if batting first): 250


Result
Target Run (T-Run): 630
Required Run Rate (RRR): 12.6
Target Overs (T-Ov): 19.84126984127

You entered
Target Net Run Rate: -1.940
Total Overs For: 50
Total Overs Against: 30
Total Runs For: 143
Total Runs Against: 143
Opponents Score (if batting first): 250

-------

Okay, I haven't been following the NRR calculations thread, but is this correct? To improve the NRR by .007 they need to score 250 runs in 19 overs?

-----

Minor comment, seems like the "Total runs for" field in the results section is displaying the total runs against instead.

[Edited on 25-2-2004 by fab : typo]

chinaman
February 25, 2004, 02:09 AM
Will be looking into this. Thanks for the suggestions.

Zunaid
February 25, 2004, 02:12 AM
Originally posted by rafiq
depending on how much time you want to spend on it, here are suggestions.

1. Ask user what they want to calculate - from the 3 things listed on the top of the page. Based on that, only allow user input for relevant data needed to calculate that choice. I would imagine all fields will be mandatory. Show result at the end.

2. To trap for meaningless data entry, you can put in some validation and rules - again not sure what you are coding in.

3. If there is an error, explain why.

This doesn't have to be done overnight. You should protect the IP around it (maybe?), not sure if this is available on other sites. In fact, a calculator section would be welcome on live sites like crickinfo eg NRR or D/L calculations on the fly as people are following live games.

1. Good idea

2. Will work on adding traps for invalid data.

3. We would like to add other tools. About protecting the IP, the fundamental idea is public domain - ours is just one implementation of it. As for D/L - it is actually proprietary to a certain extent. The ICC has a 9 pager document on it :)

By law, one HAS to use the official software which requires an extensive table built by D&L. As a starter, we could create a simpler version to give some idea of the reuired score - can't make it exactly accurate until I have hunted down the full D&L resource table. The one's I see only have granularity at the over level and not at the ball level, so I need to do some interpolation. There are actually a few D&L calculator available for download. Haven't seen a RRR calculator yet though.

As fab pointed out, there was a mini bug which has been fixed. The divide by zero exception will be fixed as we add more data validation rules.

Looking at the explnation, the blurb for total (runs/overs) against could be made clearer.

This is still work in progress and is now available for the members here to put it through it's paces.

Thanks,
Z

fab
February 25, 2004, 02:16 AM
btw, thanks for the effort. It's looking great! :)

Zunaid
February 25, 2004, 02:17 AM
Originally posted by fab
I just tried it out

Data: (Current England U19 team if they want to get 1.95)
Target Net Run Rate: 1.95
Total Overs For: 50
Total Overs Against: 50
Total Runs For: 306
Total Runs Against: 209
Opponents Score (if batting first): 250

Chinaman,

With TOF = TOA, the denominator of your equation results in a division by zero.. Is TOF=TOA a possible scenario. If so, is there a special case handling?

- Z

tnb
February 25, 2004, 02:18 AM
Great. strated playing with it immediately.

one of the trial was like this:

Target Net Run Rate: 1.2
Total Overs For: 99
Total Overs Against: 98
Total Runs For: 300
Total Runs Against: 250
Opponents Score (if batting first): 25

got Invalid data.

Then i saw all the input fields were erased. I am too lazy to fill all the fields again. just want to edit the erroneous data.

Zunaid
February 25, 2004, 02:21 AM
Originally posted by tnb

Then i saw all the input fields were erased. I am too lazy to fill all the fields again. just want to edit the erroneous data.

boshte dile shuite chae ... bah humbug

version 2.0 :)

ps. thanks for the comments. I myself am lazy... if I pre-fill the fields with earlier results, then the reset button will not clear all.. if you can live with that...

tnb
February 25, 2004, 02:27 AM
lol.
i can live with that (hoping wont make mistakes in every filed :) ).
thanks to all of you.

chinaman
February 25, 2004, 02:32 AM
Originally posted by Zunaid

Chinaman,

With TOF = TOA, the denominator of your equation results in a division by zero.. Is TOF=TOA a possible scenario. If so, is there a special case handling?

- Z

Will be working on it tomorrow.

sage
February 25, 2004, 07:01 AM
Wow!! Chinaman and DR. Z, you are cool.

:cool::cool2:

SS
February 25, 2004, 08:03 AM
" I see our main problem as a lack of what i call "Sport Intelligence" .."
this is our main problem which we never acheived...so unless we build that we should not play big international matches..ICC will take action because of our lack of "sport intelligence" and it just destroying our counrtry's reputation. So, our senior team lacks that more.:mad:

rafiq
February 25, 2004, 10:46 AM
what are you going on about???????

Zunaid
February 25, 2004, 11:49 AM
Originally posted by rafiq
what are you going on about???????

I think he was responding to McInnes. Not sure how I can move an individual post to another thread.

- Z

Zunaid
February 25, 2004, 03:06 PM
Originally posted by chinaman

Link to TRROC (http://www.banglacricket.com/tools/nrr.php)

Added some validation scripts and also some check conditions. We still need to work on modifications to handle cases like TOA = TOF etc ..

Looking at everyone's numbers to add more data validation handles.

- Zunaid

Zunaid
February 25, 2004, 03:10 PM
Originally posted by fab

Data: (For Zimb U19 to go from -1.947 to 1.94)
Target Net Run Rate: -1.940
Total Overs For: 50
Total Overs Against: 30
Total Runs For: 141
Total Runs Against: 143
Opponents Score (if batting first): 250


Result
Target Run (T-Run): 630
Required Run Rate (RRR): 12.6
Target Overs (T-Ov): 19.84126984127

You entered
Target Net Run Rate: -1.940
Total Overs For: 50
Total Overs Against: 30
Total Runs For: 143
Total Runs Against: 143
Opponents Score (if batting first): 250

-------

Okay, I haven't been following the NRR calculations thread, but is this correct? To improve the NRR by .007 they need to score 250 runs in 19 overs?


[Edited on 25-2-2004 by fab : typo]

I noticed you were going from -1.947 to +1.94 - ie improve NRR by 3.887 and not .007

Or am I reading this wrong?

- Zunaid

fab
February 25, 2004, 05:08 PM
Sorry I made a typo in the brackets, what I meant was
"Data: (For Zimb U19 to go from -1.947 to -1.94)". I actually entered -1.94 in the target run rate field, so the increase is only by .007.