Average raise size by position

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

Average raise size by position

Postby stuart_gall » Fri Jan 27, 2012 7:20 pm

Hello,
I would like to make a stat for a players mean raise size, then filter it by position.

I see in a number of posts the variable "amt_p_raise_size" but I can't find that variable in my stats.

TIA
Stuart.
stuart_gall
 
Posts: 61
Joined: Mon Mar 22, 2010 7:46 am

Re: Average raise size by position

Postby WhiteRider » Sat Jan 28, 2012 7:04 am

"amt_p_raise_made" is not a variable, it is a field in a database table. The field is:

holdem_hand_player_detail.amt_p_raise_made

That is the first raise the player made preflop, and we also have "holdem_hand_player_detail.amt_p_raise_made_2" for the last PF raise. I imagine you want their first raise, though?

To calculate a player's average first raise size, we need a new column like this:

amt_p_1st_raise_ttl =
sum( holdem_hand_player_detail.amt_p_raise_made )

We can then make a stat to divide that by the number of hands the player raised preflop, which is the built-in column "cnt_pfr".

So your stat would be:

amt_p_1st_raise_ttl / cnt_pfr

See the Tutorial: Custom Reports and Statistics for a walkthrough of how to make a stat from expressions like these.

If you want to use this in reports you can just add your new stat to the Positions tab. If you want to see it by position in the HUD you can either use the Position property (Statistic Properties), or if you want it for exact positions instead of EP,MP,LP,blinds see the linked tutorial for how to build that into your stats.

If you want to only include 2bets (i.e. the first preflop raise) then you'll need to include a check for "holdem_hand_player_statistics.flg_p_first_raise" in your columns as well.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Average raise size by position

Postby stuart_gall » Mon Jan 30, 2012 5:54 am

OK - That got me started
I found this works (in case anyone is interested)

amt_p_raise_ttl
sum( if[holdem_hand_player_statistics.flg_p_first_raise AND holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.enum_allin != 'P', holdem_hand_player_detail.amt_p_raise_made,0])

This also excludes open shoves (well it excludes any had with a pf shove) but that is good enough.

Then the stat is
amt_p_raise_ttl / cnt_p_raise_first_in / amt_bb * 2

to get the value in big blinds

Now I can tell if its a normal person making a weird raise or a weird person making a normal raise (^_^)
stuart_gall
 
Posts: 61
Joined: Mon Mar 22, 2010 7:46 am


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

Who is online

Users browsing this forum: No registered users and 1 guest