standard deviation of average three bet percentage

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

standard deviation of average three bet percentage

Postby skeetymcGrinder » Sat Jan 05, 2013 4:23 am

Hey guys,

Does anyone know how I can query my database to get the standard deviation for a global variable, let's say three bet percentage? Is there a loop or command series that the program uses in graph creation that would output standard deviation of the global data series? I'm by no means an expert at SQL.

The mean seems easy enough to find from the "My Reports" tab, but I wouldn't mind seeing how to query it from the database if there are any SQL savants out there.

Thanks guys,

SMG
skeetymcGrinder
 
Posts: 8
Joined: Wed Dec 12, 2012 1:38 am

Re: standard deviation of average three bet percentage

Postby kraada » Mon Jan 07, 2013 10:36 am

Is this for PT3 or PT4? You posted in the PT3 forum but talk about the interface in a way that makes it sound like you're dealing with PT4.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: standard deviation of average three bet percentage

Postby skeetymcGrinder » Mon Jan 07, 2013 6:34 pm

Oh, whoops! Yes, it's for PT4. Sorry for the confusion.

SMG
skeetymcGrinder
 
Posts: 8
Joined: Wed Dec 12, 2012 1:38 am

Re: standard deviation of average three bet percentage

Postby kraada » Mon Jan 07, 2013 7:17 pm

The easiest way to get this kind of data is going to be straight from the database using our cache.

You can find the columns you need to reference in the Configure --> Statistics area by looking at the Value Expression of the Stat you want to get the data from.

For 3Bet percentage the query you'd want is:

SELECT stddev(cnt_p_3bet / cnt_p_3bet_opp) from cash_cache WHERE cnt_p_3bet_opp > 0;

You need to use the > 0 bit to avoid division by 0 errors. You should get the results in under a second.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: standard deviation of average three bet percentage

Postby Powaqqatsi » Wed Mar 20, 2013 10:33 am

Hi,

That is great information. Is it possible to do that same query but then add an effective stack? So for instance the standard deviation for 3-bet% where the effective stack is 11BB-13BB.

Thanks,
Marcel
Powaqqatsi
 
Posts: 8
Joined: Sun Jun 22, 2008 1:05 pm

Re: standard deviation of average three bet percentage

Postby kraada » Wed Mar 20, 2013 11:20 am

No, that's not possible I'm afraid. You'd need to do something a lot more complicated to make that happen by using subselects to get your dataset instead of using direct comparisons to the cache table.
kraada
Moderator
 
Posts: 54431
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 6 guests

cron
highfalutin