Results 1 to 7 of 7

Thread: Calculating Variance/SD and N0

  1. #1


    Did you find this post helpful? Yes | No

    Calculating Variance/SD and N0

    Can anyone help me with the calculation for variance/standard deviation and N0 in blackjack basic count game? I’m creating a blackjack/card counting simulator for a programing assignment at school and I’m having trouble getting these calculations to be mathematically correct. I know that I can assume that the mean is virtually zero, so my current strategy is to take the gain of each round, square it, add it to a running total, and then divide that by the total number of rounds at the end to get variance. However, this may be mathematically incorrect as I'm not taking into consideration the bets placed at each true count that resulted in this number? Additionally, I want to have functionality for wonging out when having other people at the table (I'm simulating having those other players playing as well), and I wonder if sitting out rounds is effecting the equation? And finally, I'm not sure how to deal with the result of a round where the player has multiple hands on the table (either from splitting or spreading to two hands) - it seems that the variance calculation might not be as simple as total gain of round^2? How to extrapolate that to N0 and standard dev is also a mystery to me… Thanks for any help.
    Last edited by autonymity; 05-10-2024 at 10:36 PM.

  2. #2


    Did you find this post helpful? Yes | No
    I'm assuming you don't have BJA3, where all of this is clearly laid out on page 20. If you do, just go there; if you don't, write back, and I'll explain how to do it.

    Don

  3. #3


    Did you find this post helpful? Yes | No
    Hi Don, thanks for replying. I previously responded, still confused, but I've re-read page 20 and think I am catching on. I would like to run an example by you and see if my sim would be correctly calculating the SD, and then ask just a couple follow up questions:


    I would do the following following:
    To get the bet squared parameters I would take (total-hand-bet/min-bet)^2
    The frequency would be determined by total amount of times count occurred/number of rounds simmed
    The variance would be determined Sigma((gain for hand at count)^2)/(number of rounds that count occurred in the sim - 1)
    The SD for one hand would be sqrt(sum of products/sum of frequencies) * min-bet


    I will fill the following chart in with some dummy numbers to make sure I understand the general procedure
    *keep in mind my sim never allows differing bets below TC -3 or above TC 7


    Say I am playing a game where I bet nothing at a count below 1, bet 1x$25 at count TC 1, 2x$100 at TC 2, and 2x$200 at TC 3:
    Count Bet-squared Hands Frequency Variance Product
    -3- 0 0 0 1.3 0
    -2 0 0 0 1.3 0
    -1 0 0 0 1.3 0
    0 0 0 0 1.3 0
    1 1 1 .1 1.3 .13
    2 16 2 .06 1.8 3.456
    3 64 2 .03 1.8 6.912
    4 64 2 .02 1.8 4.608
    5 64 2 .01 1.8 2.304
    6 64 2 .005 1.8 1.152
    7+ 64 2 .004 1.8 .9216


    one-round SD = sqrt(19.4836/.229) * $25 = $230.60
    hourly SD (at 100RPH) = $240.6 * sqrt(num rounds at counts 1-7+ per hour) = $240.6 * sqrt(sum of frequencies of counts 1-7+ * 100) = $1151.37/hour


    My follow up questions are
    1) Is this calculation of unit size as being my lowest bet correct or should it be the average bet I place, weighted by true counts?
    2) Is my method for figuring out variance at a specific count correct, and how would covariance be calculated? (I'm guessing at 1.3 and 1.8, but would like to generate the exact values)
    3) Why don't hands where the player splits have to account for co-variance?
    4) Can I use the same strategy for play-all and gambler flat bet approaches?


    Thanks so much!
    Last edited by autonymity; Yesterday at 06:19 PM.

  4. #4


    Did you find this post helpful? Yes | No
    Your calculations look good to me.

    Quote Originally Posted by autonymity View Post
    My follow up questions are
    1) Is this calculation of unit size as being my lowest bet correct or should it be the average bet I place, weighted by true counts?

    Lowest bet.

    2) Is my method for figuring out variance at a specific count correct,

    Yes.

    and how would covariance be calculated? (I'm guessing at 1.3 and 1.8, but would like to generate the exact values)

    The formula at the bottom of page 20 is the right way to do it. The 0.50 is the covariance between two hands and is based on the correlation of 0.37.

    3) Why don't hands where the player splits have to account for co-variance?

    Because they're already part of the one-hand calculations. The calculations, such as EV and SD are based on original wagers.

    4) Can I use the same strategy for play-all and gambler flat bet approaches?

    Sure.
    Don

  5. #5


    Did you find this post helpful? Yes | No
    So it seems that if I bet 2x$200, I would first have to get the variance for 1x$200 and then add .5 to it? Unfortunately though the player may not actually bet 1x$200 in their spread. How would you recommend getting the initial variance calculation for 1 hand of $x to then make the full variance calculation for 2 hands of $x = 1 hand var. + .5?

  6. #6


    Did you find this post helpful? Yes | No
    You have the line-by-line SDs for every true count for every conceivable number of decks and rules in the Chapter 10 charts. Just square the SD to get the variance.

    Don

  7. #7


    Did you find this post helpful? Yes | No
    Thanks. Final question: can I bypass making the per-count table if I'm running a sim that keeps track of gain for every round - and simply calculate Sigma((gain for round)^2)/(number of rounds in the sim - 1), not taking into account the count or bet. I understand why the table would be useful for pen and paper, but if I actually have the results of every round through the sim I don't see why I can't just square it and add to a running variance counter then divide at the end?

Similar Threads

  1. Calculating N0
    By PitBoss321 in forum Software
    Replies: 3
    Last Post: 06-09-2021, 06:35 AM
  2. Expect MORE Positive Variance than NEG Variance?
    By Mickey in forum General Blackjack Forum
    Replies: 5
    Last Post: 04-26-2014, 12:59 AM
  3. Help calculating EV
    By bjarg in forum General Blackjack Forum
    Replies: 26
    Last Post: 04-18-2012, 03:30 PM

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.