Open Side Menu Go to the Top
Register
Help me w/ a stats problem / app design Help me w/ a stats problem / app design

11-04-2018 , 11:51 AM
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.
Help me w/ a stats problem / app design Quote
11-04-2018 , 11:51 AM
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?
Help me w/ a stats problem / app design Quote
11-04-2018 , 02:40 PM
Are you asking how many bins should be used in your histogram (or in a related sense, how "wide" each bin should be)?
Help me w/ a stats problem / app design Quote
11-04-2018 , 02:47 PM
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.
Help me w/ a stats problem / app design Quote
11-04-2018 , 03:26 PM
Quote:
Originally Posted by RustyBrooks
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.
Help me w/ a stats problem / app design Quote
11-04-2018 , 03:37 PM
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
Help me w/ a stats problem / app design Quote
11-04-2018 , 03:40 PM
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.
Help me w/ a stats problem / app design Quote
11-04-2018 , 03:49 PM
Quote:
Originally Posted by RustyBrooks
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.
Help me w/ a stats problem / app design Quote
11-04-2018 , 04:06 PM
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.
Help me w/ a stats problem / app design Quote
11-04-2018 , 08:05 PM
Quote:
Originally Posted by RustyBrooks
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.
Help me w/ a stats problem / app design Quote
11-07-2018 , 04:21 PM
Quote:
Originally Posted by rand
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
Help me w/ a stats problem / app design Quote
11-08-2018 , 07:40 PM
Do you intend to have a separate plot for each game/level? 1/2NL, 5/10PLO, etc...
Help me w/ a stats problem / app design Quote

      
m