Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 11-04-2018, 11:51 AM   #1
rand
Pooh-Bah
 
rand's Avatar
 
Join Date: Feb 2007
Location: 314-oc
Posts: 3,747
Help me w/ a stats problem / app design

IDK if this is the first I have mentioned this or not, but I am building a mobile app for poker players that is primarIly a "poker tracker" and am lucky to be able to work on it as a final project in my "Mobile Application Development Class."

I have build a lot of the app already and am pretty happy with the design. But I do have one area that is nagging me and I am spread to thin to focus on it. So I thought I'd try and group think it here and maybe in the PLO forum.

Anyway, one of the tabs is a "reports" tab and one of things we are doing is a histogram w/ count on the Y-axis and $ (or currency, or big blinds) on the X-axis.

So if you have like a max win of $1000 and a max loss of $1000 with 100 entries. Picture a bell curve with histogram bars that range maybe $200 each. So the first bar would be as tall as the number of sessions you have played that fall between -$1000 & -$800. -$799 & -$600, etc.

We will probably put 1 and 2 standard deviation bars on there too.

The problem I have is I need a mathematical model (or at least a good idea) of how to create these groupings for the histogram.

So like obviously (I think) if the user has only made three entries, each histogram bar would be 1 count tall and would just be the net from each session.

But what is a good approach to divide a range (from max loss to max win) into the right (or ideal) groups? I feel like if they have entered 100 sessions there should be like 10 - 20 "groupings." So with a max win = $1000 & max loss = -$1000 each histogram bar would represent a $100 or $200 range and be as tall as the number of sessions that fell with those values: eg -$1000 -- -$800, etc.
rand is offline   Reply With Quote
Old 11-04-2018, 11:51 AM   #2
rand
Pooh-Bah
 
rand's Avatar
 
Join Date: Feb 2007
Location: 314-oc
Posts: 3,747
Re: Help me w/ a stats problem / app design

Someone in the PLO forum mentioned that Excel auto creates bins when doing a histogram. This is basically what I am looking for. Does anyone know the equation used to generate the groupings?
rand is offline   Reply With Quote
Old 11-04-2018, 02:40 PM   #3
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,352
Re: Help me w/ a stats problem / app design

Are you asking how many bins should be used in your histogram (or in a related sense, how "wide" each bin should be)?
RustyBrooks is offline   Reply With Quote
Old 11-04-2018, 02:47 PM   #4
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,352
Re: Help me w/ a stats problem / app design

If so, start here:
https://www.qimacros.com/histogram-e...-bin-interval/

There's not a strict mechanism for it, you sort of just try to make it feel right.
RustyBrooks is offline   Reply With Quote
Old 11-04-2018, 03:26 PM   #5
rand
Pooh-Bah
 
rand's Avatar
 
Join Date: Feb 2007
Location: 314-oc
Posts: 3,747
Re: Help me w/ a stats problem / app design

Quote:
Originally Posted by RustyBrooks View Post
If so, start here:
https://www.qimacros.com/histogram-e...-bin-interval/

There's not a strict mechanism for it, you sort of just try to make it feel right.
Yes that is basically what I am asking. Looking around at the site, it seems that I have to subscribe to access anything.

I need to generalize an approach that will work for 3 data points of 3,000. For a large range or a small range.

There has got to be a simple answer / simple resource. Even if someone could just describe a general framework / approach.

Like what is the theory behind how to do it? I am sure I can make it work from there.
rand is offline   Reply With Quote
Old 11-04-2018, 03:37 PM   #6
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,352
Re: Help me w/ a stats problem / app design

That page I linked tells you how to do it, I didn't have to subscribe or anything

BTW: nothing is going to work for 3 data points, that's not enough to make a reasonable histogram out of. Anything under 10 or 20 and it probably doesn't even really matter
RustyBrooks is offline   Reply With Quote
Old 11-04-2018, 03:40 PM   #7
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,352
Re: Help me w/ a stats problem / app design

Also, unless you want to make things a lot more complicated for yourself, you should probably be recording win/losses over the same interval, like per hour. Per 'session' is not really very good unless the sessions are all the same lengths. There are some techniques to turn session data (winloss and length of session) into estimated hourly numbers, but it's not straightforward, nor particularly accurate.

I wrote an app like this a long time ago, actually before smart phones were even really a thing (it worked over SMS) and I would just alert the player once an hour to enter his stack size and any rebuys made since the last interval. From that I could calculate win/loss per hour.
RustyBrooks is offline   Reply With Quote
Old 11-04-2018, 03:49 PM   #8
rand
Pooh-Bah
 
rand's Avatar
 
Join Date: Feb 2007
Location: 314-oc
Posts: 3,747
Re: Help me w/ a stats problem / app design

Quote:
Originally Posted by RustyBrooks View Post
Also, unless you want to make things a lot more complicated for yourself, you should probably be recording win/losses over the same interval, like per hour. Per 'session' is not really very good unless the sessions are all the same lengths. There are some techniques to turn session data (winloss and length of session) into estimated hourly numbers, but it's not straightforward, nor particularly accurate.

I wrote an app like this a long time ago, actually before smart phones were even really a thing (it worked over SMS) and I would just alert the player once an hour to enter his stack size and any rebuys made since the last interval. From that I could calculate win/loss per hour.
Interesting. Definitely, for a lot of practical reasons. A session is our atomic data point. We will of course calculate an hourly.
rand is offline   Reply With Quote
Old 11-04-2018, 04:06 PM   #9
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,352
Re: Help me w/ a stats problem / app design

Calculating an average win rate from session data is easy, however, calculating standard deviation (per hour) is not. And making a histogram of session outcomes is fairly meaningless unless the sessions are the same length.
RustyBrooks is offline   Reply With Quote
Old 11-04-2018, 08:05 PM   #10
rand
Pooh-Bah
 
rand's Avatar
 
Join Date: Feb 2007
Location: 314-oc
Posts: 3,747
Re: Help me w/ a stats problem / app design

Quote:
Originally Posted by RustyBrooks View Post
Calculating an average win rate from session data is easy, however, calculating standard deviation (per hour) is not. And making a histogram of session outcomes is fairly meaningless unless the sessions are the same length.
I see what you are saying abstractly / theoretically. But as a former pro, I can tell you that practically I would find this useful.

Anyway, thanks for all of the input.
rand is offline   Reply With Quote
Old 11-07-2018, 04:21 PM   #11
jukofyork
Carpal \'Tunnel
 
jukofyork's Avatar
 
Join Date: Sep 2004
Posts: 11,364
Re: Help me w/ a stats problem / app design

Quote:
Originally Posted by rand View Post
But what is a good approach to divide a range (from max loss to max win) into the right (or ideal) groups?
Did you have a look at the wiki page on this? It has quite a good discussion on the different "rules of thumb" in use:

https://en.wikipedia.org/wiki/Histog...bins_and_width

There are also a few good references you could follow on R's manual page:

https://stat.ethz.ch/R-manual/R-deve...ml/nclass.html

Juk
jukofyork is offline   Reply With Quote
Old 11-08-2018, 07:40 PM   #12
Priptonite
Carpal \'Tunnel
 
Priptonite's Avatar
 
Join Date: Jan 2009
Location: Planet Pripton
Posts: 16,288
Re: Help me w/ a stats problem / app design

Do you intend to have a separate plot for each game/level? 1/2NL, 5/10PLO, etc...
Priptonite is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 05:48 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online