Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

Hey I'm a newcomer. Hello. Wee!

And well, I've had it. I've simply had enough of people disagreeing with how to round .5

I can see where if you have a range of numbers between 0.0 and 1.0 (inclusively), you may want to split it 50/50. But I simply don't see any real world examples that would impose an exact and inclusive range like that.

In cases of statistics, and significant digits, it's merely logical to round up when you see a 5. Fifty percent of the time, a random number from 0 to 9 is going to be 0 through 4, and the other fifty percent of the time it will be 5 through 9. This is an exact, unquestionable 50/50 split. Why is there any debate?

In fact, I wrote a program to generate random numbers between 000 and 999, and round them off at the tens place using the two methods in question. As I figured, the approach of choosing up/down according to the even/odd status of the parent number (when encountering a number that ends with "50") gives a bias on rounding down.

Does someone here think that 5 should not always be rounded up? I'd like to know what the reasoning is.

--Johnny

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,651

I agree with you (see here) and I am glad that your modelling shows that the odd/even second digit has a bias. That odd/even method is used by statisticians for reasons which I don't fully understand.

I prefer the 5 goes up method.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

I think that .50 should not be rounded in either direction because 1/2 is exactly 1/2 away from the adjacent whole numbers.

0 1234 5 6789 0

**igloo** **myrtilles** **fourmis**

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

Another example is 9.5 in base-2, should it go to 10 or 9?

1001.1

1010 or

1001

Note that now you have only three values in a row: #.0 (whole number) #.1 (half) #.0 (whole number)

**igloo** **myrtilles** **fourmis**

Offline

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

But look at your first example, it confuses the issue...

"I think that .50 should not be rounded in either direction because 1/2 is exactly 1/2 away from the adjacent whole numbers.

0 1234 5 6789 0"

Now it IS true that .5 lands right inbetween the adjacent whole numbers, but the important point is that BOTH whole numbers round down. And don't look at them as whole numbers, look at them as their decimal equivalents... they're really ".0", and the ".0" happens as frequently as ".1", ".2", up to ".9" will. There is rarely the case when these freuquencies are not equal, especially in the cases of significant digits / precision.

And something about your second example is resting uneasily with me, but I can't put my finger on it yet.

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

The flaw in your logic is that the amount you are rounding is not symmetrical.

**igloo** **myrtilles** **fourmis**

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,651

Yes, pure 0.5 is exactly half way, and so an indecision rules.

But rounding is a process of reducing accuracy to ease calculation. So I take the course of least harm.

Example: A long supermarket docket that you want to verify. Observe that the decimals could be .00 to .99

50 possibilites: .00 to .49

50 possibilites: .50 to .99

But in some applications they recommend the odd/even rule, I don't know why, but they probably have their reasons.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

In your 50 possibilities, the problem is that the sum of the distances you are rounding up is

greater than the sum of distances you are rounding down.

How it really goes is: .00 doesn't round anywhere; the value stays the same.

.50 rounds up or down, so it's a don't care.

49 cases of .01 to .49 round down the same amount as 49 cases of .51 to .99 round up.

*Last edited by John E. Franklin (2005-09-15 03:28:25)*

**igloo** **myrtilles** **fourmis**

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

And if you are in an odd base number system, like base-3, then you have a

new kind of viewpoint.

1 rounds down. 2 rounds up. 0.111111111111 repeating is 1/2

0.1 is 1/3 0.2 is 2/3's 0.12 is 5/9ths.

**igloo** **myrtilles** **fourmis**

Offline

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

John E. Franklin wrote:

In your 50 possibilities, the problem is that the sum of the distances you are rounding up is

greater than the sum of distances you are rounding down.

How it really goes is: .00 doesn't round anywhere; the value stays the same.

.50 rounds up or down, so it's a don't care.

49 cases of .01 to .49 round down the same amount as 49 cases of .51 to .99 round up.

".00" stays the same, but it still rounds down, and it is just as likely to occur as any of the other 99 possibilities.

When applyin the rounding process, in any numeric base, we want to ensure that every number recieves an equal span of the possibilities. It's not the only thing you're looking for, but that's a factor. Rounding a way of simplifying the data without skewing the actual results. Look at the span of negative infinity to infinity, and assume that we only have accurate enough instruments to measure whatever it is we're measuring to the tenths. Now, lets look at the numbers 2 and 3 as an example.

In the 50/50 world, you round .5 to the closest even number... so:

