sposób zaokrąglania

Osobny dział dla miłośników procentów.
andrzej233
Użytkownik
Użytkownik
Posty: 6
Rejestracja: 6 mar 2019, o 19:24
Płeć: Mężczyzna
Lokalizacja: ciechocinek
Podziękował: 2 razy

sposób zaokrąglania

Post autor: andrzej233 »

Zastanawiam się nad sposobami zaokrąglania pobierania opłat w pewnym portalu. Dajmy na to jest pewna liczba. Od tej liczby pobierany jest dany procent. Sposób zaokrąglania to "Round half to even" - zaokrąglanie połowy do liczby parzystej(?). Co można powiedzieć o tym sposobie? Czy jest bardziej korzystny dla tego portalu, czy większych/mniejszych liczb? Czy niczym się nie różni od innych?

Na angielskiej wikipedii znalazłem takie coś, nie za bardzo to rozumiem :(
Round half to even
A tie-breaking rule without positive/negative bias and without bias toward/away from zero is round half to even. By this convention, if the fractional part of x is 0.5, then y is the even integer nearest to x. Thus, for example, +23.5 becomes +24, as does +24.5; while −23.5 becomes −24, as does −24.5. This function minimizes the expected error when summing over rounded figures, even when the inputs are mostly positive or mostly negative.

This variant of the round-to-nearest method is also called convergent rounding, statistician's rounding, Dutch rounding, Gaussian rounding, odd–even rounding,[6] or bankers' rounding.

This is the default rounding mode used in IEEE 754 floating-point operations (see also Nearest integer function), and the more sophisticated mode[clarification needed] used when rounding to significant figures.

By eliminating bias, repeated rounded addition or subtraction of independent numbers will give a result with an error that tends to grow in proportion to the square root of the number of operations rather than linearly. See random walk for more.

However, this rule distorts the distribution by increasing the probability of evens relative to odds. Typically this is less important than the biases that are eliminated by this method.
sdd1975
Użytkownik
Użytkownik
Posty: 89
Rejestracja: 9 kwie 2017, o 16:17
Płeć: Mężczyzna
Lokalizacja: Radomsko
Pomógł: 5 razy

Re: sposób zaokrąglania

Post autor: sdd1975 »

Hmmm - w porównaniu z tradycyjnym zaokrąglaniem, metoda taka zawsze ALBO da TAKI SAM wynik, ALBO ZANIŻY. Nigdy nie da wartości wyższej. Zatem dla sprzedawcy jest zawsze niekorzystna w stosunku do tradycyjnego zaokrąglania.

Dodano po 18 minutach 35 sekundach:
Jeśli końcówki groszy rozkładają się równomiernie losowo, to w jednym przypadku na dwieście, zaniży o 1 zł, czyli średnio zaniża o pól grosza na transakcję. Przy tysiącu transakcji, stosując "round half to even" tracimy w porównaniu z tradycyjną metodą "round half away from zero", średnio 5 zł.
ODPOWIEDZ