See the top rated post in this thread. Click here

Page 1 of 9 123 ... LastLast
Results 1 to 10 of 90

Thread: Don/other experts, How to find covariance of a game ?

  1. #1


    Did you find this post helpful? Yes | No

    Don/other experts, How to find covariance of a game ?

    Hi Don/other experts,



    How to find covariance of a game ?

    There is an example how to find covariance of Blackjack at this link https://wizardofodds.com/games/blackjack/variance/

    Firstly, find total variance of N hands per round, and use the formula,

    Total variance of N hands per round= N* Variance of 1 hand per round+ N * (N-1) * covariance.

    Fro example, variance of 1 hand per round = 1.31 and Total variance of 2 hands per round(through simulations) = 3.565, N = 2,

    So, 3.565 = 2 * 1.31 + 2(1)* covariance

    covariance = (3.565 - 2.62) /2 = 0.4725.

    My question : Is simulations the only way to find total variance of N hands per round ?




    Regards

    James

  2. #2


    0 out of 2 members found this post helpful. Did you find this post helpful? Yes | No
    Of course not. You can also do a combinatorial analysis to find the exact covariance.

  3. #3
    Random number herder Norm's Avatar
    Join Date
    Dec 2011
    Location
    The mote in God's eye
    Posts
    11,245
    Blog Entries
    59


    Did you find this post helpful? Yes | No
    Quote Originally Posted by James989 View Post
    My question : Is simulations the only way to find total variance of N hands per round ?
    For a counting strategy cut card game, yes.
    "Croyez ceux qui cherchent la vérité, doutez de ceux qui la trouvent." --André Gide

  4. #4


    Did you find this post helpful? Yes | No
    Quote Originally Posted by Norm View Post
    For a counting strategy cut card game, yes.
    I speculate that this simulation may need a massive computation power because covariance is the product of two variances. This means a squared amount of computations.

  5. #5
    Random number herder Norm's Avatar
    Join Date
    Dec 2011
    Location
    The mote in God's eye
    Posts
    11,245
    Blog Entries
    59


    Did you find this post helpful? Yes | No
    CVData calculates total variance only as opposed to calculating variance and covariance and using them to calculate total variance. (CVCX is a bit different.) Remember that players can change the number of hands played, and for cover purposes, may not change them based only on the count. Calculation of standard deviation requires almost no time in CVData. This is because this is the only per round, floating point calculation in CVData and the calc is overlapped with other non-FP calcs by the CPU as CPUs perform these operations in parallel. (It's a bit more complicated than that as an FP calc by the CPU keeps a port active for a bunch of cycles that could have been used for a non-FP calc in some CPUs.)

    Below is a further discussion from my book:

    Standard Deviations

    Standard deviations are problematic in simulations for two reasons. First, adding billions of numbers in floating point causes inaccuracies. This is solved by the use of sim cycles discussed earlier, but, somewhat differently than with all other statistics. Since we are adding squares of numbers, the counters are much larger and 32 bit integers are not large enough. So, floating-point is used. This is the only use of floating point in the CVData sim engine.

    Second, SD requires that you find the differences between each data point and the mean of all data points. This is normally easy. But, when you have billions of numbers, there is no way to know the mean of billions of numbers before using each number. There are several possible solutions discussed here.

    Result tables
    – The quickest method is to keep tables of the counts of different results. I believe SBA uses this method. For example, you have a counter for all results of all rounds that have a result of +/-1 unit. Another counter for all counts of +/-2 units. A separate counter exists for each possible round result. When the sim is complete, you can use this table to calculate the standard deviation. No multiplies are performed during the sim, mean can be calculated after the sim, and results are accurate. The table needs to include counters for every possible result. That means half units for insurance and surrender and a round where one player plays seven spots, split to eight hands at each spot, and doubles every hand. But, there is a problem. When you introduce unusual BJ payoffs or custom bonuses, the table becomes unwieldy. You could have a 1,000:1 payoff that hits more than one hand at once. As I was looking for maximum flexibility, I rejected this idea.

    Assume the mean is zero
    – Peter Griffin on page 167 of The Theory of Blackjack points out that the square of the average result can be assumed to be effectively zero. This means that the average squared result and variance are virtually the same in the case of variance of a Blackjack hand. So, we can ignore the calculation of the mean and differences between each result and the mean. And this means we can calculate standard deviation with one pass. This enormously simplifies SD calculations for Blackjack rounds and solves this one problem. BUT, we may want to calculate other standard deviations — for example, the standard deviation of results of Blackjack rebate sessions that include many hands. Assuming a mean of zero will not work in this case. We need another solution.

    Standard deviation for a sample
    – Calculating standard deviations from a sample of events is common. I rejected this, as the standard error of the calculation increases.

    Calculating Running Variance
    – In 1962, B. P. Welford described a method of calculating variance in one pass. Essentially, it recalculates the mean after examining each data point instead of after all data points. The mean is, at first, inaccurate, but becomes more and more accurate. The method is reasonably accurate, although it suffers some loss of precision due to the constant recalculations as well as loss of accuracy. But, the most serious problem is that the recalculation of the mean requires a divide for every hand. This is unacceptable. (CVData/CVCX do not perform divides during a sim cycle.)

    Lagging means
    – The method I settled on for sessions is somewhat like the Welford method, only I recalculate the mean once a sim cycle instead of once a round. By recalculating the mean every one million rounds, the precision, accuracy and speed problems are all solved. In theory, the result will be a tiny bit less accurate than one would expect for the total number of hands run. That is, you might need to run 300 million rounds to get the accuracy that you would expect for 250 million rounds. However, since standard deviation converges far more quickly than EV in Blackjack sims, the results will be as accurate as the EV results.
    Last edited by Norm; 03-02-2021 at 09:31 AM.
    "Croyez ceux qui cherchent la vérité, doutez de ceux qui la trouvent." --André Gide

  6. #6


    Did you find this post helpful? Yes | No
    This is really for mathematicians. It becomes research. Thank you.

  7. #7


    Did you find this post helpful? Yes | No
    Quote Originally Posted by aceside View Post
    Of course not. You can also do a combinatorial analysis to find the exact covariance.
    Are you sure ? I think it may need a massive computation for MULTIPLE HANDS.

  8. #8


    0 out of 1 members found this post helpful. Did you find this post helpful? Yes | No
    Quote Originally Posted by James989 View Post
    Are you sure ? I think it may need a massive computation for MULTIPLE HANDS.
    I am not so sure because I am not a mathematician. If the covariance of two blackjack hands are well defined mathematically, it should have an exact value. You may ask Norm and Don about this.

  9. #9


    Did you find this post helpful? Yes | No
    Quote Originally Posted by aceside View Post
    I am not so sure because I am not a mathematician. If the covariance of two blackjack hands are well defined mathematically, it should have an exact value. You may ask Norm and Don about this.
    If you are not so sure, why did you say that it can be done with combinatorial analysis ? No offense.

  10. #10


    Did you find this post helpful? Yes | No
    Quote Originally Posted by James989 View Post
    If you are not so sure, why did you say that it can be done with combinatorial analysis ? No offense.
    I responded to your post because I am an expert. There are two approaches to blackjack problems. If combinatorial analysis can not solve it, simulation might solve it. Clear?
    Last edited by aceside; 03-02-2021 at 09:31 PM.

Page 1 of 9 123 ... LastLast

Similar Threads

  1. Looking for online casino game experts advice
    By James989 in forum General Blackjack Forum
    Replies: 12
    Last Post: 12-08-2017, 08:40 PM
  2. Where can I find Blackjack game conditions outside of United States?
    By seriousplayer in forum General Blackjack Forum
    Replies: 25
    Last Post: 06-02-2013, 08:11 PM
  3. Replies: 1
    Last Post: 06-24-2005, 04:29 PM
  4. covariance: covariance
    By covariance in forum Blackjack Main
    Replies: 0
    Last Post: 09-19-2004, 11:39 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.