Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Probability Discussions of probability theory

Reply
 
Thread Tools Display Modes
Old 09-02-2009, 05:35 PM   #1
Gunther
centurion
 
Join Date: Oct 2005
Location: California
Posts: 121
Standard Deviation - How does a live player calculate this?

Starting this year, I have been keeping records about each session played at LIVE casinos. One of the values I have been capturing are net results (eg. +$400, -$200, etc). Along with the net result, I have been capturing session time (in hours).

Here is an example of the records:
Session 1: $100 6 hours
Session 2: -$200 4 hours
Session 3: +$500 5 hours
Session 4: -$100 5 hours

I have all of this in an excel spreadsheet and I use that to calculate win rate (expressed in $/hour), net winnings, and graph my results.

I have done extensive searching about how to calculate the standard deviation. If I use the built in excel formula stdev
on the net results, then the duration is not taken into to consideration. Basically, I want to get the standard deviation in units of $/hr. Nearly everything I find about standard deviation as it relates to poker references PokerTracker and the details tab, but I don't use PokerTracker for live poker.

How can I calculate my standard deviation (in $/hr) based on a log of net results and durations like the above table for example?

I can then use excel to do the math and then take my standard deviation and make calculations on my bank roll requirements and variance.

Much thanks!
Gunther is offline   Reply With Quote
Old 09-02-2009, 09:16 PM   #2
statmanhal
Pooh-Bah
 
Join Date: Jan 2009
Posts: 4,220
Re: Standard Deviation - How does a live player calculate this?

Here is one way. Get the standard deviation per hour for each data point. Then use a weighted formula where the weights are the number of hours played.

For example
Win amount Number of hours Win Rate/Hr
120 .....................6 .................... 20
50 .......................2 .................. 25

You have here the equivalent of 8 observations, 6 with a win rate of 20 and 2 with a win rate of 25. Suppose the data were in Columns A, B and C of Excel. The formula for the weighted standard deviation is

=SQRT(SUMPRODUCT((C1:C2-C3)^2,B1:B2)/(SUM(B1:B2)-1))

where C3 = SUMPRODUCT(C1:C2,B1:B2)/SUM(B1:B2), the weighted average.
For this example, the answer is 2.31455.
statmanhal is offline   Reply With Quote
Old 09-04-2009, 04:00 AM   #3
Kittens
Carpal \'Tunnel
 
Join Date: Jun 2009
Posts: 6,020
Re: Standard Deviation - How does a live player calculate this?

Convert each session into $/hr: { +16.66, -50, +100, -20 } , then take the s.d. of that set.
Kittens is offline   Reply With Quote
Old 09-04-2009, 06:17 PM   #4
BruceZ
Carpal \'Tunnel
 
BruceZ's Avatar
 
Join Date: Sep 2002
Posts: 11,877
Re: Standard Deviation - How does a live player calculate this?

Quote:
Originally Posted by statmanhal View Post
Here is one way. Get the standard deviation per hour for each data point. Then use a weighted formula where the weights are the number of hours played.

For example
Win amount Number of hours Win Rate/Hr
120 .....................6 .................... 20
50 .......................2 .................. 25

You have here the equivalent of 8 observations, 6 with a win rate of 20 and 2 with a win rate of 25. Suppose the data were in Columns A, B and C of Excel. The formula for the weighted standard deviation is

=SQRT(SUMPRODUCT((C1:C2-C3)^2,B1:B2)/(SUM(B1:B2)-1))

where C3 = SUMPRODUCT(C1:C2,B1:B2)/SUM(B1:B2), the weighted average.
For this example, the answer is 2.31455.
This is not the proper way to compute standard deviation for sessions of varying duration, and this cannot be done with the standard deviation formula from Excel. The correct formula which gives the maximum-likelihood estimate of the variance σ2 is:





where
Xi is the amount won in the ith session (dollars or bb)
Ti is the duration of the ith session (hours or hands)
µ is the win rate per unit time ($/hr, bb/hand, etc.)
N is the number of sessions
SD is standard deviation

I've included a derivation of this formula below which is essentially the same derivation that appears in the appendix of Mason's Gambling Theory and Other Topics.

Note that the number of terms is equal to the number of sessions played which is the N that we divide by out front, and each term is divided by the duration of each session. The expected result of each session, which is subtracted in each term, is the hourly rate times the duration of the session. Note that the win rate µ is computed over all sessions, not for each session.

Note that by your method, if a player has a session 5 hours long in which he wins $500, you would enter this as 5 hours in which he won $100 each hour. This will give a different result as it implies a greater consistency than we can actually assume.

I can provide an Excel spreadsheet which performs this calculation correctly to anyone interested.

---------

This is the derivation of the maximum likelihood estimator for the variance for sessions of variable length. The derivation is exactly the same as the textbook derivation for sessions of equal length, except that the variance is multiplied by the session length Ti, and the standard deviation is multiplied by . Here is the derivation:

Let X be a vector of session results, and Ti be the duration of the ith session. Each session result Xi is a random variable distributed as a normal distribution of mean Ui = µTi, and unknown variance Tiσ2, where µ and σ2 are the mean and variance for 1 unit of time or number of hands (e.g. 100 hands). The probability distribution of a given observation Xi given σ is:



This is simply the definition of the normal distribution where the standard deviation has been replaced by , and the variance has been replaced by Tiσ2. The conditional probability of a vector of N observations X given σ, called the likelihood function, is obtained by multiplying N of these together, which causes a sum to appear in the exponential, and a product of out front.



To find the value of σ2 which maximizes the likelihood function, it is convenient to take the log of the likelihood function and maximize that. The logs of products become sums.



Taking the derivative of this with respect to σ2 and setting = 0:





