Stats in 3bet pots

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

Stats in 3bet pots

Postby swizz » Sat Dec 11, 2010 5:11 am

Hello,

i'am trying to create some custom stats for 3bet Pots and have to small problems.

For the AF and the AFq i need the stats check, fold, call, raise, bet in 3bet pots.
There is a difference between the fold,check, bet and call and raise.

Example:
cnt_f_fold: sum(if[holdem_hand_player_statistics.flg_f_fold, 1, 0])
cnt_f_check:sum(if[holdem_hand_player_statistics.flg_f_check, 1, 0])
cnt_f_call:sum(holdem_hand_player_statistics.cnt_f_call)
cnt_f_bet:sum(if[holdem_hand_player_statistics.flg_f_bet, 1, 0])
cnt_f_raise:sum(holdem_hand_player_statistics.cnt_f_raise)

For fold, check and call i create the 3betstat as followed and it is working.
3bp_cnt_f_bet: sum(if[holdem_hand_player_statistics.flg_f_bet and (holdem_hand_player_statistics.flg_p_3bet or holdem_hand_player_statistics.flg_p_3bet_def_opp) AND NOT (holdem_hand_player_statistics.flg_p_4bet or holdem_hand_player_statistics.flg_p_4bet_def_opp), 1, 0])

A similar stat for call and raise like
3bp_cnt_f_call: sum(holdem_hand_player_statistics.cnt_f_call) and (holdem_hand_player_statistics.flg_p_3bet or holdem_hand_player_statistics.flg_p_3bet_def_opp) AND NOT (holdem_hand_player_statistics.flg_p_4bet or holdem_hand_player_statistics.flg_p_4bet_def_opp)
isn't working. Could you tell me my mistake in case?

I also wanted to create stats for a donk bet in 3bet pots.
donk flop = cnt_f_donk/cnt_f_donk_opp with

cnt_f_donk: sum(if[holdem_hand_player_statistics.flg_p_face_raise AND NOT(holdem_hand_player_statistics.flg_p_3bet OR holdem_hand_player_statistics.flg_p_4bet) AND holdem_hand_player_statistics.flg_f_bet AND NOT(holdem_hand_player_statistics.flg_f_cbet_opp) AND

((holdem_hand_summary.cnt_players > 2 and holdem_hand_player_detail.val_p_raise_aggressor_pos < holdem_hand_player_statistics.position) or (holdem_hand_summary.cnt_players = 2 and holdem_hand_player_statistics.flg_blind_b)),1,0])

cnt_f_donk_opp:
sum(if[ holdem_hand_player_statistics.flg_p_face_raise AND NOT(holdem_hand_player_statistics.flg_p_3bet OR holdem_hand_player_statistics.flg_p_4bet) AND (holdem_hand_player_detail.flg_f_open_opp) AND NOT(holdem_hand_player_statistics.flg_f_cbet_opp) AND ((holdem_hand_summary.cnt_players > 2 and holdem_hand_player_detail.val_p_raise_aggressor_pos < holdem_hand_player_statistics.position) or (holdem_hand_summary.cnt_players = 2 and holdem_hand_player_statistics.flg_blind_b)) , 1 , 0 ])

In this stat i don't know, there i have to add the constraint " and (holdem_hand_player_statistics.flg_p_3bet or holdem_hand_player_statistics.flg_p_3bet_def_opp) AND NOT (holdem_hand_player_statistics.flg_p_4bet or holdem_hand_player_statistics.flg_p_4bet_def_opp)" to create the stat only for 3betpots.
swizz
 
Posts: 17
Joined: Thu May 15, 2008 5:07 pm

Re: Stats in 3bet pots

Postby WhiteRider » Sat Dec 11, 2010 5:47 am

swizz wrote:cnt_f_fold: sum(if[holdem_hand_player_statistics.flg_f_fold, 1, 0])
cnt_f_check:sum(if[holdem_hand_player_statistics.flg_f_check, 1, 0])
cnt_f_call:sum(holdem_hand_player_statistics.cnt_f_call)
cnt_f_bet:sum(if[holdem_hand_player_statistics.flg_f_bet, 1, 0])
cnt_f_raise:sum(holdem_hand_player_statistics.cnt_f_raise)

These expressions are different because you can only fold, check or bet once per street, but you can call or raise multiple times.

Therefore:
- folds, checks and bets are stored in the database as a boolean value - a "flag", hence flg_f_fold.
- calls and raises are stored as the number of times you called or raises - a "count", hence cnt_f_call.

