General Discussion

General DiscussionDotabuff STUFF- Can someone explain my why my global winrate got stuc...

Dotabuff STUFF- Can someone explain my why my global winrate got stuck at 49.60% ? in General Discussion
Vertoxity

    Yesterday I won the game, and it didn't add up to my global-winrate percentage. 30 mins ago I lost one match, and I still have the same winrate I had - 49.60%

    Anyone had the same problem?

    Riguma Borusu

      The problem is you played 6000+ games at which point winrate for a single lost/won game will change by less than 0.015% which just might be on the edge of dotabuff's rounding mechanism.

      Riguma Borusu

        Also don't look there, this is what you want:

        https://www.dotabuff.com/players/172744662/trends

        Here the winrate change is just barely enough to go from x.75% to x.76% and back.

        Vertoxity

          I'm not good with math, but shouldn't you lose 0.01% or gain 0.01% each time you win/lose?

          It's clearly counted my previous matches as: 49.61% vs 49.60, etc.

          Tento komentář byl upraven
          Riguma Borusu

            I'm not good with math, but shouldn't you lose 0.01% or gain 0.01% each time you win/lose?

            It's clearly counted my previous matches as: 49.61% vs 49.60, etc.

            In theory, winrate change is proportional to your current winrate, and you don't gain the same percentage when you have 40% winrate or when you have 60% winrate, that's not how percents work.

            If you play 2 games total, and win 50%, then the next win brings that up to 66.67% but if you lose the game it brings your winrate down to 33.33% and that looks like a consistent swing. However, if you lose one more game after this, it brings your winrate down to 25% but if you win it brings it up to 50% and I am sure you can tell that 25% is closer to 33.33% than 50% is. The lower your winrate, the higher the impact of winning a game is, the lower your winrate, the lower the impact of a winning game is. If this were not true, you could get to 100% winrate just by winning a lot of games (by having constant climbs of, say, 0.01%) and obviously we know that can't happen.

            Also, there are only two decimals in 40.xy% and there will be rounding errors due to this.

            For example, if 40.6095 gets rounded as 40.60 (which is the case where additional decimals are not computed, but rather ignored), then the next game you win will easily go over the rounding threshold and you'll basically get 40.61 even if you had 10k games. If 40.605 gets rounded to 40.61 (which can happen if we take additional decimals into the account), then your winrate will be overstated on the profile, while it's actually slightly less than 40.61. But if you lose a game at this point, the swing down will be much more significant, since even a 0.001 change in your overall winrate (down to 40.604) will bring it down by a whole 0.01 (from 40.61 to 40.60) due to rounding.

            If 40.601 gets rounded to 40.60, that's a completely different thing then, and depending on your current winrate, might not make it all the way to 40.61 if you win a game and have played too many of them already (say, if extra decimals are ignored, 40.60999 will still be rounded to 40.60 instead of 40.61). But again, a slight nudge above 40.60999 will change the second decimal to 1 from 0, which will make a visible change on your profile.

            I don't care to analyze this in any more depth, and I don't even know which games dotabuff takes into the account, what rounding algorithm it uses, all I know is that things like this happen either with big numbers (where there's a finite number of bits in calculations), or with badly written math code (where things aren't rounded up properly, and decimals end up ignored, or are treated in an inconsistent manner).

            Tento komentář byl upraven
            Switchblades

              Wow.

              Vertoxity

                I see. Thanks.

                Feachairu

                  wat a very math person

                  Riguma Borusu

                    Oh and just to clarify something to give you a frame of reference:

                    So the amount of winrate % you gain is a function of number of games played and the current winrate.

                    w is the number of games you won
                    n is the total number of games
                    w' is winrate increment in relation to current w/n

                    (w + 1)/(n + 1) is your winrate IF you win an additional game
                    w/n is your winrate at the moment

                    so you get this

                    w' = (w + 1)/(n+1) - w/n

                    For 6000 games and 3000 won games (so, 50% winrate), this reads:

                    w' = (3000 + 1)/(6000 + 1) - 3000/6000
                    w' = 3001/6001 - 3000/6000
                    w' = 0.00008331944

                    Now, to get a PERCENT rather than ratio, multiply that by 100:

                    w' * 100 = 0.008331944% ~ 0.008%

                    So, if you have 6000 games played and are close to 50% winrate, your change per win will be close to 0.008% and the lower your winrate, the bigger this number becomes, but there's got to be a point at which this number is less than 0.01% (like in this case), where it simply doesn't have enough of an effect to have a single game modify your visible winrate, and under some circumstances, due to rounding errors, even a 0.01% swing won't be visible, as I've demonstrated.

                    Tento komentář byl upraven
                    Riguma Borusu

                      So let's put your numbers into this.

                      You have 2884 wins, 2851 loses, and 80 abandons. Your winrate reads 49.60% over 5815 games.

                      w = 2884
                      n = 5815

                      Alright, so let's see what your w' would be at this point:

                      w' = (2884 + 1)/(5815 + 1) - 2884/5815
                      w' = 0.00008666459

                      Let's multiply this by 100 and round it down a bit...

                      w' * 100 ~ 0.0087%

                      So as you can see, if you win a game right NOW, you will gain 0.0087% winrate, which is less than the 0.01% precision of shown data. Again, this might nudge the winrate 0.01% above if your real winrate is actually higher than what is displayed, but what happened to you is a case where you gained 0.0087% winrate, lost it and after rounding was applied, the two decimal number did not change in either case.

                      Oh and also your ACTUAL winrate is 49.5958727429% so yeah as you can see the rounding mechanism turns it into 49.60 because it takes the whole number into an account (or at least the third decimal), and doesn't just chop off decimals. If you win the next game, your winrate will be 49.6045392019% and it will also be rounded down to 49.60% if the system only looks at the third decimal to figure out whether to +1 the previous one. If the system takes all decimals into the account, then it will be 49.61 because the 4th decimal (5) will round the third decimal (4) to 5, and this in turn will turn the 2nd decimal (the one you can see) to 1.

                      So if you win the next game, your winrate will either be 49.60 or 49.61 depending on how the rounding mechanism is implemented (whether it only considers the third decimal, or all decimals past the second one).

                      Here I am presuming that 0.5 rounds to 1.0 and not 0.0, in some rounding implementations 0.6 will turn into 1.0 but not 0.5.

                      Welcome to the fun world of math, programming and rounding inconsistency, and the cause of pain for many programmers worldwide.

                      Tento komentář byl upraven
                      Vertoxity

                        Holy shit man. I've never actually knew this shit exists. Thank you so much for explaning this.

                        Btw, one thing: this ain't fun, at least not for me. :D But it's good to know, for sure.

                        Giff me Wingman

                          abandons count as loss u fuck

                          Riguma Borusu

                            Holy shit man. I've never actually knew this shit exists. Thank you so much for explaning this.

                            Shit like this is literally my job. Though I haven't taught a math class in a while, mostly been teaching OOP basics lately.

                            Btw, one thing: this ain't fun, at least not for me. :D But it's good to know, for sure.

                            It's only fun when you dig in deep.

                            abandons count as loss u fuck

                            What exactly is this replying to?

                            Tento komentář byl upraven
                            Giff me Wingman

                              ur little brainless head.

                              Riguma Borusu

                                ur little brainless head.

                                I am asking because my calculations actually regarded abandons as loss, and they line up with DB's calculations.

                                lm ao

                                  What a fucking nerd

                                  eXcel

                                    I don't care to analyze this in any more depth

                                    ...

                                    Kotato

                                      fake quote

                                      Riguma Borusu

                                        ...

                                        Well, I finished my obligations faster than I thought, so I gave it some more thought.