Note the similarity of this result to the standard definition of variance for sessions of equal duration. The only differences are that each term inside the sum is divided by the session duration Ti, and the constant mean µ has been replaced with Ui which depends on the duration of each session. If the sessions are of equal length, Ti becomes a constant T which can be removed from the sum, and the sum would be divided by NT which is the total number of hours in N sessions.

To put this in the form found in Mason’s essay, expand the square, and break this into 3 sums:



Since Ui = µTi,



Now since is the sum of the session results, this is the same as the hourly rate µ times the total hours, or , so the second term is . This can be combined with the final term to give Mason’s form:



Caution: This form may be highly susceptible to round off error.

Last edited by BruceZ; 02-13-2010 at 03:00 AM.
BruceZ is offline   Reply With Quote
Old 09-05-2009, 05:54 PM   #5
BruceZ
Carpal \'Tunnel
 
BruceZ's Avatar
 
Join Date: Sep 2002
Posts: 11,877
Re: Standard Deviation - How does a live player calculate this?

I decided to use my above post to teach myself LaTex, the tool that allows formating mathematical equations. So if you tried to read it in its original ASCII version and gave up, you might want to try again now that it is much more readable. This is the formula for computing your standard deviation for sessions of varying duration, along with the derivation of this formula which is the maximum likelihood estimator.
BruceZ is offline   Reply With Quote
Old 09-06-2009, 02:05 AM   #6
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,911
Re: Standard Deviation - How does a live player calculate this?

Quote:
Originally Posted by BruceZ View Post
I decided to use my above post to teach myself LaTex, the tool that allows formating mathematical equations.
Nice!

You know what would be awesome, for a few forums like this one, poker theory, etc, is if you could do something like

[tex]
MARKUP HERE
[/tex]

and it sent it through the latex parser and replaced it with the results - sort of like how the built in HH converter works. Whether or not it should use full latex I don't know - you don't really need the full power of latex with it's \begin{document} and all that, you really just want (for the most part) what you get in the equation environment. So maybe what we need is just

[equation]
[/equation]

for standalone equations, and something similar but different for inline ones (like $my equation here$ in latex)

I used to be a huge latex dork when I was in school, have hardly touched it since. Good stuff though. It used to torture me to watch fellow students struggle with microsoft's equation editor.
RustyBrooks is offline   Reply With Quote
Old 09-06-2009, 02:42 AM   #7
BruceZ
Carpal \'Tunnel
 
BruceZ's Avatar
 
Join Date: Sep 2002
Posts: 11,877
Re: Standard Deviation - How does a live player calculate this?

Quote:
Originally Posted by RustyBrooks View Post
Nice!

You know what would be awesome, for a few forums like this one, poker theory, etc, is if you could do something like

[tex]
MARKUP HERE
[/tex]

and it sent it through the latex parser and replaced it with the results - sort of like how the built in HH converter works. Whether or not it should use full latex I don't know - you don't really need the full power of latex with it's \begin{document} and all that, you really just want (for the most part) what you get in the equation environment. So maybe what we need is just

[equation]
[/equation]

for standalone equations, and something similar but different for inline ones (like $my equation here$ in latex)

I used to be a huge latex dork when I was in school, have hardly touched it since. Good stuff though. It used to torture me to watch fellow students struggle with microsoft's equation editor.
It's almost that simple now. Do you understand that I am calling the Latex parser directly from this text box with

[IMG]http://latex.codecogs.com/gif.latex?
EQUATION HERE
[/IMG]

For inline equations I am currently doing the same thing except adding \textstyle before the equation to reduce the size of the equation to match the text.

There are no intermediate files produced. Jason1990 has a sticky post about this on the Science, Math, Philosophy forum.

Last edited by BruceZ; 09-07-2009 at 01:04 PM.
BruceZ is offline   Reply With Quote
Old 09-07-2009, 12:49 PM   #8
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,911
Re: Standard Deviation - How does a live player calculate this?

Hah, wow no I didn't realize that. That's pretty sweet. I am gonna use the hell out of that, thanks!
RustyBrooks is offline   Reply With Quote
Old 10-13-2009, 01:39 PM   #9
Super_D
stranger
 
Join Date: Oct 2009
Posts: 1
Re: Standard Deviation - How does a live player calculate this?

BruceZ,

Can you pease send me the formula you use in excell to determine standard deviation per hour when the spreadsheet has number of hours played/session and amount won or lost/session. You can e-mail me at david.w.harless@gmail.com
Super_D is offline   Reply With Quote
Old 04-02-2012, 09:23 PM   #10
tringlomane
veteran
 
Join Date: Jun 2011
Posts: 2,486
Re: Standard Deviation - How does a live player calculate this?

Bump to avoid possible future archiving.
tringlomane is offline   Reply With Quote
Old 04-03-2012, 09:31 AM   #11
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,911
Re: Standard Deviation - How does a live player calculate this?

Quote:
Originally Posted by tringlomane View Post
Bump to avoid possible future archiving.
That's no longer happening
RustyBrooks is offline   Reply With Quote
Old 04-03-2012, 03:04 PM   #12
tringlomane
veteran
 
Join Date: Jun 2011
Posts: 2,486
Re: Standard Deviation - How does a live player calculate this?

Oops, missed the memo then. Thanks.
tringlomane is offline   Reply With Quote
Old 04-09-2012, 08:53 PM   #13
Stimpy
newbie
 
Join Date: May 2009
Posts: 23
Re: Standard Deviation - How does a live player calculate this?

If someone industrious wants to add it, I think a proof of consistency as would be more convincing to people and a bit more transparent than just showing that the estimator is ML for normally distributed segments (which may or may not be a reasonable approximation depending on the length of the sessions, but I think the estimator works regardless so long as holds).
Stimpy 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 09:53 AM.


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