The expressions that you quote are to count the total number of each action, so cnt_f_call is the total number of times the player called on the flop across all hands. This is different to the number of hands where the player called on the flop
For instance, in one hand if A bets, B calls, C raises, A calls and B call then B has called twice so cnt_f_call = 2.
To count the number of hands where the player called on the flop you need a different expression, like this:
sum(if[holdem_hand_player_statistics.cnt_f_call > 0, 1, 0])
See the built-in column "cnt_f_call_hands".

Please read How Columns are built in the Tutorial: Custom Reports and Statistics for an explanation of the structure of columns like this.


So to build your new columns you need an expression like this (adapted from the expression you posted, with differences in bold):

3bp_cnt_f_call: sum( if[ holdem_hand_player_statistics.cnt_f_call > 0 and (holdem_hand_player_statistics.flg_p_3bet or holdem_hand_player_statistics.flg_p_3bet_def_opp) AND NOT (holdem_hand_player_statistics.flg_p_4bet or holdem_hand_player_statistics.flg_p_4bet_def_opp), 1, 0] )

The same sort of thing applies to your donk stats. There is a section in the tutorial linked above about creating new versions of stats.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Stats in 3bet pots

Postby swizz » Sat Dec 11, 2010 7:30 am

Thank you very much for the detailed answer and the links.
swizz
 
Posts: 17
Joined: Thu May 15, 2008 5:07 pm

Re: Stats in 3bet pots

Postby WhiteRider » Sat Dec 11, 2010 7:33 am

You're welcome - if you have any follow-up questions please ask. If you can't get your stats to work as you like we'll be happy to help you build them. Hopefully the tutorials will get you started, though.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Stats in 3bet pots

Postby swizz » Sat Dec 18, 2010 5:21 am

Hello,

i really have one more question.

Is this right for a donkbet in 3bet pots stat?


3bp_cnt_f_donk:
sum(if[holdem_hand_player_statistics.flg_p_face_raise AND NOT(holdem_hand_player_statistics.flg_p_3bet OR holdem_hand_player_statistics.flg_p_4bet) AND (holdem_hand_player_detail.flg_f_open_opp) AND NOT(holdem_hand_player_statistics.flg_f_cbet_opp) AND ((holdem_hand_summary.cnt_players > 2 and holdem_hand_player_detail.val_p_raise_aggressor_pos < holdem_hand_player_statistics.position) or (holdem_hand_summary.cnt_players = 2 and holdem_hand_player_statistics.flg_blind_b)) and (holdem_hand_player_statistics.flg_p_3bet or holdem_hand_player_statistics.flg_p_3bet_def_opp) AND NOT (holdem_hand_player_statistics.flg_p_4bet or holdem_hand_player_statistics.flg_p_4bet_def_opp) , 1 , 0 ])


3bp_cnt_f_donk_opp:
sum(if[holdem_hand_player_statistics.flg_p_face_raise AND NOT(holdem_hand_player_statistics.flg_p_3bet OR holdem_hand_player_statistics.flg_p_4bet) AND holdem_hand_player_statistics.flg_f_bet AND NOT(holdem_hand_player_statistics.flg_f_cbet_opp) AND ((holdem_hand_summary.cnt_players > 2 and holdem_hand_player_detail.val_p_raise_aggressor_pos < holdem_hand_player_statistics.position) or (holdem_hand_summary.cnt_players = 2 and holdem_hand_player_statistics.flg_blind_b)) and (holdem_hand_player_statistics.flg_p_3bet or holdem_hand_player_statistics.flg_p_3bet_def_opp) AND NOT (holdem_hand_player_statistics.flg_p_4bet or holdem_hand_player_statistics.flg_p_4bet_def_opp),1,0])



I'am not sure if it is working, if i just add "and (holdem_hand_player_statistics.flg_p_3bet or holdem_hand_player_statistics.flg_p_3bet_def_opp) AND NOT (holdem_hand_player_statistics.flg_p_4bet or holdem_hand_player_statistics.flg_p_4bet_def_opp)" at the end of the stat, since some of the variables are already occuring in the stat before, so maybe this could cause some errors? The donk stat is pretty complicated.
swizz
 
Posts: 17
Joined: Thu May 15, 2008 5:07 pm

Re: Stats in 3bet pots

Postby WhiteRider » Sat Dec 18, 2010 5:48 am

That won't cause "errors" as such, but doing things like that you need to make sure you're not adding any contradictions (like "3-bet AND NOT 3-bet" can never be true).

The donk flop stat already includes a check for the player not 3- or 4-betting, but doesn't mention what size of raise they faced. If you want to count only pots where they faced exactly a 3-bet then you only need to add a check for "holdem_hand_player_statistics.flg_p_3bet_def_opp".
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 2 guests