Geometric mean of tournament players

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Geometric mean of tournament players

Postby Hersir » Wed Aug 02, 2017 2:34 am

Hi, im trying to make a custom stat to use in results tab. Its about the AFS(average field size) im playing. Simple average o the size of the field doesnt translate the real amount becouse one mtt with like 10k players makes the average way too high, since i played for example, 9 mtts in the 100s size and one mtt with 10k player size.
In order to have a better stat to analise correctly the number of players ive been plaing against( this has direct correlation with the amount of variance that will be faced) im trying to make a custom stat of the geometric mean of the amount of players. the calculation works like this:

x root(cnt_tourney_players_of_mtt1*cnt_tourney_players_of_mtt2*cnt_tourney_players_of_mtt3*.......... cnt_tourney_players_of_mtt1x)

In this case im having 2 problems, how to make PT make each of the amount of tournament players multiplied by each of the tournaments in the interval, and how to have "cnt_tourneys" root of that value.

If there is a way to put this stat in the software? it would be really good! I think it would help many other players since this stat could be quite important.

If someone could help me to make this stat i would be really greatful.
Hersir
 
Posts: 5
Joined: Sun Jun 15, 2008 12:10 am

Re: Geometric mean of tournament players

Postby Hersir » Wed Aug 02, 2017 3:41 am

I already managed to discover how to make the x root, i just need to find a way to make the field size of each mtt get multiplied, any ideas?

((cnt_tourney_players1*cnt_tourney_players2*cnt_tourney_players2......*cnt_tourney_playersX) ^(1 / cnt_tourneys))
Hersir
 
Posts: 5
Joined: Sun Jun 15, 2008 12:10 am

Re: Geometric mean of tournament players

Postby Hersir » Wed Aug 02, 2017 4:09 am

I am finding another problem, when i try to 100^(1/2) it gives me 1 instead of 10, i think its considering that numbers smaller than 1 are 0.
What can i do? please someone save me xD
Hersir
 
Posts: 5
Joined: Sun Jun 15, 2008 12:10 am

Re: Geometric mean of tournament players

Postby BillGatesIII » Wed Aug 02, 2017 8:36 am

    You will get into much more troubles but I like it that you try to find a solution :)

    The answer to your last question is quite easy, just change it to 100^(1/2.0) or 100^(1.0/2) so PostgreSQL will use reals instead of integers.
    BillGatesIII
     
    Posts: 740
    Joined: Fri Dec 16, 2011 6:50 pm

    Re: Geometric mean of tournament players

    Postby Hersir » Fri Aug 04, 2017 1:10 pm

    Thanks mate ill try it, still have the problem to multiply all tournament fields in the interval, any ideas for that?
    Hersir
     
    Posts: 5
    Joined: Sun Jun 15, 2008 12:10 am

    Re: Geometric mean of tournament players

    Postby BillGatesIII » Sun Aug 06, 2017 11:08 am

      There is no easy way to multiply the tournament fields, you'll have to write you own function.

      But because of the number of players in (bigger) tourneys, changes are you will run into mathematic overflows if you multiply a lot of tourney. With some simple math, there is a way to work around that.

      See for example here.

      http://datagenetics.com/blog/april42014/index.html
      BillGatesIII
       
      Posts: 740
      Joined: Fri Dec 16, 2011 6:50 pm

      Re: Geometric mean of tournament players

      Postby Hersir » Mon Aug 07, 2017 7:56 pm

      BillGatesIII wrote:
        There is no easy way to multiply the tournament fields, you'll have to write you own function.

        But because of the number of players in (bigger) tourneys, changes are you will run into mathematic overflows if you multiply a lot of tourney. With some simple math, there is a way to work around that.

        See for example here.

        http://datagenetics.com/blog/april42014/index.html

        Thanks mate! Ill try it and return here =]
        Hersir
         
        Posts: 5
        Joined: Sun Jun 15, 2008 12:10 am


        Return to Custom Stats, Reports and HUD Profiles

        Who is online

        Users browsing this forum: No registered users and 15 guests

        cron