Two Plus Two Poker Forums Standard Deviation - How does a live player calculate this?
 Register FAQ Search Today's Posts Mark Forums Read TwoPlusTwo.com

 Notices

 Probability Discussions of probability theory

 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!  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.  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.
09-04-2009, 06:17 PM   #4
BruceZ
Carpal \'Tunnel

Join Date: Sep 2002
Posts: 11,877
Re: Standard Deviation - How does a live player calculate this?

Quote:
 Originally Posted by statmanhal 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:

$img=http://latex.codecogs.com/gif.latex?\sigma^2+=+\frac{1}{N}\sum_{i=1}^{N}\frac{(X_i-\mu+T_i)}{T_i}^2$

$img=http://latex.codecogs.com/gif.latex?SD+=+\sqrt{\sigma^2}$

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 $img=http://latex.codecogs.com/gif.latex?\textstyle\sqrt{T_i}$. 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: $img=http://latex.codecogs.com/gif.latex?f(X_i+|+\sigma)+=+\frac{1}{\sqrt{2\pi+T_i}+\sigma}+\exp(\frac{\displaystyle+-(X_i+-+U_i)^2}{\displaystyle+2T_i\sigma^2})$ This is simply the definition of the normal distribution where the standard deviation has been replaced by $img=http://latex.codecogs.com/gif.latex?\textstyle\sqrt{T_i}\sigma$, 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 $img=http://latex.codecogs.com/gif.latex?\textstyle\frac{1}{\sqrt{T_i}}$ out front. $img=http://latex.codecogs.com/gif.latex?f(X+|+\sigma)+=+(2\pi\sigma^2)^{-\frac{N}{2}}\Bigg(\prod_{i=1}^{N}\frac{1}{\sqrt{T_i}}\Bigg)\exp\Bigg(-\frac{1}{2\sigma^2}\sum_{i+=+1}^{N}\frac{(X_i+-+U_i)^2}{T_i}\Bigg)$ 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. $img=http://latex.codecogs.com/gif.latex?\log[f(X+|+\sigma)]+=\\+-\frac{N}{2}\log(2\pi)+-+\frac{N}{2}\log(\sigma^2)-+\frac{N}{2}\sum_{i+=+1}^{N}\log(T_i)+-+\frac{1}{2\sigma^2}\sum_{i+=+1}^{N}\frac{(X_i+-+U_i)^2}{T_i}$ Taking the derivative of this with respect to σ2 and setting = 0: $img=http://latex.codecogs.com/gif.latex?\frac{d}{d\sigma^2}\log[f(X+|+\sigma)]+=+-\frac{N}{2\sigma^2}+++\frac{1}{2\sigma^4}\sum_{i+=+1}^{N}\frac{(X_i+-+U_i)^2}{T_i}\Bigg+=+0$ $img=http://latex.codecogs.com/gif.latex?\sigma^2+=+\frac{1}{N}\sum_{i=1}^{N}\frac{(X_i-U_i)}{T_i}^2$ 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: $img=http://latex.codecogs.com/gif.latex?\sigma^2+=+\frac{1}{N}\sum_{i+=+1}^{N}\frac{X_i^2}{T_i}+-+\frac{1}{N}\sum_{i+=+1}^{N}+\frac{2X_iU_i}{T_i}+++\frac{1}{N}\sum_{i+=+1}^{N}+Ui^2/Ti$ Since Ui = µTi, $img=http://latex.codecogs.com/gif.latex?\sigma^2+=+\frac{1}{N}\sum_{i+=+1}^{N}\frac{X_i^2}{T_i}+-+\frac{2\mu}{N}\sum_{i+=+1}^{N}X_i+++\frac{\mu^2}{N}\sum_{i+=+1}^{N}T_i$ Now since $img=http://latex.codecogs.com/gif.latex?\textstyle\sum_{i=1}^{N}X_i$ is the sum of the session results, this is the same as the hourly rate µ times the total hours, or $img=http://latex.codecogs.com/gif.latex?\textstyle\mu\sum_{i=1}^{N}T_i$, so the second term is $img=http://latex.codecogs.com/gif.latex?\textstyle\frac{-2\mu^2}{N}\sum_{i+=+1}^{N}T_i$. This can be combined with the final term to give Masons form: $img=http://latex.codecogs.com/gif.latex?\sigma^2+=+\frac{1}{N}\sum_{i+=+1}^{N}\frac{X_i^2}{T_i}-\frac{\mu^2}{N}\sum_{i+=+1}^{N}T_i$ Caution: This form may be highly susceptible to round off error. Last edited by BruceZ; 02-13-2010 at 03:00 AM.  09-05-2009, 05:54 PM #5 BruceZ Carpal \'Tunnel 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. 09-06-2009, 02:05 AM #6 RustyBrooks Carpal \'Tunnel 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 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 $$MARKUP HERE$$ 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. 09-06-2009, 02:42 AM #7 BruceZ Carpal \'Tunnel Join Date: Sep 2002 Posts: 11,877 Re: Standard Deviation - How does a live player calculate this? Quote:  Originally Posted by RustyBrooks Nice! You know what would be awesome, for a few forums like this one, poker theory, etc, is if you could do something like $$MARKUP HERE$$ 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.

 09-07-2009, 12:49 PM #8 RustyBrooks Carpal \'Tunnel     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!
 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
 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.
