# Rounding of percentages on polls is inaccurate

It looks as though the percentages for polls are based on flooring the results. I understand from this topic that this may be to ensure that they add up to 100%. Problem is, when you have multi-option polls, it starts looking a bit strange.

Here’s an example:

8 of the 9 respondents voted for the second option, which is 88.88% – so this should show 89% percent, not 88%.

This isn’t a major issue; it’s more of a minor niggle which it would nevertheless be nice to resolve.

3 Likes

Another example. After four more votes had been given, two options had received four votes, one had two votes and two had one vote. It appeared that 4 out of 12 (33.3 %) was rounded up to 34 percent, 2 out of 12 (16.7 %) was rounded down to 16 percent and 1 out of 12 (8.3 %) down to 8 percent. The sum of the percentages is 100 again, but I’m not satisfied at all. We manipulated this later in a test poll so you can see it in action here: http://tappara.co/t/discourse-aanestystuloksen-prosenttiosuuksien-pyoristys/2882/7

There is no perfect solution for this problem. I consider that the best would be to accept that the sum isn’t going to be 100 every time. Perhaps you could add a note somewhere which shows when you view results of a poll with more than two options.

Due to rounding, the sum of percentages might not be 100.

3 Likes

I don’t consider the problem to be one of accuracy, but one of precision.

In my experience, the polls that I have seen are more for getting a “rough idea” than being a way to gather any scientifically significant data that would require more precision.
But I can understand how others might want to use the poll feature to get more serious data.

I see two approaches.

• remove the numbers entirely and display only the visual graphing
• show percentage as a float instead of an integer

The first, by nut displaying a numerical percent value, would make it obvious that the results are not always precise.

The second would require changes to the code.
And although it could provide more information, I’m not sure that most of those that use the poll feature require that level of precision nor am I sure members would not see the additional digits as “visual noise”.

1 Like

I think there’s maybe a third option: for polls which allow users to select more than one option, change the presentation of percentages so that they just use a basic round() call, rather than whatever’s going on at the moment to make single-choice polls add up to 100.

I agree that we don’t want too much visual noise – I already hide the total number of votes through CSS (as that really is visual noise – if you really want to know it, you can do some pretty basic maths to find it!) – so I agree with you, @Mittineague, that showing decimal values wouldn’t be particularly useful.

7 years on (or maybe I ought to round it up to 8?!) and I’ve just seen 3 votes cast, in a two choice poll, with 66% and 34% as the result and not 67% and 33% (as I was taught at School/Tech/Uni/Work/Life)- I’d’ve been pulled up for such shoddy work!