It’s also worth noting that if you use the banker’s method of rounding, the expected error is 0. Over the course of a large number of purchases, this can make quite a difference in the probability of being within a certain amount.
If the mean is zero, then for large values of N and small values of X, we have, approximately
P = X*sqrt(24/(pi*N))
So, for N = 5000, the probability that you are within $X of the correct amount is roughly equal to
P = 0.0391 * X
For X = 2 dollars, we have P = 7.8%, about twice as much as before.
In general, the probability that you are within $X of the correct amount is exp(N*15/1e5) times more likely with zero-mean rounding than with non-zero mean rounding.
This means that for N=50,000, the probability that you are within $X of the correct amount is about 1800 times more likely with zero-mean rounding than with non-zero mean rounding (2.5% versus 0.0014% probability)
Here’s an update of the graph from before comparing the two rounding methods.
I do something similar when I work delivering pizza in counting my tips.
I round tip amounts to the nearest quarter dollar, so I have entries like $3.25, $4.00, 1.25, 2.50. At the end of the night, I just tally the dollars ($10), then match the fractional amounts to whole dollars (.50+.25+.25=$1), add them together to get an estimated tip amount ($11).
I’m never usually off by more than $0.25.