I am a supporter of
St. Joseph's hospice.
 If you find this site useful or if it helped you, consider a small donation to
St. Joseph's, please.

Information on
St. Joseph's

JustGiving - Sponsor me now!

 

Largest Remainder

"It's not that I'm so smart, it's just that I stay with problems longer." [Albert Einstein]

You need to present percentages of some numbers but they need to sum up to 100% EXACTLY?

Example: You have 115, 222 and 333 but their percentages (rounded to 2 decimals) 17.16%, 33.13% and 49.70% add up to 99.99%, not 100%.

This is how it works - see two examples: one for absolute values, the other for percentages (relative values). This method minimizes the absolute error if you need to amend a value:

sbLRM_01_Screen
sbLRM_01_Code

Please notice that this method is a derivation of the Hare-Niemeyer method.

Other, but similar methods are shown at D’Hondt Method and at sbExactRandHistogrm.

If you like to know more about the distribution of sums of rounded percentages, see Mosteller, Youtz and Zahn: "The Distributions of Sums of Rounded Percentages", Demography (1967), 4, p. 850 - 858, or Diaconis and Freedman: "On Rounding Percentages", Journal of the American Statistical Association, Vol. 74, No. 366. (Jun., 1979), pp. 359-364.

If you like to download a 30 KB Excel 2010 © sample file go to my download page, please.

sbLRM_02_Code
sbLRM_03_Code
Sulprobil   Get it done   Contact   Disclaimer   Download