help creating new stat utilizing average pot

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

help creating new stat utilizing average pot

Postby MaxWeiss » Mon Jun 29, 2009 3:45 am

I'm trying to create a "skill level" stat, which is


(average pot in bb when saw flop) * VPIP * W$WSF


and I'm running into some problems. I'm pretty new to all this, although I've made my own custom stats before, just through trial and error.

For average pot in bb, I'm creating a new column (which I don't even know if I did it correctly), which looks like this

Code: Select all
SUM(holdem_hand_summary.amt_pot / (holdem_limit.amt_bb * holdem_limit.val_nlpl_mult))


and then dividing by number of hands-- but I don't know how to do average pot WHEN SAW FLOP. If I can get that first part right, I assume the rest of the stat looks like this:

Code: Select all
 * (cnt_vpip / cnt_hands) * (cnt_f_saw_won / cnt_f_saw)


I'd really like to have this skill factor stat, so that regardless of how loose or tight a player is, I can judge how good they are with a number that I can have a good idea of what it should be across the board. Any help anybody can give me on how to go about creating this stat would be much appreciated!!!
MaxWeiss
 
Posts: 43
Joined: Sun Feb 10, 2008 10:40 pm

Re: help creating new stat utilizing average pot

Postby WhiteRider » Mon Jun 29, 2009 4:26 am

To do average pot when saw flop you need to SUM the pot when the player saw the flop, like this:

Code: Select all
SUM( if[holdem_hand_player_statistics.flg_f_saw, holdem_hand_summary.amt_pot / (holdem_limit.amt_bb * holdem_limit.val_nlpl_mult), 0] )


See the Custom Statistics and Reports FAQ for an explanation of how SUM( if[ ... ] ) works.

You'll then need to divide that by cnt_f_saw to get the average pot size.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: help creating new stat utilizing average pot

Postby MaxWeiss » Wed Jul 01, 2009 1:33 am

Thank you for the help! I made a new column with the code you used and called it "aaa_cnt_pot_in_bb_when_saw_flop" so that it would show up first! ANd then I made a new stat with the following code:

Code: Select all
(aaa_cnt_pot_in_bb_when_saw_flop / cnt_f_saw) *(cnt_vpip / cnt_hands) * (cnt_f_saw_won / cnt_f_saw)


And it validated and saved just fine, but when I try and put it in the player statistics window on the main tab, it just doesn't show up. Like the stat is listed in the configuration window but when I hit apply, it does not appear. Is there a way to fix this?? Do I need to update the cache or do other housekeeping in order to get it to show up?? Thank you again for all your help thus far!!!
MaxWeiss
 
Posts: 43
Joined: Sun Feb 10, 2008 10:40 pm

Re: help creating new stat utilizing average pot

Postby WhiteRider » Wed Jul 01, 2009 4:34 am

Which section did you create it in?
You will need to create this kind of stat in the 'Holdem Cash Player Statistics' section
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: help creating new stat utilizing average pot

Postby MaxWeiss » Wed Jul 01, 2009 9:59 pm

Yes, it was made in the holdem cash player statistics section.
MaxWeiss
 
Posts: 43
Joined: Sun Feb 10, 2008 10:40 pm

Re: help creating new stat utilizing average pot

Postby WhiteRider » Thu Jul 02, 2009 4:34 am

Ah - did you add a Title and Width in the Format tab of the stat?
If you don't do this then the column won't show.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: help creating new stat utilizing average pot

Postby MaxWeiss » Thu Jul 02, 2009 3:33 pm

Ah, I'm an idiot! Thanks for taking the time to help!!!
MaxWeiss
 
Posts: 43
Joined: Sun Feb 10, 2008 10:40 pm

Re: help creating new stat utilizing average pot

Postby kraada » Thu Jul 02, 2009 3:47 pm

Anybody who has built a reasonable number of stats will have done that at least once - don't feel bad :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests