How the way we’re taught to round numbers in school falls short
https://ift.tt/CB42bXd
Imagine needing to estimate the total cost of the items in your grocery basket to decide whether to put something back. So you round to the nearest dollar for each potential purchase, using the “round-to-nearest” technique commonly taught in school. That prompts you to round each item’s cost up if the change portion is at least 50 cents and round down if less.
This rounding approach works well for quickly estimating a total without a calculator. And it yields the same results when a particular rounding task is repeated. For instance, rounding 4.9 to the nearest whole number will always yield five and rounding 302 to the nearest hundred will always yield 300.
But this type of rounding can pose problems for calculations in machine learning, quantum computing and other technical applications, says Mantas Mikaitis, a computer scientist at the University of Manchester in England.
“Always rounding to nearest could introduce bias in computations,” Mikaitis says. “Let’s say your data is somehow not uniformly distributed or your rounding errors are not uniformly disturbed. Then you could keep rounding to a certain direction that will then show up in the main result as an error or bias there.”
An alternative technique called stochastic rounding is better suited for applications where the round-to-nearest approach falls short, Mikaitis says. First proposed in 1949 by computer scientist George Elmer Forsythe, stochastic rounding “is currently experiencing a resurgence of interest,” Mikaitis and colleagues write in the March Royal Society Open Science.
This technique isn’t meant to be done in your head. Instead, a computer program rounds to a certain number with probabilities that are based on the distance of the actual measurement from that number. For instance, 2.8 has an 80 percent chance of rounding to three and a 20 percent chance of rounding to two. That’s because it is 80 percent “along the way” to three and 20 percent along the way to two, Mikaitis explains. Alternatively, 2.5 is equally likely to be rounded to two or three.