Thread: Probability Help - Math Geniuses Here

  1. #16
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    > The chances are creater because you can get two pairs in more ways, for example 6, 6, 5 in the flop and 5, 10 in your hand, but I think 2.02% answers Brain's question

    His question was pretty vague - "the cards you want". Assuming this is hold 'em, cards you want are not going to be limited to just pairing something up. Like I said, if he's just doing this as a mathematical exercise, he's ok, but if he's trying to seriously analyze his odds of improving his hand, he's going to shoot himself in the foot.

  2. #17
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    Let me take a crack at this...

    Sang-drax has the right answer, but its not so obvious why its the right answer.

    Break the cards into three sets, one set of three, call it X, with the cards that match the suit of the first card. Second set Y with the cards that match the suit of the second card. And the third set Z, with the cards that dont match either suit. X and Y both have 3 cards in them, and Z has the remainder, 44.

    Now think about being dealt three cards. The chance that the first card matches the suit of one of your first two cards is 6/50, since the card can be from either set X or Y and there are 50 cards left in the deck. Then the probability of having the second card match the suit of the card _that was not matched_ by the previous card (making the second pair) is 3/49. Then, the third card cant match the suit of the other cards because then you would have a full house, so the last card must come from set Z, and the probability getting a card from set Z is 44/48. That gives you (6/50)(3/49)(44/48).

    But what if the first card did not match the suit, or the second card? As Mathfan stated there are three cases. The card that doesnt match a suit can be either the first, second or third card. Finding the probability of each of the three cases and summing them you get

    (44/50)(6/49)(3/48) + (6/50)(44/49)(3/48) + (6/50)(3/49)(44/48) = .0202
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

  3. #18
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    > Then, the third card cant match the suit of the other cards because then you would have a full house

    Wait, what?

    edit: I think you've got suits confused with the numbers of the card.
    Last edited by Govtcheez; 06-08-2005 at 09:29 AM.

  4. #19
    Red Panda basilisk's Avatar
    Join Date
    Aug 2001
    Posts
    219
    agree with cheez on this one - if its a mathematical query on probability of a card coming up in 3 cards then fine but if you are calculating odds for whether to fold, raise or check then you also have to take into account pot odds and your position at the table (in respect to the dealer) - from this you can work out your effective odds.
    Do not meddle in the ways of dragons, for thou art crunchy and taste good with ketchup

  5. #20
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Quote Originally Posted by Sang-drax
    Solving this problem by expanding the cases isn't very good. It's easy to miss a few cases and when the problem gets more complex the method becomes really impractical.

    The number of ways the three cards can be chosen: 50 C 3
    This is the same as I posted before.

    The number of combinations exactly one 5 and exactly one 10: 3 * 3 * (50-6)
    (3 fives, 3 tens and the last card could be anything but one of those six cards)

    Divide these two numbers and the resulting probability is 0.0202

    This is the probability to get two-pair (not full house or trips) with the two different cards you hold on your hand after the flop (three cards).

    The chances are creater because you can get two pairs in more ways, for example 6, 6, 5 in the flop and 5, 10 in your hand, but I think 2.02% answers Brain's question.
    Cool, my counting method would have worked, except I was tired and counted combinations that shouldn't have been counted.

    Here was my working:
    Code:
    Total scenarios for the next three cards:
    50 * 49 * 48  ==  117,600
    
    We want (5H or 5D or 5C) and (10H or 10D or 10S) and (one other)
    Possible combinations they could come out successfully:
    
    
    # 5  5     (47 * 3 * 2) = 282 // whoops, invalid combination
    # 5  10    (44 * 3 * 3) = 396
    # 10 5     (44 * 3 * 3) = 396
    # 10 10    (47 * 3 * 2) = 282 // whoops, invalid combination
    _____________________________
    = 1356
        * 3
    = 4068
    
    10 10 10   (3 * 2 * 1) = 6 // whoops, invalid combination
    5  5  5    (3 * 2 * 1) = 6 // whoops, invalid combination
    
    10 5  5    (3 * 3 * 2) = 18
    5  10 10   (3 * 3 * 2) = 18
    _____________________________
    = 48
    
    (4068 + 48) / 117,600 == 0.035 == 3.5%
    If you take out the "whoops", you get:
    Code:
    ((396 + 396) * 3) / 117,600 = 0.020204 == 2.02%
    If you add the combinations where you get one 10 and two fives or one five and two tens, you get:
    Code:
    (((396 + 396) * 3) + (18 + 18)) / 117,600 = 0.020510 == 2.05%
    So, the question being a little ambiguous, I think the answer is either 2.02% or 2.05%.

  6. #21
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Hey Brain, care to come here and clarify your question?

  7. #22
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    I was just reading some, 'how to calculate poker odds' tutorials... and I was trying one of their methods for calculating odds of obtaining a given card on the flop. I was trying to take this method one step further and trying to calculate odds of getting a winning combination on the flop.. based on this tutorial.

    I was ambiguous on my first post, mainly because I was trying to get away with a general algorithm for calculating odds for all winning combinations based on cards left in the deck that would offer you the chance to obtain a specific winning combination vs. available cards.

    In response to sang-drax's suggestion, I found this site at mathworld (although not texas holdem specific) addresses implementation of binomial coefficients in calculating poker odds.

    There are many variables that determine one's play of texas holdem poker. Crunching the numbers is just one small but necessary aspect.. and plays a crucial role in my computer player AI decision making.. so I want to choose the most correct method of accurately representing one's overall odds of obtaining each winning combination before and after the flop.

    Thanks for everyone's help thus far, your math examples have been very helpful. I now realize that my previous example to obtain a subsequent 5 and 10 on the flop did place a restriction on obtaining the most accurate odds of obtaining two pair. At the time it seemed to offer up the best odds since you already had those cards in your hand.

    This is the most logic intensive program I have ever attempted, so please bear with the me.
    Last edited by The Brain; 06-09-2005 at 02:28 AM.
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  8. #23
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Quote Originally Posted by Govtcheez
    edit: I think you've got suits confused with the numbers of the card.
    Yes. I was referring to the numbers of the cards.

    EDIT: It wasn't my post that Govt quoted.
    Last edited by Sang-drax; 06-09-2005 at 01:47 PM.

  9. #24
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    > Then, the third card cant match the suit of the other cards because then you would have a full house

    Wait, what?

    edit: I think you've got suits confused with the numbers of the card.
    Maybe I didnt write it out clearly enough hehe....

    >Then, the third card cant match the suit of the other cards because then you would have a full house

    You have two cards be begin with, your dealt two more cards, each matching a suit of the first to cards, so you have two pair at this point. The third card (dealt to you, not counting the first two you already had) cant match the suit of any of the cards you already have because then you would have 3 and 2 of a suit (full house right?).
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

  10. #25
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    A full house is three of the same number and 2 of a different number. Suits have no bearing on it at all.

  11. #26
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    Good point :P

    (doesnt play poker)

    edit:

    > I think you've got suits confused with the numbers of the card.

    doh... one of my worst brain farts to date :P

    apparently I've never seen a card deck either.
    Last edited by *ClownPimp*; 06-09-2005 at 10:49 PM.
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Math
    By knightjp in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 04-01-2009, 05:36 PM
  2. how to use operator+() in this code?
    By barlas in forum C++ Programming
    Replies: 10
    Last Post: 07-09-2005, 07:22 PM
  3. Math Header?
    By Rune Hunter in forum C++ Programming
    Replies: 26
    Last Post: 09-17-2004, 06:39 AM
  4. toughest math course
    By axon in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 10-28-2003, 10:06 PM
  5. Quick math question
    By PJYelton in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 04-03-2003, 10:06 AM