Quote:autonymityCan anyone help me with the calculation for variance/standard deviation and N0 in blackjack basic count game? I’m an AP 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 SD. 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/entering at specific counts, 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 risk is also a mystery to me… Thanks for any help.

link to original post

You need to decide what you want to calculate. There is no well-defined 'variance' for a hand of blackjack played with a count and a bet spread. Every single hand in the shoe will might have a different variance because the count and bet size both affect variance. In particular, the variance increases as the bet squared (bet^2). The hands that you sit out contribute zero to the overall variance. If you don't ever sit out, but start each show with a min bet, then these first hands will provide the lowest contribution to overall variance. The hands that you play just before the cut card will contribute the most to overall variance.

You can define a variance per shoe. Just simulate hundreds of shoes and take the net W/L outcomes of each shoe and put them in a variance calculator in a spreadsheet. The spreadsheet will correct for the players's edge (which you are not correcting for in your calculation). This variance per shoe result will depend on the number of decks, the rules, the count system, and the penetration.

If you want to calculate an effective variance per hand, you can just divide by the average number of hands in a shoe. This effective variance per hand doesn't mean much. What the gambler will care about is the variance per shoe. He doesn't really care that the variance ramps up as the shoe plays out.

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?

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!

Your product seems to include the number of hands. That is not right. Playing two hands with an increased variance of 1.8 already accounts for the two hands.Quote:autonymityThanks for replying. I'm referencing DS's Blackjack Attack Ed3 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?

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!

link to original post

For example, (6): 64 * .005 * 1.8 = 0.567

If you are doing sims, why not just track the total W/L per shoe and just calculate the variance of that? Even if you want to calculate the variance analytically, this will provide a quick sanity check that your variance is in the right ballpark.

If it is your own sim, you should be able to get this W/L output to send to a spreadsheet (or calculate variance internally). If it is not your sim code, this may be harder to do.

Also: one-round SD = sqrt(19.4836/.229) * $25 = $230.60 seems wrong.

Maybe one-round SD = sqrt(19.4836) * $25 = $110?

You are just adding variance contributions. There is no need to normalize the variance.

Have you been banned for playing BJ at any property?Quote:ChumpChangeYou get banned from Caesar's, there's no telling how many casinos across the country that means. The casinos also flyer each other about players overnight so when you show up the next day at another casino you're already banned when you walk in the door. I'd stick to Spanish 21, nobody seems to get banned for that game. Blackjack seems to be the easiest excuse casinos have to ban anybody for no reason, and they will give you no reason, it's a trap. Also have to brush up on other games if they say you can play any game besides blackjack, so there's baccarat and craps.

link to original post

The mafia never subjected itself to heavy regulatory oversight of every aspect of its operations. I assume all of the US regulated casinos that I play at are dealing table games fairly and are providing RTP values that are correct (or understate the optimum RTP). Every online BJ hand is logged. If they are cheating me, they are providing me all the evidence that I would need to prove it in court.Quote:acesideI actually believe your are right! There are not many fair Blackjack games out there in this country. Casinos are still mafias today.

link to original post

I do have major losing streaks from time to time. It is still gambling after all. I lost $250K at one casino over a short period of time. I expect to have losing streaks of a few std dev from time to time. I never attribute my losing streaks to cheating. But my online lifetime RTP has been somewhat better than I had any right to expect. I am on an enormous heater this year. If the casinos would want to cheat anyone, they should be cheating me.

If you don't play a big +EV opportunity because you are worried about getting cheated or banned, you are only hurting yourself.