Rounding
I am doing something here that you should never do, but I feel that this post about rounding is an important for most of you to read.
Watch this video and then read the post from Good Math, Bad Math below
The overwhelming majority of us were taught how to round decimals back in either elementary or middle school. (I don’t even recall exactly when.) The rule that most of us were taught is:
- If the first digit after the rounding point is 0, 1, 2, 3, or 4, then round the previous digit down;
- If the first digit after the rounding point is 5, 6, 7, 8, or 9, then round the previous digit up.
Here’s the problem: those rules are wrong.
The problem is that if the first digit after the rounding point is zero, you’re not really rounding – that is, you’re not doing anything that changes the value of the data point. But if the first digit after the rounding point is 5, then it’s exactly halfway in-between; it’s not closer to the either the rounded up value or the rounded down value – it’s exactly between them. Always rounding 5 up will create a bias, because it’s taking the point at the middle, and shifting it as if it were closer towards the upward side.
To demonstrate, let’s try an easy example. Suppose we’ve got the following set of numbers: {0, 0.5. 1, 1.5. 2, 2.5, 3, 3.5, 4, 4.5}. Let’s compute the mean of those numbers: 22.5/10 = 2.25.
Now, let’s round them off: {0, 1, 1, 2, 2, 3, 3, 4, 4, 5}; and then compute the mean: 25/10 = 2.5.
With the standard rounding rule, we’ve biased the numbers upwards enough to create a significant error!
The correct way to round is to randomly round 5s either up or down. The standard rule, used in most scientific settings, is to pick either odd or even as the “preferred” outcome, and to always round 5s towards the preferred outcome. If we try that with our example, using preferred even, the rounding is {0, 0, 1, 2, 2, 2, 3, 4, 4, 4}. Taking the mean of that, we get 22/10 = 2.2 – which is significantly closer to the mean of the original numbers than the mean rounding 5s up. The practice of rounding up adds a systematic bias to the data. It’s a very small systematic bias, but it’s a real one.
Does it matter? Not usually. As the commentary to the video points out, over the space of a couple of years, that systematic error in rounding gas prices amounts to about a dime. For most things in our daily experience, the difference between random rounding and upward rounding for 5s is just not significant. But if you’re doing statistical analysis of large quantities of data, or you’re doing computations that rely on a high degree of precision, then it can introduce enough error to foul your results. If you’re doing statistical analysis, it can do things like make an insignificant result appear to be statistically significant. If you’re doing high precision computations for things like navigation of a space probe through a gravitational slingshot, it can introduce enough error to crash your probe.
Thoughts and comments please!

