See the top rated post in this thread. Click here

Page 8 of 8 FirstFirst ... 678
Results 92 to 94 of 94

Thread: New deck at cut

  1. #92


    Did you find this post helpful? Yes | No
    Quote Originally Posted by Cacarulo View Post
    Double.

    Cac
    Also this might be obvious, but did you use the exact same p values for win, lose, push that I had listed?
    Chance favors the prepared mind

  2. #93


    Did you find this post helpful? Yes | No
    Quote Originally Posted by iCountNTrack View Post
    Also this might be obvious, but did you use the exact same p values for win, lose, push that I had listed?
    No, I used the same model that I used for the coin toss, but obviously with the corresponding probabilities. I added the probability of a tie to the probability of winning.
    You can also check those numbers on the website suggested by Don:

    https://sites.google.com/view/krapstuff/home

    I think you also know that my results were simulated, although they coincide quite accurately with the results obtained from online calculators.
    There is no combinatorial analysis involved.

    Sincerely,
    Cac
    Luck is what happens when preparation meets opportunity.

  3. #94


    Did you find this post helpful? Yes | No
    Quote Originally Posted by Cacarulo View Post
    No, I used the same model that I used for the coin toss, but obviously with the corresponding probabilities. I added the probability of a tie to the probability of winning.
    You can also check those numbers on the website suggested by Don:

    https://sites.google.com/view/krapstuff/home

    I think you also know that my results were simulated, although they coincide quite accurately with the results obtained from online calculators.
    There is no combinatorial analysis involved.

    Sincerely,
    Cac
    This is my implementation.

    Code:
    #include <iostream>
    #include <vector>
    #include <cmath>
    
    long long binomialCoefficient(int n, int k) {
        std::vector<long long> dp(k + 1, 0);
        dp[0] = 1;
    
        for (int i = 1; i <= n; ++i) {
            for (int j = std::min(i, k); j > 0; --j) {
                dp[j] = dp[j] + dp[j - 1];
            }
        }
    
        return dp[k];
    }
    
    
    double binomialProbability(int n, int k, double p) {
        long long coeff = binomialCoefficient(n, k);
        double prob = coeff * std::pow(p, k) * std::pow(1 - p, n - k);
        return prob;
    }
    
    // Function to calculate the binomial cumulative distribution function
    double binomialCDF(int k, int n, double p) {
        double cdf = 0.0;
        for (int i = 0; i <= k; ++i) {
            cdf += binomialProbability(n, i, p);
        }
        return cdf;
    }
    
    // Function to calculate the probability of exactly one streak of length l in n trials
    double probabilityOfExactStreak(int l, double p, int n) {
        if (l > n) return 0; // No streaks possible if l > n
    
        double q = 1.0 - p;
        double totalProbability = 0.0;
    
        // Calculating the probability of having exactly one streak starting at position k
        for (int k = 0; k <= n - l; ++k) {
            // Probability of a streak of exactly length l starting at position k
            double probStreak = (k + l < n) ? std::pow(p, l) * q : std::pow(p, l);
    
            // Probability that there are no streaks of length l before k
            double probNoStreakBeforeK = 1 - binomialCDF(l - 1, k, p);
    
            // Probability that there are no streaks of length l after k + l
            double probNoStreakAfterKL = (k + l < n) ? 1 - binomialCDF(l - 1, n - (k + l) - 1, p) : 1;
    
            // Adding the contribution of the streak starting at k and no other streaks of the same length
            totalProbability += probStreak * probNoStreakBeforeK * probNoStreakAfterKL;
        }
    
        return totalProbability;
    
    }
    Chance favors the prepared mind

Page 8 of 8 FirstFirst ... 678

Similar Threads

  1. Don, would you suggest to round down deck estimation in single deck?
    By San Jose Bella in forum General Blackjack Forum
    Replies: 61
    Last Post: 07-12-2022, 03:38 PM
  2. Does Reko work best in single deck or 6 deck or doesn't matter.
    By San Jose Bella in forum General Blackjack Forum
    Replies: 12
    Last Post: 03-14-2018, 01:52 AM
  3. Reko f six deck eight deck exit table strategy
    By monster754rehab in forum General Blackjack Forum
    Replies: 3
    Last Post: 04-06-2016, 08:55 AM
  4. Best count system for 2 deck, 4 deck, 6 deck, 8 deck?
    By DickFer in forum General Blackjack Forum
    Replies: 31
    Last Post: 06-24-2015, 09:56 AM

Tags for this Thread

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.