2 will get 1.5 to 2.5 ... that's 11 possibilities.

3 will get 2.6 to 3.4 ... that's 9 possibilities.

So, now we've given even numbers an unfair advantage! Why would statisticians do this??

Another very important thing to remember is that you're usually rounding data that was already truncated. And 99.999999999(ad infinitum)% of the cases out there that you have as a number that ends with ".5", you're actually dealing with a value greater than .5, like .50000000001, but it's already been simplified to .5. If looking at the problem from a "I want the output of this rounding process to show the value closest to the data I'm given", then I can see why you'd be tempted to use a 50/50 rule, maybe by flipping a coin. But you're forgetting about those cases such as ".50000001"!

Here's a ascii diagram of what doing a 50/50 solution on .5 is doing to the probabilities of rounding up and down

-=round down

+=round up

----------------+++++++++

.0 ... .5 .6 ... 1.0

By doing a 50/50 rule, you're advocating rounding down 55% of the time, and rounding up 45% of the time. Now, this isn't inherenly bad, depending on what you want. You could still make it work so that each round number has the same probability of being rounded to. But it is no longer the case that each rounded number goes to the round number that it most closely represents.

And I know I haven't really addressed the rounding in different bases, but I will sometime. sorry!

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

I have a hunch that your example of what statiticians do is incorrect.

If the input # is even in the place value we are keeping, then we go one way, and

if odd, then the other way, but that's just my guess.

Also 0 + 1 + 2 + 3 + 4 is not equal to (10-5) + (10-6) + (10-7) + (10-8) + (10-9). (Your method)

However 1 + 2 + 3 + 4 is equal to (10-6) + (10-7) + (10-8) + (10-9). (My method)

**igloo** **myrtilles** **fourmis**

Offline

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

I think we agree on what statisticians do. But I still disagree with it. Like I stated in my example, lets say a thermometer reads only to the tenths, but you round to the closest whole number.

2 will get 1.5 to 2.5 ... that's 11 possibilities.

3 will get 2.6 to 3.4 ... that's 9 possibilities.

Each possibility is equally likely to happen. So now we're giving the even numbers recieve a larger span of possibilities. Why is that preferable? After the rounding, the even numbers will be represented as being more frequent than they really are.

Offline

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

John E. Franklin wrote:

Also 0 + 1 + 2 + 3 + 4 is not equal to (10-5) + (10-6) + (10-7) + (10-8) + (10-9). (Your method)

However 1 + 2 + 3 + 4 is equal to (10-6) + (10-7) + (10-8) + (10-9). (My method)

Could you state this differently? I don't understand it.

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

You're right, my mistake. I just drew a number line with arrows and dots at the 1/2 marks, and you're correct.

I didn't know which way was which, so for me, the odds got the advantage, but now I see what you mean!

This is very interesting.

But I would like to pose a new algorithm for some problems. Simply toggle back and forth on each

successive rounding that needs to be done that is exactly .5. Go up once, down the next time.

How do you like that? No matter what we do it's not perfect though.

**igloo** **myrtilles** **fourmis**

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

I believe 9.50000000000000000001 should be rounded to 10.

I believe 9.49999999999999999999 should be rounded to 9.

I hope we can agree on this at least.

**igloo** **myrtilles** **fourmis**

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

Hey, I think I'm finally coming around to your line of thinking!

