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

Average Pot

Postby pokerjim » Thu May 20, 2010 9:22 pm

Wanting to see average pot size, a found the following thread which seemed to be exactly what I wanted:

http://www.pokertracker.com/forums/view ... 9&p=138706

I then followed these instructions from the thread naming the new stat Avg Pot:

Create the following column in the Holdem Cash Player Statistics section (in Configure --> Configure Statistics):
amt_total_pot: sum(holdem_hand_summary.amt_pot)
Then on the Stats tab create the stat as (amt_total_pot / cnt_hands). The resulting value will be in dollars.

Then I created a report is the Holdem Cash Player Statistics section with the following items - Player, Amount Won, Hands, Avg Pot. When I ran this report Avg Pot didn't appear, not even the column heading. Then I changed the Avg Pot stat value expression to just cnt_hands. Now the Avg Pot value expression is identical to the Hands stat already in the report. The column still didn't appear on the report. Then I renamed the stat to see if I might have some kind of name conflict, still nothing. Finally, I created another stat, Test with a value expression of amt_bb_won. I added this to the report and it didn't appear either.

What am I doing wrong?
pokerjim
 
Posts: 12
Joined: Sun Mar 09, 2008 8:17 pm

Re: Average Pot

Postby pokerjim » Thu May 20, 2010 11:45 pm

Please disregard this post, I found the answer in another thread.

If anyone else is interested, the answer is to add a column title and width to the format tab of the new statistic.
pokerjim
 
Posts: 12
Joined: Sun Mar 09, 2008 8:17 pm

Re: Average Pot

Postby fritos » Fri Aug 20, 2010 8:02 am

Bump.

Tried this and got a problem, since the results are in $. If I want to get it in BBs, I need to divide by holdem_limit.amt_bb. But how do I reference the "correct" field in the table holdem_limit?

I have holdem_hand_summary.id_limit, which references to holdem_limit.amt_bb, but how to I reference the correct line? I think I need something like holdem_limit.amt_bb[holdem_hand_summary.id_limit] or similar, but what's the correct way to express this?
fritos
 
Posts: 38
Joined: Wed Feb 04, 2009 5:15 pm

Re: Average Pot

Postby kraada » Fri Aug 20, 2010 8:45 am

That won't do it because it will be the average pots over the lifetime of each player averaged together.

There is a new variable in the latest beta: var_live_avg_pot - create a stat that just displays that variable in a table average (or Hero Only, I think it'll work in both) group and you'll see the table average for the last 10 pots at the table in the HUD.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Average Pot

Postby fritos » Fri Aug 20, 2010 8:48 am

Well, I don't want an average of the last 10 pots or w/e, I don't even want it for the HUD. I want a stat that returns the average potsize based on whatever filter I set. Like: What's the average potsize of those hands where I c/r the flop. Etc.
fritos
 
Posts: 38
Joined: Wed Feb 04, 2009 5:15 pm

Re: Average Pot

Postby kraada » Fri Aug 20, 2010 8:53 am

Ah I see, my apologies, most people want this for the HUD that request it.

You'll want to create a column that's amt_total_pot_bbs with definition sum(holdem_hand_summary.amt_pot / holdem_limit.amt_bb), then divide that in the stat by the column cnt_hands. The way the SQL query works, each pot will be matched with the appropriate limit so you'll end up with the sum of all pots in big blinds, divided by hands, which is the average pot size in big blinds per hand.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Average Pot

Postby fritos » Fri Aug 20, 2010 9:05 am

Ok, great, that works, thanks.

One minor thing still: If I add this stat to, for example, the "player statistics" field on the "general" tab, the values for the different stakes seem to be correct (at least they're making sense), however the bolded total line at the bottom shows "0.00".

Similar if I add the stat to the known final hand summary on the hands-tab. For each final hands line (2pr, str8 etc.) the individual value makes sense, but the bolded total line at hte bottom shows 0.00. I suspect I have done some formatting of the stat wrong?
fritos
 
Posts: 38
Joined: Wed Feb 04, 2009 5:15 pm

Re: Average Pot

Postby kraada » Fri Aug 20, 2010 10:53 am

Make sure the format summary type is Sum in the column you created - what did you put in the format summary expression of the stat?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Average Pot

Postby fritos » Fri Aug 20, 2010 10:57 am

Yep that solves it. Thanks.
fritos
 
Posts: 38
Joined: Wed Feb 04, 2009 5:15 pm


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

Who is online

Users browsing this forum: No registered users and 0 guests