Square root

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

Re: Square root

Postby kraada » Thu Dec 18, 2008 11:26 am

I think I get the idea, though I admit the last time I took statistics was . . . a long time ago.

Either way, what I'd try doing is going into the Expected PP Hit Flop stat and on the Format tab of the stat editor, you can edit the summary expression there. I believe if you explicitly put something to the effect of "2 * 0.322 * cnt_holecard_sqrt" there it should do what you want. I honestly haven't spent too much time working with the summary expressions, though, so you may have to fiddle to get it exactly right? Either way, do keep us posted and let us know if you get it working.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Square root

Postby Dan_Jazz_Man » Thu Dec 18, 2008 12:04 pm

kraada wrote:Either way, what I'd try doing is going into the Expected PP Hit Flop stat and on the Format tab of the stat editor, you can edit the summary expression there. I believe if you explicitly put something to the effect of "2 * 0.322 * cnt_holecard_sqrt" there it should do what you want

That's where I'm trying to do it. Again, cnt_holecard_sqrt is defined as sqrt(cnt_holecard), but there's no way to calculate sqrt(cnt_holecard (all pairs)) in the summary expression - what we get is sqrt(cnt_holecard(AA)) + sqrt(cnt_holecard(KK)) ... + sqrt(cnt_holecard(22)), since the cnt_holecard_sqrt column has the summary type "sum". And, of course, sqrt(A+B+ ... +N) is not equal to sqrt(A)+sqrt(B)+ ... +sqrt(N).
Dan_Jazz_Man
 
Posts: 466
Joined: Sun Feb 03, 2008 5:58 pm

Re: Square root

Postby kraada » Thu Dec 18, 2008 12:25 pm

I'm not sure if you can do it, but if you can access the lookup_hole_cards flags there, lookup_hole_cards.flg_pair is true for all hands that are pairs.

So what about something like sqrt(sum(if(lookup_hole_cards.flg_pair, cnt_holecards, 0)))? That should (I think?) give the square root of the sum of the number of times you had a pair. You can then multiply by whatever else you need.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Square root

Postby Dan_Jazz_Man » Fri Dec 19, 2008 9:55 am

kraada wrote:I'm not sure if you can do it, but if you can access the lookup_hole_cards flags there, lookup_hole_cards.flg_pair is true for all hands that are pairs.

So what about something like sqrt(sum(if(lookup_hole_cards.flg_pair, cnt_holecards, 0)))? That should (I think?) give the square root of the sum of the number of times you had a pair. You can then multiply by whatever else you need.

It's already filtered down to pocket pairs in the report configuration, so it's the same as writing sqrt(sum(cnt_holecard)), which is "not a valid SQL" :evil:
I think I'm going to PM you with the report, I can't figure it out by myself, I'm about to lose my mind already.
Dan_Jazz_Man
 
Posts: 466
Joined: Sun Feb 03, 2008 5:58 pm

Re: Square root

Postby Dan_Jazz_Man » Fri Dec 19, 2008 10:00 am

Oh, .pt3rpt and .zip are not allowed in PMs, and I have no idea how to attach a file to a post here :roll:
Dan_Jazz_Man
 
Posts: 466
Joined: Sun Feb 03, 2008 5:58 pm

Re: Square root

Postby kraada » Fri Dec 19, 2008 10:46 am

I've sent you a PM on how to get the files to me.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Previous

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

Who is online

Users browsing this forum: No registered users and 12 guests

cron
highfalutin