Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This problem arose while tallying votes in a poll and displaying the results as a whole number percentage. So if "Option A" received $300$ votes and "Option B" received $100$, the display should read "$75\%$, $25\%$".

There is a requirement that the integer percentages must add up to $100\%$. Which means that rounding up one percentage will cause the other to round down.

How should the following percentages be rounded?

  1. $20.5\%$ & $79.5\%$ (which one rounds up?)
  2. $49.5\%$ & $50.5\%$ (equal or not?)
  3. $0.5\%$ & $99.5\%$ (is $0.5\%$ statistically significant?)

I tend to feel that the small numbers should be given more priority (so $0.5\%$ rounds up to $1$, while the $1\%$ difference in the $49.5$/$50.5$ split gets increased to $2\%$ giving $49$/$51$).

Is there any "one rule to round them all"?

share|improve this question
1  
There is no rule, so I cannot give an answer. I would be in sympathy with giving small numbers priority up to about $30\%$, but no later. –  André Nicolas Aug 19 '12 at 8:48
add comment

2 Answers

up vote 1 down vote accepted

This answer doesn't address the stated questions (1), (2), and (3), but rather suggests a nice mathematical interpretation of the problem (generalized to more than two options). You have $n$ values $p_1, p_2, \ldots, p_n$ which add up to an integer sum $s$, in this case $s = 100$. You can divide each of them into integral and fractional parts $p_i = q_i + r_i$, where $q_i$ is an integer and $r_i$ is a real number in $[0, 1)$. Clearly $r_1 + r_2 + \cdots + r_n$ must be an integer, say $k$. The rounded form of each value is either $q_i$ or $q_i + 1$; that is, we will replace each $r_i$ with either zero or one. We are allowed only $k$ ones. Then the question is, which of the $p_i$ should get one of the $k$ ones, and which ones should not?

A natural way to do this is to define some function $f$ which tells how much each value "deserves" a one. Then you take the top $k$ values according to $f$ and give them ones (i.e. round them up) and give the rest zeroes (round them down). If you wanted to treat all values equally, you would set $f = q_i$. For example, if you had values $33.3\%$, $33.3\%$, and $33.4\%$, then $k = 0.3 + 0.3 + 0.4 = 1$, and the values of $f$ are $0.3$, $0.3$, and $0.4$, so you round as $33\%$, $33\%$, and $34\%$. (This is better than rounding each value independently, because then you get $33\%$, $33\%$, and $33\%$, and you've dropped a percentage point in the process.) If you want to give low values a boost, you could try $f = q_i + (s-p_i)/s$. Then a value of, say, $2.xx\%$ need only be at least $2.02\%$ to beat $50.5\%$ and $90.9\%$ in the Who Wants to Be Rounded Up competition.

share|improve this answer
    
Thanks Rahul for the clear explanation. It's interesting that for n>2 this problem occurs at values other than ri = 0.5 –  Peter Gibson Aug 26 '12 at 0:10
add comment

As far as I know there is no rule. I would be rounding as:

$1) 21\% / 79\%$ (small number rounds up)

$2) 49\% / 51\%$ (to show the difference)

$3) 1\% / 99\%$ (small number rounds up)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.