See the top rated post in this thread. Click here

Page 1 of 5 123 ... LastLast
Results 1 to 13 of 53

Thread: How to calculate Standard deviation correctly

  1. #1


    Did you find this post helpful? Yes | No

    How to calculate Standard deviation correctly

    When I calculate SD using the formula SD=1.1*Sqrt(N)*Unit size (from BJA3 page 16), I get a number that is different than what CVCX gives me. Am I using the wrong formula?

    For instance, in CVCX if I plug in the following: HiLo Full Indices, 6D, 4 players, H17,DAS,Sr, 80%pen, 70 rounds per hour, play all, 1 hand, $25 min bet, 1:3 spread, 20K bankroll (no, I would never play this way), the recommended bet ramp is 25 at TC<=0, 50 at TC1, 75 at TC>=2. This gives Win/hr of $4.99 and SD/hr of $394.70 with the following count frequencies:
    TC<=-1, Freq. 45.09%
    TC 0, Freq. 26.70%
    TC 1, Freq. 10.91%
    TC >=2, Freq 17.3%

    Based on this, my average bet would be $36.38. So my hourly SD should be 1.1*Sqrt(70)*36.38=$334.81. Why am I off from the $394.70 that CVCX calculates for SD?

    Thanks!

  2. #2


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No
    Answer is twofold. First, 1.1, as stated on p. 16, is an approximation. The exact per-hand s.d. for a blackjack hand depends on both the rules of the game and true count. For liberal rules, the per-hand s.d. averages to about 1.15, but can be either higher or lower depending on the two variables I just stated. For precise s.d.s per true count, see the fourth column of any of the Chapter 10 charts in BJA3 or consult CVCX.

    But, there is a much more important reason why, even if you use the precise s.d.s, you cannot calculate the global s.d. for the entire scenario by using the 1.15 factor on the AVERAGE bet. That doesn't work. You have to do it line by line, bet by bet, true count by true count, using the approach on p. 20 of BJA3. We had this discussion here on another thread just recently. Standard deviation is a square-root function and therefore requires that you calculate variances first (square of s.d.), add them, average them, and then, and only then, take the square root of the sum. Mathematically, if you average first, which you are doing, because of a law called Jensen's inequality (Google it), instead of squaring first, adding, then averaging, the result will always be less than the correct way of doing it.

    Example: Bet sizes: 1, 2, 3. Average bet is 2 (assume equal frequencies, for simplicity). 1.15 x 2 = 2.30. But, that's the wrong s.d. The correct way is: (1^2 + 2^2 + 3^2)/3 = 14/3 = 4.666. Sqrt(4.666) = 2.16. NOW, 1.15 x 2.16 = 2.48, which is greater than 2.30. Q.E.D.

    Clear?

    Don

  3. #3


    Did you find this post helpful? Yes | No
    Very clear. Not at all straightforward, but very clear.
    Thanks so much Don. BTW, your book is absolutely fantastic!

  4. #4


    Did you find this post helpful? Yes | No
    Another question on this topic. How does one calculate cumulative s.d.? For instance, let's say I play one night of $25 minimum, 6D play all with a 12:1 spread and my s.d. per round is $106 and my hourly s.d. is $1,060 (s.d./round * square root of rounds per hour). I play for two hours and my s.d. for that night is $106 * sqrt(200) = $1,499. The next night I play 2 hours of $15 minimum 8D backcounting where my s.d./round is $104, my hourly s.d. is $570 (I'm only playing 30 rounds per hour) and my s.d for that night is $104 * sqrt (60) = $806.

    How do I calculate my s.d. for the two nights combined?

    I'm going through these math gymnastics so I can track my results and know where I stand lifetime. It's easy to figure lifetime EV but no so easy to figure lifetime s.d. (at least for me).

  5. #5


    Did you find this post helpful? Yes | No
    Quote Originally Posted by Cardguy View Post
    Another question on this topic. How does one calculate cumulative s.d.? For instance, let's say I play one night of $25 minimum, 6D play all with a 12:1 spread and my s.d. per round is $106 and my hourly s.d. is $1,060 (s.d./round * square root of rounds per hour). I play for two hours and my s.d. for that night is $106 * sqrt(200) = $1,499. The next night I play 2 hours of $15 minimum 8D backcounting where my s.d./round is $104, my hourly s.d. is $570 (I'm only playing 30 rounds per hour) and my s.d for that night is $104 * sqrt (60) = $806.

    How do I calculate my s.d. for the two nights combined?

    I'm going through these math gymnastics so I can track my results and know where I stand lifetime. It's easy to figure lifetime EV but no so easy to figure lifetime s.d. (at least for me).

    You can calculate cumulative SD by squaring each of your individual SD's multiplying by the number of rounds and adding them all together and divide the sum by the total rounds and then calculate the square root of their sum. The answer will be your cumulative SD.

    So, in your example:

    1499 * 1499 = 2,247,001 * 200 = 449,400,200
    806 * 806 = 649,636 * 60 = 38,978,160

    Total = 488,378,360

    Divided by total rounds of 260 = 1,878,378
    Cumulative SD = Square Root of 1,878,378 = 1,371 for the combined sessions

    Example corrected, I believe this to be as Don S indicated.

    My Bad!
    Good luck.
    Last edited by Stealth; 03-05-2016 at 03:50 PM. Reason: Corrected after being schooled by Don S.
    Luck is nothing more than probability taken personally!

  6. #6


    Did you find this post helpful? Yes | No
    Thanks.
    Best. Forum. Ever.

  7. #7
    Senior Member
    Join Date
    Dec 2011
    Location
    3rd rock from Sol, Milky Way Galaxy
    Posts
    14,158


    Did you find this post helpful? Yes | No
    Wouldn't he need to weight each by number of rounds played?

  8. #8


    Did you find this post helpful? Yes | No
    Yes, the raw s.d. numbers need to be weighted for the frequency. Again, follow the p. 20 examples. Cumulative s.d. is bet size squared, times frequency, and then summed vertically over all bet sizes, before taking the square root.

    In this instance, two-day total s.d. is one-day s.d. squared, multiplied by number of rounds, plus second-day s.d. squared, multiplied by number of rounds, the total now divided by total rounds (weighted average), and the square root of that result. The process is called "root mean square" and is the method for finding any cumulative s.d. from a collection of individual ones.

    The same method is applied to the stock market when calculating the s.d. (volatility) of a stock over various periods of time.

    Don

  9. #9


    Did you find this post helpful? Yes | No
    Here is the simulator of this condition from bjsim with probabilities of 100k rounds.

    http://bjsim.com/Pages/ClientStrategy.aspx?SimID=207

  10. #10


    Did you find this post helpful? Yes | No
    Quote Originally Posted by Tthree View Post
    Wouldn't he need to weight each by number of rounds played?

    Not in my example, the two examples I used were weighted when he did the initial session SD.
    Luck is nothing more than probability taken personally!

  11. #11
    Senior Member
    Join Date
    Dec 2011
    Location
    3rd rock from Sol, Milky Way Galaxy
    Posts
    14,158


    Did you find this post helpful? Yes | No
    Quote Originally Posted by Stealth View Post
    Not in my example, the two examples I used were weighted when he did the initial session SD.
    But isn't that because the example chosen by the OP takes 2 sessions of the same number of rounds each?

    To get the SD for any sample you take the square root of the average of the sum of the squares. If you are wanting to combine results to get a SD for a set of SD's. You need to square each SD. Then you want to multiply each by the number of bets made to get the SD to begin with. Then add the sum of the squares for each group together to get the sum of the squares for the whole group, which is then divided by the total number of bets. You then take the square root of the result to get the SD for all play combined.
    Quote Originally Posted by DSchles View Post
    Yes, the raw s.d. numbers need to be weighted for the frequency. Again, follow the p. 20 examples. Cumulative s.d. is bet size squared, times frequency, and then summed vertically over all bet sizes, before taking the square root.

    In this instance, two-day total s.d. is one-day s.d. squared, multiplied by number of rounds, plus second-day s.d. squared, multiplied by number of rounds, the total now divided by total rounds (weighted average), and the square root of that result. The process is
    Don described it perfectly here. What you are doing is getting each sample back to the sum of the squares by multiplying by the number of rounds to uni the division in the previous computation for the subsets that are being combined for the global computation and redoing the rest of the calculation using global total rounds.

  12. #12


    0 out of 2 members found this post helpful. Did you find this post helpful? Yes | No
    I am in process of creating 100M simulation of the same Scenerio from BJSIM

    http://bjsim.com/Pages/ClientStrategy.aspx?SimID=207

    Results pretty much match qfit. So why Norman think it is incomplete where it can produce the same basic sim as qfit.

    BJSIM IS CAPABLE of tuning it to number of spots per count
    Impact of rebate to player
    Impact of comp to casino

    Counting method name : High-Low
    Card counting : True count
    True count --> Shuffle if true count is equal or EQUAL OR smaller then -99.00
    Even money on A : True count greater or equal to 3
    Insurence on A : True count greater or equal to 3
    Penetration shuffle point : 80 %
    From To Bet in units Occurs% EV%
    0.00 1.00 1.00 27.64 -0.18
    1.00 2.00 2.00 11.28 0.20
    2.00 3.00 3.00 6.49 0.69
    3.00 4.00 3.00 3.76 0.99
    4.00 5.00 3.00 2.31 1.47
    5.00 6.00 3.00 1.34 2.22
    6.00 7.00 3.00 0.82 2.49
    7.00 8.00 3.00 0.48 2.43
    8.00 9.00 3.00 0.29 2.92
    9.00 10.00 3.00 0.17 3.54
    10.00 11.00 3.00 0.09 4.26
    11.00 99.00 3.00 0.11 4.12

    From To Bet in units Occurs% EV%
    0.00 -1.00 1.00 17.04 -0.73
    -1.00 -2.00 1.00 11.80 -1.11
    -2.00 -3.00 1.00 6.68 -1.83
    -3.00 -4.00 1.00 3.97 -2.32
    -4.00 -5.00 1.00 2.32 -2.78
    -5.00 -6.00 1.00 1.39 -3.71
    -6.00 -7.00 1.00 0.83 -4.70
    -7.00 -8.00 1.00 0.51 -4.94
    -8.00 -9.00 1.00 0.29 -6.07
    -9.00 -10.00 1.00 0.18 -6.05
    -10.00 -11.00 1.00 0.09 -5.39
    -11.00 -99.00 1.00 0.11 -8.05

  13. #13


    Did you find this post helpful? Yes | No
    Quote Originally Posted by DSchles View Post
    Yes, the raw s.d. numbers need to be weighted for the frequency. Again, follow the p. 20 examples. Cumulative s.d. is bet size squared, times frequency, and then summed vertically over all bet sizes, before taking the square root.

    In this instance, two-day total s.d. is one-day s.d. squared, multiplied by number of rounds, plus second-day s.d. squared, multiplied by number of rounds, the total now divided by total rounds (weighted average), and the square root of that result. The process is called "root mean square" and is the method for finding any cumulative s.d. from a collection of individual ones.

    The same method is applied to the stock market when calculating the s.d. (volatility) of a stock over various periods of time.

    Don
    Don, is this example correct??.

    So, in your example:

    1499 * 1499 = 2,247,001 * 200 = 449,400,200
    806 * 806 = 649,636 * 60 = 38,978,160

    Total = 488,378,360

    Divided by total rounds of 260 = 1,878,378
    Cumulative SD = Square Root of 1,878,378 = 1,371 for the combined sessions


    If so, why is the cumulative SD now less than the largest of the previous SD's? I have over 3000 sessions that I calculated cumulative SD as the square root of the sum of all sd's squared. It seems that cumultaive SD should be increasing as sessions are added. What am I missing?
    Luck is nothing more than probability taken personally!

Page 1 of 5 123 ... LastLast

Similar Threads

  1. MJ: Standard Deviation
    By MJ in forum Blackjack Main
    Replies: 29
    Last Post: 03-09-2005, 03:30 PM
  2. newtobj: Standard deviation
    By newtobj in forum Blackjack Beginners
    Replies: 7
    Last Post: 08-14-2003, 11:52 AM
  3. Blackdeuce: Standard deviation
    By Blackdeuce in forum Blackjack Main
    Replies: 3
    Last Post: 05-07-2002, 11:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

About Blackjack: The Forum

BJTF is an advantage player site based on the principles of comity. That is, civil and considerate behavior for the mutual benefit of all involved. The goal of advantage play is the legal extraction of funds from gaming establishments by gaining a mathematic advantage and developing the skills required to use that advantage. To maximize our success, it is important to understand that we are all on the same side. Personal conflicts simply get in the way of our goals.