Your method (5's round up)

5.555

5.56

5.6

6.

One of my dumb methods (5's round down):

5.555

5.55

5.5

5.

I guess my symmetry principle fails somewhere...

*Last edited by John E. Franklin (2005-09-15 08:49:03)*

**igloo** **myrtilles** **fourmis**

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

The tables turn again!

Your dumb method this time (5's round up):

4.445

4.45

4.5

5.

My good method this time (5's round down):

4.445

4.44

4.4

4.

So now we have seen that both methods, going up or down are flawed!

So now we can argue there is no good rounding method known to man yet.

*Last edited by John E. Franklin (2005-09-15 08:50:24)*

**igloo** **myrtilles** **fourmis**

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

You asked what I meant by the following:

Also 0 + 1 + 2 + 3 + 4 is not equal to (10-5) + (10-6) + (10-7) + (10-8) + (10-9). (Your method of rounding 5's up)

However 1 + 2 + 3 + 4 is equal to (10-6) + (10-7) + (10-8) + (10-9). (My method of doing nothing with 5's)

What I meant above is that if you round off the one's place to the ten's place, then the amount you are

rounding can be -4 to +5. (This is not as good as -4 to +4 or -5 to +5, which has symmetry.)

The 0 + 1 + 2 + 3 + 4 are the amounts you could round down and the

(10-5) + (10-6) + (10-7) + (10-8) + (10-9) are the amounts you would round up if

5's round up.

(Off the subject, I came up with a number system explained in "This is cool." section about a base-10 number

system where the digits go from -4 to +5, and I never liked the fact that it was not perfectly symmetrical.)

In an odd base number system, I think you can be symmetrical. For example, base-3 could go from

-1 to +1, or base-9 could go from -4 to +4.)

*Last edited by John E. Franklin (2005-09-15 09:02:02)*

**igloo** **myrtilles** **fourmis**

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,651

Yes, what would happen if you used your "Franklin Number System" in base 9 or base 3?

Counting:

0 => 0

1 => 1

2 => 1-1

3 => 1 0

4 => 1 1

5 => 2-1

6 => 2 0

7 => 2 1

8 => 3-1

9 => 3 0

10 => 3 1

It looks really neat ... I would think that you might want to replace the **-1** with **'1** or **'1** or something like that, so that the minus sign doesn't get confused with normal arithmetic.

Perhaps you could try some examples (÷, ×, pi).

My contribution:

½ = 0.5 => 0. 1 1 1 1 1 1 ...

Prolog:

I wonder what mathematical system an alien with three hands and three fingers on each hand would use?

I have this underlying theory that the universe is perfect in it's own way, but we can't always see it because of how we approach it.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

John E. Franklin wrote:

I believe 9.50000000000000000001 should be rounded to 10.

I believe 9.49999999999999999999 should be rounded to 9.

I hope we can agree on this at least.

Yep, I agree with that, of course.

I want to clarify what I consider to be "exactly .5". It has to depend on the situation. With a thermometer, even if it reads .5000000, you should round up, because the temperature could actually be .50000001.

I think I've finally got a good handle on the controversial situation:

There are situations where the decimals are exact figures, and the number of significant digits is actually the degree of acuraccy available. These are absolutely the ONLY cases where I can see how ".5" is a problem, but they do exist.

Lets say I break a pencils into ten pieces each. Then, I grab 5.5 of them. Would it be more accurate to say I grabbed 5 or 6?

From the perspective of the person who sees only the output of the rounding process, I see two main priorities in choosing a rounding method in this situation:

1. making sure that each whole number has an equal chance of "winning".

2. ensuring that the resulting value most closely resembles the original one.

(Note that I don't see "ensuring that rounding up as many times as rounding down" to be a priority. It simply does not matter to the person recieving the data, which I think is the important perspective. In fact, if you were in base 3, then ".0" and ".1" would round down, and ".2" would round up, that's a 66/33% split! But the results most closely match the data, and all round numbers have an equal chance of winning. I think I fell into this trap of thinking earlier.)

And I see three main ways of rounding ".5":

A. Round to the nearest even number.

I hate this one because it blatantly screws up priority #1. I hate it I hate it I hate it.

B. Round randomly up and down, or switch between rounding up and down for each instance of ".5" you come across.

This seems ok, however, this can mess up priority #1. Depending on in what order the numbers chug through the process, you may end up always rounding "1.5" and "2.5" into "2". Now "2" has recieved more than its fair share of the data.

C. Always round up.

This method ensures that you round up half the time and round down half the time. But that's not a priority to whoever recieves the output of our rounding process! So, this factor doesn't count. However, this method can't possibly screw up #1.

".5" isn't any closer to 1 than it is to 0. It's an unfortunate by-product of using base-10! If we used an odd-numbered base, like base 3, then .1 would round down, and .2 would round up, and we'd have no problem. Anyway, rounding up in this situation (".5" in base 10) is no more inaccurate than rounding down, so it's not screwing up priority #2.

So, I like C. You could implement B in a way that priority #1 is still catered to, but it still wouldn't be any better than C, because C satisfies #1 anyway, and satisfies #2 just as much as B does.

So, round up darn it!

*Last edited by Johnny (2005-09-15 11:14:15)*

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

I think you missed my previous post that noted that 4.45 can round up to 5 when 5's round upward and the rounding

occurs more than once in a sequence on a particular data point.

This makes the exact opposite argument you made prior about rounding down being biased.

So rounding up is biased because 56% of data rounds upward and 44% of data rounds down.

But rounding down is biased because 55% of data rounds downward and 45% rounds upward.

Did you catch the joke here with the numbers I used for percentages.

For 56-44, I rounded up, but for 55-45, I rounded down!

*Last edited by John E. Franklin (2005-09-15 10:44:31)*

**igloo** **myrtilles** **fourmis**

Offline

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

John E. Franklin wrote:

I think you missed my previous post that noted that 4.45 can round up to 5 when 5's round upward and the rounding

occurs more than once in a sequence on a particular data point.

This makes the exact opposite argument you made prior about rounding down being biased.

So rounding up is biased because 56% of data rounds upward and 44% of data rounds down.But rounding down is biased because 55% of data rounds downward and 45% rounds upward.

Did you catch the joke here with the numbers I used for percentages.

For 56-44, I rounded up, but for 55-45, I rounded down!

Rounding multiple times in succession is a mistake, though. Each time you round, you knowingly give up a bit of accuracy on the data. You should only round to the place that you intend to, and you do that the first time. Besides, I could take the sequence one a little further, and round 4.45 into 4.5 into 5 into 10 into 0!

I think the absolute best option is to switch our entire society into base-3!

Offline

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

Stop the presses!

I discussed it with my roommate, and came to a revelation about something. Instruments of measurement don't truncate the last value they read, it's rounding it. Not by design, but by the nature of the inaccuracy. So, "1.5" on a thermometer won't include 1.5 to 1.59999, it means a value somewhere in the range of .5 to 1.5.

So, I retract pretty much all of my statements. Figuring that out removes a fundamental block in my arguments.

I think the way you round ".5" is dependent on the situation. If you care about consistency (like a programmer would), I guess I'd round up. Other likely factors are minimizing total error or equal representation of the resulting whole numbers.

Offline

**Johnny****Member**- Registered: 2005-09-14
- Posts: 9

Math is fun!!

Offline

**tedd****Member**- Registered: 2005-12-29
- Posts: 1

Hi:

I've entered this debate a bit late, but I have a few things to add.

In your last comment Johnny, you said:

>If you care about consistency (like a programmer would), I guess I'd round up.

Well... I happen to be a programmer and I do care about consistency, but I don't round up. I'll explain how I round in a moment, but first, you said:

>Instruments of measurement don't truncate the last value they read, it's rounding it. Not >by design, but by the nature of the inaccuracy.

That's not correct. Numbers are man-made -- they don't exist in nature. There is not an instrument (man-made or living) made that deals with absolute numbers, but rather differences in thresholds. If a voltage/resistance/amperage/whatever-physical-property has a certain value, it simply means that the signal measurement has obtained a sufficient threshold to register a number to whatever precision the instrument is capable. One can say that the number provided is always a result of a round-down method, but that's misleading. For example, the way your eye/brain determines colors is not due to a round-down method, but is rather through a step-like method of meeting certain thresholds -- one threshold for red, another for blue and so on. The computer is no different and there are many situations where a specific number is simplified via meeting a predetermined threshold. The concept of numbers, and the resulting algorithms in all forms, are man-made explanations to describe nature, not the other way around.

Barring real-world examples, you may want to consider that there is more than one way to round a number. For example, there is no completely accurate solution for rounding any real number. If you want absolute precision, then you must use absolute numbers to whatever precision they are. However, this may not be obtainable because of continuos numbers like pi. As such, you may be left with no choice other to round.

There are several different algorithms for rounding, such as truncation, floor (rounding down), ceiling (round up), common, and statistical. None are perfect, but some are more prone to errors than others. The least prone to error is the statistical, please review:

"Statisticians method of rounding":

http://en.wikipedia.org/wiki/Rounding

In previous post on this topic, people have mentioned that rounding when the last digit is 0-4 down and 5-9 up is a 50/50 arrangement, but that's not true either. In fact, you don't round at all when the number ends in a zero, you don't do anything to the number -- this leaves 1-4 rounding-down and 5-9 rounding-up -- a 4:5 statistical bias.

So to correct this bias, one should; a) do nothing is zero; b) round down for 1-4; c) round up for 6-9; d) and in the event of 5 round up or down depending upon the preceding number. If the preceding number is even, then round one-way and if it is odd, then round the other. It makes no difference which way (up/down) you round, just as long as you are consistent.

And, you may enjoy the products of round-off errors:

http://www.ima.umn.edu/~arnold/disasters/disasters.html

http://catless.ncl.ac.uk/php/risks/search.php?query=rounding

tedd

http://sperling.com

http://sperling.com

Offline