# How do you round numbers?

**URL:** <https://boards.straightdope.com/t/how-do-you-round-numbers/516440>\
**Category:** Factual Questions\
**Created:** [November 5, 2009, 5:03pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440 "2009-11-05T17:03:04Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [November 6, 2009, 5:45pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/41 "2009-11-06T17:45:38Z")

</div>

> [@Nava](#):
>
> I don’t understand this “round to even” thing.
> 
> 3.5 is as close to 4.0 as to 3.0 - are you saying that it should be to 4.0 because 4 is even?

Yes, except that you’d round to 4, not to 4.0. If you’re keeping the second digit, leave it as 3.5. As mentioned several times, the point of rounding to even is that if you are rounding a lot of numbers, you don’t add a bias to your numbers. Why even instead of odd? I’d guess that it’s because if you subsequently have to divide the number by two, there’s no rounding again.

> [@](#):
>
> Note that “precision” isn’t the same as “having a ton of figures.” If your machine has an error of ±0.1, giving two decimals doesn’t contain any more real information than giving one, and it’s misleading. There’s a difference between “we’re very precise” and “we’re very carefully tracking the noise.”

it does give you more information, though. Suppose the number is 0.34 ± 0.1. Then the real number could be anywhere in the range 0.24 to 0.44. If you round off to 0.3, that’s off by up to 0.14. If you keep it as 0.34, you’re only off by up to 0.1. That’s the point of keeping a guard digit.

---

<div class="post-metadata">

**Author:** ![ElvisL1ves](https://avatars.discourse-cdn.com/v4/letter/e/5daacb/32.png) [@ElvisL1ves](https://boards.straightdope.com/u/ElvisL1ves)\
**Post date:** [November 6, 2009, 5:45pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/42 "2009-11-06T17:45:59Z")

</div>

> [@Mangetout](#):
>
> In only four of the five cases you are describing as ‘down’, does the value of the number change, but in all five of the ‘up’ cases, it changes - you are incorrect in saying the method eliminates bias.

The value \*using significant figures only \*does not change. The digits you’re eliminating are insignficant. By going half and half, you average out any bias that insignificant figures might introduce. Yes, that insignificant figure is sometimes 0 - so what? It’s still insignificant.

> [@Punoqllads](#):
>
> No. Irishman’s right. in the case when there is exactly one terminal digit, always rounding 0.5 up will introduce a bias.

See above. Rounding bogus digits to the lower ten 60% of the time and the higher ten 40% of the time \*would \*introduce bias.

Now: _It doesn’t matter what those bogus digits are; they’re bogus._ Acting as if they had significance would introduce bias. It looks like this concept was indeed forgotten along with the slide rule: [Significant figures - Wikipedia](http://en.wikipedia.org/wiki/Significant_figures)

**kevlaw** is right about cases where the digits following the 5 are significant after all.

---

<div class="post-metadata">

**Author:** ![robby](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/robby/32/11048_2.png) [@robby](https://boards.straightdope.com/u/robby)\
**Post date:** [November 6, 2009, 6:28pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/43 "2009-11-06T18:28:10Z")

</div>

> [@Nava](#):
>
> I don’t understand this “round to even” thing.
> 
> 3.5 is as close to 4.0 as to 3.0 - are you saying that it should be to 4.0 because 4 is even?

Yes, but there is subtle distinction that you are missing.

3.5 does not round to 4.0–it rounds to 4. When you round, you are eliminating significant figures. Keeping the same number of significant figures is not rounding. It is changing the number to a different number. You see, 3.5 and 4 represent **the same number**. They just have a different number of significant figures. On the other hand, 3.5 and 4.0 are two different numbers.  
**Now, for anyone who doesn’t understand why the “5 rounds the preceding digit to even” rule is important, I’ve got a simple example that should make it clear.**

Using the “5 rounds the preceding digit to even” rule:  
1.5 –\> 2  
2.5 –\> 2  
3.5 –\> 4  
4.5 –\> 4

If you take the average of the original numbers (1.5, 2.5, 3.5, and 4.5), you get an average of 3.0.

If you take the average of the rounded numbers (2, 2, 4, and 4), you get an average of 3.

See? The data has not been skewed using this method.

On the other hand, if you use the “5 always rounds up” rule that most people are used to, you would round in this manner:

1.5 –\> 2  
2.5 –\> 3  
3.5 –\> 4  
4.5 –\> 5

The average of the original numbers (1.5, 2.5, 3.5, and 4.5) is unchanged. The average is 3.0.

**However, the average of the rounded numbers (2, 3, 4, and 5) is different than that of the original data.** (The average is 3.5).

See? Following this method, you have introduced an upward bias in the data. This is bad.

That’s why you round to even.

Finally, if there are any non-zero digits after the five, you would always round up. So 2.50001 rounds up (whereas 2.5 rounds down).

---

<div class="post-metadata">

**Author:** ![robby](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/robby/32/11048_2.png) [@robby](https://boards.straightdope.com/u/robby)\
**Post date:** [November 6, 2009, 6:47pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/44 "2009-11-06T18:47:15Z")

</div>

> [@kevlaw](#):
>
> …But if its exactly 5, the choice is arbitrary. I proposed that it’s also cultural, Americans round up, Englishman round down.

Unfortunately, both methods are bad, because the American method introduces an upward bias, and the English method introduces a downward bias.

If you use the “5 rounds the preceding digit to even” method, you don’t introduce an upward or a downward bias to the data. I think the only reason this is not taught in elementary school is because it is somewhat confusing, and the “5 rounds up” rule works most of the time.

Note that I did not just make this rule up. I’ve actually got a cite. From _Chemistry: Matter and Its Changes_, by Brady, Russell, and Holum, John Wiley & Sons, Inc., 2000:

> [@](#):
>
> When we wish to round off a number at a certain point, we simply drop the digits that follow if the first of them is less than 5. Thus, 8.1634 rounds to 8.16, if we wish to only have two decimal places. If the first digit after the point of round off is larger than 5, or if it is 5 followed by other nonzero digits, then we add 1 to the preceding digit. Thus, 8.167 and 8.1653 both round to 8.17. **Finally, when the digit after the point of round off is a 5 and no other digits follow the 5, then we drop the 5 if the preceding digit is even and add 1 if it is odd. Thus 8.165 rounds to 8.16 and 8.175 rounds to 8.18.** [emphasis added]

---

<div class="post-metadata">

**Author:** ![Punoqllads](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Punoqllads](https://boards.straightdope.com/u/Punoqllads)\
**Post date:** [November 6, 2009, 6:53pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/45 "2009-11-06T18:53:11Z")

</div>

> [@ElvisL1ves](#):
>
> Rounding bogus digits to the lower ten 60% of the time and the higher ten 40% of the time \*would \*introduce bias.

You’re not rounding up 60% of the time and rounding down 40% of the time. You’re rounding up 45% of the time, rounding down 45% of the time, and leaving the number alone 10% of the time. If you don’t believe me, do a simulation. Generate every integer in the range 1 to 100. Round every number to the nearest tens digit, one run rounding 5 up always, one rounding 5 up if the tens digit is even and rounding 5 down if the tens digit is odd. Here, I’ll do it for you:

Rounding 5 up always: avg is 5.1  
Round 5 up half the time: avg is 5

---

<div class="post-metadata">

**Author:** ![Punoqllads](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Punoqllads](https://boards.straightdope.com/u/Punoqllads)\
**Post date:** [November 6, 2009, 7:45pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/46 "2009-11-06T19:45:36Z")

</div>

Bah. Found two bugs. The fix results in:

sum always rounding up is 5100  
avg is 51

sum round up half the time is 5050  
avg is 50.5

proper sum from 1 to 100 is 100 \* 101 / 2 = 5050, avg is 50.5

Here’s the code for anyone to check my math:

```auto

#!/usr/bin/perl -w

use strict;

my $sum = 0;

for(my $i = 1; $i <= 100; $i++)
{
  my $mod = $i % 10;
  my $val = int($i / 10) * 10;
  if ($mod >= 5)
  {
    $val += 10;
  }
  $sum += $val;
}

print "sum always rounding up is $sum
avg is ", $sum / 100, "
";

$sum = 0;

for(my $i = 1; $i <= 100; $i++)
{
  my $mod = $i % 10;
  my $val = int($i / 10) * 10;
  if ($mod == 5)
  {
    if (int($i / 10) % 2 == 1)
    {
      $val += 10;
    }
  }
  elsif ($mod > 5)
  {
    $val += 10;
  }
  $sum += $val;
}

print "
sum round up half the time is $sum
avg is ", $sum / 100, "
";

print "
proper sum from 1 to 100 is 100 * 101 / 2 = 5050, avg is 50.5
";

```

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [November 7, 2009, 12:00am UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/47 "2009-11-07T00:00:23Z")

</div>

[R](http://www.r-project.org/), which is the standard for statistical computing, uses round towards even.

---

<div class="post-metadata">

**Author:** ![ElvisL1ves](https://avatars.discourse-cdn.com/v4/letter/e/5daacb/32.png) [@ElvisL1ves](https://boards.straightdope.com/u/ElvisL1ves)\
**Post date:** [November 8, 2009, 4:12pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/48 "2009-11-08T16:12:54Z")

</div>

**punoqllads** , you’re not rounding up or down, because you’re not changing “actual” values _at all_. You’re eliminating insignficant figures.

---

<div class="post-metadata">

**Author:** ![runcible\_spoon](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@runcible\_spoon](https://boards.straightdope.com/u/runcible_spoon)\
**Post date:** [November 8, 2009, 5:30pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/49 "2009-11-08T17:30:26Z")

</div>

Couldn’t we just sidestep the whole issue by going to a base-eleven system?

---

<div class="post-metadata">

**Author:** ![Punoqllads](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Punoqllads](https://boards.straightdope.com/u/Punoqllads)\
**Post date:** [November 8, 2009, 7:10pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/50 "2009-11-08T19:10:46Z")

</div>

> [@ElvisL1ves](#):
>
> **punoqllads** , you’re not rounding up or down, because you’re not changing “actual” values _at all_. You’re eliminating insignficant figures.

Whatever it is you’re doing, you’re doing it 10% of the time.

---

<div class="post-metadata">

**Author:** ![Alex\_Dubinsky](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Alex\_Dubinsky](https://boards.straightdope.com/u/Alex_Dubinsky)\
**Post date:** [November 8, 2009, 8:15pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/51 "2009-11-08T20:15:28Z")

</div>

> [@runcible\_spoon](#):
>
> Couldn’t we just sidestep the whole issue by going to a base-eleven system?

Not really. With base-11, instead of having the dividing line be the neat digit 5, it is now between the digits 6 and 5 (it is .5555555). On the plus side you won’t be faced with the “5 dilemma” head-on. But consider this: You take a measurement and it is 12.5. You’d like to round it. Do you round it to 12 or 13? You don’t really know, because you don’t know what digits followed the 5. Were they truncated? If they were truncated, you have to use round-to-even again.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [November 8, 2009, 8:59pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/52 "2009-11-08T20:59:30Z")

</div>

> [@ElvisL1ves](#):
>
> The value \*using significant figures only \*does not change. The digits you’re eliminating are insignficant. By going half and half, you average out any bias that insignificant figures might introduce. Yes, that insignificant figure is sometimes 0 - so what? It’s still insignificant.

The values of the figures is a distraction. Your method does more of one thing than the other, therefore it introduces bias. This can be very easily demonstrated either as in post #22, or by generating a sequence of a few hundred numbers and applying your method, vs conventional rounding and comparing the totals of the three columns.

---

<div class="post-metadata">

**Author:** ![ElvisL1ves](https://avatars.discourse-cdn.com/v4/letter/e/5daacb/32.png) [@ElvisL1ves](https://boards.straightdope.com/u/ElvisL1ves)\
**Post date:** [November 9, 2009, 2:35pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/53 "2009-11-09T14:35:12Z")

</div>

> [@Mangetout](#):
>
> The values of the figures is a distraction.

> [@](#):
>
> Your method does more of one thing than the other, therefore it introduces bias.

Those two statements are inconsistent with each other, if you think a bit more.

Please, look into “significant figures” (Wiki link already provided). The figures you’re eliminating _do not have significance_. They’re noise. Hash. Meaningless. No \*actual \*value is being changed by removing them and using only significant ones instead. There is no net bias introduced by splitting the roundings half and half, but there WOULD be bias introduced by believing they had meaning and by treating them as if they did - such as the approach you describe.

An odd-base system, as **Alex** describes, would require a different method of rounding off nonsignificant figures - perhaps by alternating up and down?

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [November 9, 2009, 3:25pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/54 "2009-11-09T15:25:08Z")

</div>

As long as we’re throwing around Wikipedia cites, let’s see what they have to say about [tie-breaking in rounding](http://en.wikipedia.org/wiki/Rounding#Tie-breaking):

> [@](#):
>
> **Round half up**
> 
> The following tie-breaking rule, called round half up, is widely used in many disciplines:
> 
> ```
> * If the fraction of y is exactly .5, then q = y + 0.5
> 
> ```
> 
> …
> 
> However, the “round half up” tie-breaking rule is not symmetric, as the fractions that are exactly 0.5 always get rounded up. This asymmetry introduces a positive bias in the roundoff errors.
> 
> **Round half away from zero**
> 
> The other tie-breaking method commonly taught and used is the round half away from zero, namely:
> 
> ```
> * If the fraction of y is exactly .5, then q = y + 0.5 if y is positive, and q = y - 0.5 if y is negative
> 
> ```
> 
> …
> 
> This method treats positive and negative values symmetrically, and therefore is free of overall bias if the original numbers are positive or negative with equal probability. However, this rule will still introduce a positive bias for positive numbers, and a negative bias for the negative ones.
> 
> **Round half to even**
> 
> A tie-breaking rule that is even less biased is round half to even, namely
> 
> ```
> * If the fraction of y is 0.5, then q is the even integer nearest to y.
> 
> ```
> 
> This variant of the round-to-nearest method is also called **unbiased rounding** , convergent rounding, statistician’s rounding, Dutch rounding, Gaussian rounding, or bankers’ rounding. For most reasonable distributions of y values, the expected (average) value of the rounded numbers is essentially the same as that of the original numbers, even if the latter are all positive (or all negative).

---

<div class="post-metadata">

**Author:** ![The\_Hamster\_King](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@The\_Hamster\_King](https://boards.straightdope.com/u/The_Hamster_King)\
**Post date:** [November 9, 2009, 6:35pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/55 "2009-11-09T18:35:36Z")

</div>

> [@ElvisL1ves](#):
>
> They’re noise. Hash. Meaningless.

Not true, for virtually every real-world application where you might want to use rounding.

The low digits in a measurement may not be absolutely precise, but that doesn’t mean they’re completely meaningless. If I take my temperature and the thermometer reads “98.3”, I can be fairly confident that my temperature is closer to 98 than 99, even though it’s probably not exactly 98.3. If the “.3” were completely random meaningless noise, I couldn’t make that claim.

---

<div class="post-metadata">

**Author:** ![ElvisL1ves](https://avatars.discourse-cdn.com/v4/letter/e/5daacb/32.png) [@ElvisL1ves](https://boards.straightdope.com/u/ElvisL1ves)\
**Post date:** [November 9, 2009, 6:42pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/56 "2009-11-09T18:42:40Z")

</div>

> [@The\_Hamster\_King](#):
>
> Not true, for virtually every real-world application where you might want to use rounding.

Then you didn’t get the use of significant figures beat into you in high school, either.

---

<div class="post-metadata">

**Author:** ![The\_Hamster\_King](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@The\_Hamster\_King](https://boards.straightdope.com/u/The_Hamster_King)\
**Post date:** [November 9, 2009, 6:48pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/57 "2009-11-09T18:48:56Z")

</div>

> [@ElvisL1ves](#):
>
> Then you didn’t get the use of significant figures beat into you in high school, either.

No, I got numerical methods beat into me in graduate school.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [November 9, 2009, 8:42pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/58 "2009-11-09T20:42:17Z")

</div>

> [@ElvisL1ves](#):
>
> Those two statements are inconsistent with each other, if you think a bit more.
> 
> Please, look into “significant figures” (Wiki link already provided). The figures you’re eliminating _do not have significance_. They’re noise. Hash. Meaningless. No \*actual \*value is being changed by removing them and using only significant ones instead. There is no net bias introduced by splitting the roundings half and half, but there WOULD be bias introduced by believing they had meaning and by treating them as if they did - such as the approach you describe.
> 
> An odd-base system, as **Alex** describes, would require a different method of rounding off nonsignificant figures - perhaps by alternating up and down?

If they had no meaning, there would be no need to split the values half and half - simple truncation would suffice - 0.349 would round to 0.34, because of the lack of meaning in the 0.009.

---

<div class="post-metadata">

**Author:** ![janeslogin](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@janeslogin](https://boards.straightdope.com/u/janeslogin)\
**Post date:** [November 9, 2009, 8:53pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/59 "2009-11-09T20:53:49Z")

</div>

Some Italian, I think, figured it all out in about the year 1900. The round 5s up to even and down to odd was proven to be satisfactory.

The reason so many of us were taught to round 5s up is because most will need it for accounting, not laboratory accuracy and precision.

Oh, and by the way, my experience has been that if you work in a lab don’t argue with your boss about this. Bosses want your approval and your agreement. They have no interest in accuracy, precision or mathematical correctness. That is why they are the boss. Peter Principle goosed them up to their position.

---

<div class="post-metadata">

**Author:** ![robby](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/robby/32/11048_2.png) [@robby](https://boards.straightdope.com/u/robby)\
**Post date:** [November 9, 2009, 11:41pm UTC](https://boards.straightdope.com/t/how-do-you-round-numbers/516440/60 "2009-11-09T23:41:16Z")

</div>

> [@The\_Hamster\_King](#):
>
> Not true, for virtually every real-world application where you might want to use rounding.
> 
> The low digits in a measurement may not be absolutely precise, but that doesn’t mean they’re completely meaningless. If I take my temperature and the thermometer reads “98.3”, I can be fairly confident that my temperature is closer to 98 than 99, even though it’s probably not exactly 98.3. If the “.3” were completely random meaningless noise, I couldn’t make that claim.

> [@ElvisL1ves](#):
>
> Then you didn’t get the use of significant figures beat into you in high school, either.

> [@The\_Hamster\_King](#):
>
> No, I got numerical methods beat into me in graduate school.

There is some confusion here, probably in terminology. Fundamentally, the disagreement lies in when you round in the first place. You don’t round when you make a measurement. You round as the result of calculations.

That being said, here is why **ElvisL1ves** is stating that the digits after the last significant figure are “meaningless hash.”

The number of significant figures in a measured value is equal to the number of digits known for sure (i.e. “certain” digits) **plus one uncertain digit**.

In your example above, **Hamster King** , it is implied that your thermometer is graduated in one-degree increments. Thus you are certain that the temperature is between 98 and 99 degrees. You are **estimating** that the last digit is 3, because, as you say, you can tell that the temperature is closer to 98 than 99.

However, what **ElvisL1ves** is trying to explain to you is that **all of these figures are referred to as “significant figures,” which, by definition, includes all of the certain digits, plus ONE uncertain digit.**

In your example, all three digits of your measurement, including the 3, are significant. Your measurement, in other words, has three significant figures. So if you have an additional digit beyond your uncertain digit (i.e. the last significant figure), it is indeed meaningless.

In this instance, however, there would be no reason to round your measurement. You only round when you combine numbers in calculations.

[Previous page](https://boards.straightdope.com/t/how-do-you-round-numbers/516440.md?page=2)

[Next page](https://boards.straightdope.com/t/how-do-you-round-numbers/516440.md?page=4)
