From: Stu Cram <stu@...>

Date: Tue, 6 Dec 2005 10:55:21 -0600

Date: Tue, 6 Dec 2005 10:55:21 -0600

On Dec 6, 2005, at 10:07 AM, tedd wrote: > With respect to the bias question you asked: > >> When ?? is 00 to 49 (50 cases), round down and >> when ?? is 50 to 99 (50 cases), round up. >> Is that biased? > > Yes, it is biased because you don't round anything when the number is > 0. So your example of: "00 to 49 (50 Cases)" is actually "01 to 49 (49 > Cases)" As such, it's a ratio of 49:50 and not 50:50 and therein lies > the bias. I guess this is where we disagree as to what is meant by 'rounding'. Does not 7.0 with 1 decimal place 'round' to 7 with no decimal places? In my mind, rounding means to convert a number to the 'nearest value at the given precision' and as such the OO case has to be considered. More importantly, this preserves a uniform difference of rounded results if they have the same extra digits whereas the even/odd method occasionally distorts that relationship. ex. With even-up/odd-down method: 4.4 --> 4 4.5 --> 5 4.6 --> 5 5.4 --> 5 5.5 --> 5 5.6 --> 6 6.4 --> 6 6.5 --> 7 6.6 --> 7 7.4 --> 7 7.5 --> 7 7.6 --> 8 When we consider the binary representation of numbers like 7.35 and 7.45, neither can be stored exactly as type DOUBLE values. How would the rounding work there? Would we look at a preceding 1 or 0 bit somewhere? Possibly, but the problem still remains, although by a smaller margin. Guess I'm saying rounding is a tough problem to implement especially for decimal values stored in binary form. As you said, it's important to be consistent in a problem and I'll add be relative to the nature of the problem. I'm just not enamoured with the even/odd method for a few reasons, regardless of a tradition. -Stu