What Does ½ Really Round Off To?

The general rule is to round to the even number.

6.5 → 6
5.5 → 6

This means that in a group of numbers, the rounded amounts will cancel out. (Probably not entirely true, but close enough).

The difference is that both 1.4000001 and 1.4 are closer to 1 than they are to 2, but while 1.5000001 is closer to 2 than to 1, 1.5 isn’t. Using lots of decimal places doesn’t make the fact that x.500000000000000 is still exactly between x and x+1 go away.

Whatever your level of precision, rounding exactly x.5 up to x+1 will introduce bias, while some kind of split rounding rule where x.5 is rounded up half the time and down half the time will not.

It’s possible that you don’t care about that bias, or that it’s small enough, given your data set, that the simpler rule (always round up x.5) is a better one. But don’t fool yourself into thinking it’s equal.

If you actually have 9 decimal digits in your measurement and you’re rounding to 0 (seems unlikely), then the amount of bias introduced will be very small on average, but not zero.

This “even number rule” was somehow never taught to me in grammar school, high school, or college (took a couple calc classes and a stats class – I guess we wouldn’t really round in the first.) The only rule I learned was 5 always rounds up, which I found weird for the reasons given: it quite obviously introduces bias. It wasn’t until some time after college I heard the “round to the nearest even” rule.

One good way to see that the apparent symmetry between “round 0,1,2,3,4 down and 5,6,7,8,9 up” is false is to consider other number representations. Like, consider the analogous rule for binary numbers: round 0 down and 1 up.

But that would mean that to round, dropping a decimal, would add something to half the numbers and do nothing to the other half. That really obviously introduces significant bias.

The nearest-even rule only ever appeared to me in a single college chem course. All of my other physics, math, engineering never used the rule and did a simple round up regardless of odd or even.

A previous thread on rounding:

For what it’s worth, the “round 5 to even” rule is called “banker’s rounding”, because banking is one context where you very definitely don’t want to introduce bias.

Incidentally, more complicated rounding rules are possible. For instance, where’s the line of scrimmage in football? It’s always the integer yard line closest (in the judgement of the officials) to where the ball was downed (if it’s unclear which line is closer, then the officials just make a judgement call and choose one)… unless the closest integer yard line is one of the goal lines, in which case it’s rounded to 1 yard.

OK, now here’s a more subtle question: What do you do with negative numbers? Does -1.5 go to -1, because that’s rounding up, or does it go to -2, making the absolute value go up?

People who create computer arithmetic systems have to pay attention to details like this, but most folks (even scientists and engineers), to the extent that they worry about it at all, just let their computer system of choice follow its default behavior. After all, if it matters whether a terminal 5 rounds up or down, then that’s an argument that you shouldn’t have been rounding in the first place.

Me too - at school in the UK in the late 1970s/early 80s, they never introduced us to banker’s rounding - it was just taught as: Digits 0,1,2,3,4 round down; digits 5,6,7,8,9 round up.

This [round to nearest, ties to even] is the default rounding mode if you use IEEE 754 floating-point arithmetic.

This [ties round up] is an alternative rounding mode. So is having ties round away from zero, or towards zero, or randomly, etc.

I know I’ve encountered the “banker’s rounding” rule somewhere, but I can’t remember where or when. Probably not before I got to college.

I think I first encountered it when I was working with the currency data type in Microsoft Access DBs - it rounds to even, and I wasn’t expecting it to

That’s not true. The officials place the ball where they believe it was downed. They never move it up or back to the nearest yard line. If the ball was downed outside of the hash marks they move it in to where the closest hash marks are, but not necessarily directly on a yard line.

Just for the heck of it, I used Excel to round a series of numbers that ended with .5 to an integer. They all (from 0.5 to 10.5) rounded up.

Note that the current version of Excel has 11 different rounding functions for the many various conventions used. There’s ROUND, ROUNDDOWN, ROUNDUP, MROUND, CEILING, CEILING.MATH, EVEN, FLOOR, FLOOR.MATH, INT, and ODD. Each of which does it a different way for a different purpose.

And if you experimented by just altering the cells’ formatting to display fewer (or no) decimal places, that’s a 12th sort of quasi-rounding that doesn’t affect the actual value used in calculations, just how it looks on the screen / paper.

See this for more on rounding in Excel:

The highlight text says Excel 2010, but the info is actually valid from Excel 2007 through current.

Which one of those does unbiased rounding? As I suspected, there’s no mention in the link provided other than to say that ROUND() rounds up for .5 which is more information than you get from microsoft’s ROUND() page.

And also “what are you rounding”. Modern computers commonly store fractions as binary numbers, internally they don’t have ‘numbers that end in 5’ at all. Re-imagining the number as a decimal fraction, then rounding either up or down, is something people do*, but it’s not something that has any sensible numeric explanation, because it involves rounding twice. The ‘smart’ way is to do only binary rounding as necessary, then round the final answer as part of the operation of converting from binary to decimal – an operation similar to decimal rounding, but not involving ‘5’.

* There are other reasons for doing intermediate decimal rounding, but they have more to do with people than with numbers.

I also didn’t learn about rounding n+0.5 to the nearest even number until college physics, when error analysis and propagation was discussed. The topic was further explored in my surveying class. I had never given much though to the rule of always rounding n+0.5 up to the nearest whole number, but after learning the even number rule I wondered how I never noticed the bias issue.

Someone mentioned how Excel will visibly truncate numbers to fit into cells while still retaining the “real” value of those numbers for computation purposes. Most calculators do this too. The display of many calculators limit how many digits can be shown, but there are often one or more “guard digits” which are stored in memory but not displayed. The calculator might display a computed result to 12 digits, but actually stores that result to 13 (or more) digits. You can read more about guard digits here.

Thank you! I thought I was having deja vu all over again. It hasn’t even been a year.

And I too had never heard of Banker’s Rounding. It does at least make some sense.

I misspoke-- The actual line of scrimmage is real-valued, but the reported value will be an integer, and never 0. If the line of scrimmage is 181 inches from the goal line, that’ll show up on the scoreboard as “First and goal, at the 5 yard line”, and if it’s 1 inch from the goal line, it’ll be “First and goal, at the 1”.

So you say. I’m less certain that the universe operates on real numbers. It might use hyperreals, or even the surreal numbers.