04-03-2012, 09:31 AM   #11
RustyBrooks
Carpal \'Tunnel

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 Bump to avoid possible future archiving.
That's no longer happening

 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.
 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 $img=http://latex.codecogs.com/gif.latex?\sum+T_i+\to+\infty$ 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 $img=http://latex.codecogs.com/gif.latex?\mbox{Var}(X_i)+\propto+T_i$ holds).

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Links to Popular Forums     News, Views, and Gossip     Beginners Questions     Marketplace & Staking     Casino & Cardroom Poker     Internet Poker     NL Strategy Forums     Poker Goals & Challenges     Las Vegas Lifestyle     Sporting Events     Politics     Other Other Topics Two Plus Two     About the Forums     Two Plus Two Magazine Forum     The Two Plus Two Bonus Program     Two Plus Two Pokercast     The Best of Two Plus Two Marketplace & Staking     Commercial Marketplace     General Marketplace     Staking - Offering Stakes     Staking         Staking - Offering Stakes         Staking - Seeking Stakes         Staking - Selling Shares - Online         Staking - Selling Shares - Live         Staking Rails         Transaction Feedback & Disputes     Transaction Feedback & Disputes Coaching & Training     Coaching Advice     Cash Game Poker Coach Listings     Tournament/SNG Poker Coach Listings Poker News & Discussion     News, Views, and Gossip     Poker Goals & Challenges     Poker Beats, Brags, and Variance     That's What She Said!     Poker Legislation & PPA Discussion hosted by Rich Muny     Twitch - Watch and Discuss Live Online Poker     Televised Poker General Poker Strategy     Beginners Questions     Books and Publications     Poker Tells/Behavior, hosted by: Zachary Elwood     Poker Theory     Psychology No Limit Hold'em Strategy     Medium-High Stakes PL/NL     Micro-Small Stakes PL/NL     Medium-High Stakes Full Ring     Micro-Small Stakes Full Ring     Heads Up NL     Live Low-stakes NL Limit Texas Hold'em Strategy     Mid-High Stakes Limit     Micro-Small Stakes Limit Tournament Poker Strategy     STT Strategy     Heads Up SNG and Spin and Gos     Mid-High Stakes MTT     Small Stakes MTT     MTT Community     Tournament Events Other Poker Strategy     High Stakes PL Omaha     Small Stakes PL Omaha     Omaha/8     Stud     Draw and Other Poker Live Poker     Casino & Cardroom Poker         Venues & Communities         Regional Communities     Venues & Communities     Tournament Events         WPT.com     Home Poker     Cash Strategy     Tournament Strategy Internet Poker     Internet Poker         nj.partypoker.com         Global Poker         MPN  Microgaming Poker Network         Big Ugly Poker     Commercial Software     Software         Commercial Software         Free Software General Gambling     Backgammon Forum hosted by Bill Robertie.     Probability     Sports Betting     Other Gambling Games 2+2 Communities     Other Other Topics         OOTV         Game of Thrones     The Lounge: Discussion+Review     EDF     Las Vegas Lifestyle     BBV4Life         omg omg omg     House of Blogs Sports and Games     Sporting Events         Single-Team Season Threads         Fantasy Sports     Fantasy Sports, sponsored by Draftboard.com         Sporting Events     Wrestling     Golf     Chess and Other Board Games     Video Games         League of Legends         Hearthstone     Puzzles and Other Games Other Topics     Politics     History     Business, Finance, and Investing     Science, Math, and Philosophy     Religion, God, and Theology     Travel     Health and Fitness     Laughs or Links!     Computer Technical Help     Programming International Forums     Deutsch         BBV [German]     Français     Two Plus Two en Español

All times are GMT -4. The time now is 09:53 AM.

 Contact Us - Two Plus Two Publishing LLC - Privacy Statement - Top