JavaScript is required to use Bungie.net

OffTopic

Surf a Flood of random discussion.
12/14/2013 7:47:02 PM
26

Anyone here crazy good at Probabillity?

As much as I like Math, Probabillity has always been one of the subjects that I struggle to develop an intuitive sense for. It's really something I should sit down and relearn one of these days... Anyways, I have a puzzle to present to anyone who would like to try to solve it. Its solution, or any ideas that could help me reach the solution, would be incredibly helpful for developing an Extra Credit Artificial Intelligence that can play a particular Card Game. Here is the problem: 1) You have a standard card deck with 52 cards, 4 suits, cards 2 through Ace per suit, standard stuff. 2) You are dealt a hand of size N, that contains A 4 of a Kinds, B 3 of a Kinds, C 2 of a Kinds, and D singles. So 4*A + 3*B + 2*C + D = N. 3) Given the hand size N, what is the probability of drawing a particular combination of A, B, C, and D? Assume that your input is always correct (so 4*A + 3*B + 2*C + D = N). That might be phrased awkwardly, so feel free to ask questions if that doesn't make any sense. I couldn't find any easy to use resources to solve it on my own in about 20 minutes of research, and really, anything, even a pointer in the right direction, will help tremendously. Thanks!

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote]A 4 of a Kinds, B 3 of a Kinds, C 2 of a Kinds, and D singles. So 4*A + 3*B + 2*C + D = N[/quote]I don't understand what you mean by "A 4 of a Kinds"

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Apologies for necro - I was pointed at these boards today by a friend from another fora, thought that anyone with similar probability question might find an actual answer useful. This can be done via a trivial combination of the hypergeomentric distribution and permutation counts. The formula for the exact probability of a specific outcome given the conditions of the OP then simplifies to (sorry for so many parenthesis/etc. - no gaming fora I've seen supports mathematical markup properly): (25025*(3^(c+5))*(2^(2*b+c+2*d+10)))/ (a!*b!*c!*d!*(13-a-b-c-d)!*Bin(52,4*a+3*b+2*c+d)) Where a,b,c, and d correspond to the OP definitions, and Bin(x,y) is the binomial coefficient (x choose y). Improper values (e.g. asking for 14 singlets) taken care of "automagically" - you end up with an undefined mathematical operation.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Edited by Specops115: 12/19/2013 4:53:39 AM
    Already put my 2 cents in but felt like solving this in C# to check the results Posting %'s for N = 13 and will post some sample code in a reply in case anyone is interested edit: oak -> of a kind [spoiler]0 4oak 0 3oak 0 2oak 13 singles = 0.0105681% 0 4oak 0 3oak 1 2oak 11 singles = 0.6182339% 0 4oak 0 3oak 2 2oak 9 singles = 6.375537% 0 4oak 1 3oak 0 2oak 10 singles = 0.5667143% 0 4oak 0 3oak 3 2oak 7 singles = 19.12661% 0 4oak 1 3oak 1 2oak 8 singles = 6.375536% 1 4oak 0 3oak 0 2oak 9 singles = 0.1180655% 0 4oak 0 3oak 4 2oak 5 singles = 18.82776% 0 4oak 1 3oak 2 2oak 6 singles = 16.73578% 0 4oak 2 3oak 0 2oak 7 singles = 1.062589% 1 4oak 0 3oak 1 2oak 7 singles = 0.7969421% 0 4oak 0 3oak 5 2oak 3 singles = 5.648327% 0 4oak 1 3oak 3 2oak 4 singles = 12.55184% 0 4oak 2 3oak 1 2oak 5 singles = 3.347157% 1 4oak 0 3oak 2 2oak 5 singles = 1.255184% 1 4oak 1 3oak 0 2oak 6 singles = 0.1859532% 0 4oak 0 3oak 6 2oak 1 singles = 0.3530205% 0 4oak 1 3oak 4 2oak 2 singles = 2.35347% 0 4oak 2 3oak 2 2oak 3 singles = 2.091973% 1 4oak 0 3oak 3 2oak 3 singles = 0.5229933% 0 4oak 3 3oak 0 2oak 4 singles = 0.154961% 1 4oak 1 3oak 1 2oak 4 singles = 0.3486622% 2 4oak 0 3oak 0 2oak 5 singles = 0.005811036% 0 4oak 1 3oak 5 2oak 0 singles = 0.0504315% 0 4oak 2 3oak 3 2oak 1 singles = 0.22414% 1 4oak 0 3oak 4 2oak 1 singles = 0.04202625% 0 4oak 3 3oak 1 2oak 2 singles = 0.09961778% 1 4oak 1 3oak 2 2oak 2 singles = 0.11207% 1 4oak 2 3oak 0 2oak 3 singles = 0.01660296% 2 4oak 0 3oak 1 2oak 3 singles = 0.00622611% 0 4oak 3 3oak 2 2oak 0 singles = 0.004669583% 1 4oak 1 3oak 3 2oak 0 singles = 0.003502187% 0 4oak 4 3oak 0 2oak 1 singles = 0.001037685% 1 4oak 2 3oak 1 2oak 1 singles = 0.004669583% 2 4oak 0 3oak 2 2oak 1 singles = 0.0008755467% 2 4oak 1 3oak 0 2oak 2 singles = 0.0003891319% 1 4oak 3 3oak 0 2oak 0 singles = 2.882459E-05% 2 4oak 1 3oak 1 2oak 0 singles = 3.242766E-05% 3 4oak 0 3oak 0 2oak 1 singles = 1.801537E-06%[/spoiler]

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    2 Replies
    • Only thing that is throwing me off in the problem statement is "3)" It is obvious that the input is always correct because any hand will satisfy the condition 4*A + 3*B + 2*C + D = N. So I don't really get number 3, because you have a 100% chance of drawing a combination of A, B, C, D; or am I misinterpreting something? I guess the confusion comes with the term particular combination. For example, does a hand with four 2's constitute the same particular combination as a hand with four 5's? So basically, since A still equals 1 (while B,C, and D are 0) it effectively is still the same particular combination. I will assume this and will go about a solution (which I have a good idea on how to achieve) unless you reply with additional clarification.

      Posting in language:

       

      Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

      1 Reply
      • it either happens or it doesn't 50/50

        Posting in language:

         

        Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

        10 Replies
        • I thought about this and I think the only real probability of anything is 50/50. It will either happen or it won't.

          Posting in language:

           

          Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

          1 Reply
          • I know one thing's probably true. You're probably a dick sucking -blam!- who thinks he's worth anything in this world.

            Posting in language:

             

            Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

          • Edited by HurtfulTurkey: 12/19/2013 2:58:17 AM
            [quote]2) You are dealt a hand of size N, that contains A 4 of a Kinds, B 3 of a Kinds, C 2 of a Kinds, and D singles. So 4*A + 3*B + 2*C + D = N.[/quote] This is really confusing. Are A, B, C, and D like variables? Like you could have A = 2, so you'd have two 4 of a kinds? So your hand might have no "four of a kinds", three "three of a kinds", etc? The problem with calculating this is that probabilities for each hand is based on the number of cards in that hand...to calculate all the probabilities for all the different variables A, B, C, D in all the sizes of hands possible is really overwhelming.

            Posting in language:

             

            Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

          • 0
            So it's [i]kind of[/i] a knapsack problem, only instead of finding the optimal solution you're looking for the average value of every solution for a given N? That about right?

            Posting in language:

             

            Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

            1 Reply
            • What are the chances someone on B.net will even be able to solve that?

              Posting in language:

               

              Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

              2 Replies
              • You might as well have called the thread CALLING ALL ASIANS

                Posting in language:

                 

                Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

              • I am. The probability that these answers are incorrect is very high. 1) 57 2) 4.73 3) H

                Posting in language:

                 

                Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

              • Damn, I was pretty good at this stuff but I can't really understand it right now. You need to know the probability of drawing a combination of A,B,C and D, correct? You have 52 cards total. This is tricky. 52 divided by 4 is 13. The hand you're dealt amounts to 10 cards? Or am I confused?

                Posting in language:

                 

                Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                1 Reply
                • I'll see if I can wrap my head around it, but I'm a little confused. Does the hand dealt always have a set of 4 of a kind, 3 of a kind, 2 of a kind, and singles, or is it that you're dealt a set number of cards and there is a possibility of having 4 of a kind, 3 of a kind, etc.?

                  Posting in language:

                   

                  Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                  1 Reply
                  • 50/50

                    Posting in language:

                     

                    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                  • 1/2 = 50%

                    Posting in language:

                     

                    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                  • It's unlikely that I can help.

                    Posting in language:

                     

                    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                  • Probably not.

                    Posting in language:

                     

                    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                  • Edited by DTL: 12/17/2013 5:12:04 PM
                    0
                    I barely passed this course with my sanity intact, but here's some notes I took. Not an identical problem, but somewhat similar. Perhaps it will help.. You randomly select a card from a 52-card deck. Find the probability of selecting a 2 or a 4. First, determine if the events are mutually exclusive. To do so, determine if it is possible for one card to be simultaneously a 2 and a 4 at the same time. If there is no possibility of the card being both a 2 and a 4, then they are mutually exclusive. The formula for mutually exclusive events is: P(A or B) = P(A) + P(B) The formula for events not mutually exclusive is: P(A or B) = P(A) + P(B) - P(A and B) For this particular scenario, it is not possible for the card to be both a 2 and a 4 at the same time. Therefore, the events are mutually exclusive. First calculate P(2) P(2) = 4/52 Next calculate P(4) P(4) = 4/52 Therefore, P(2 or 4)= 4/52 + 4/52 = 2/13 Hope this helps. Probabilities are a bitch.

                    Posting in language:

                     

                    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                  • I am only good at probability about half of the time. The other half of the time? I am not.

                    Posting in language:

                     

                    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                    1 Reply
                    • I'm not even sure where to begin, or even how... Good luck, OP.

                      Posting in language:

                       

                      Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                      1 Reply
                      • Ok - was going to try to ramble my way through an attempt but it's becoming very complex very quickly. Mind clearing up the problem a bit. What is your ultimate goal and perhaps there is an easier way to arrive at a solution. I know this is probably a bit late for implementing the extra credit but willing to give it a shot if you've still got time.

                        Posting in language:

                         

                        Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                        3 Replies
                        • The Dutchy Theorem: Multiply both sides by zero and get 0=0 so that your personal life becomes much easier.

                          Posting in language:

                           

                          Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                        • I am so confused :/

                          Posting in language:

                           

                          Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                        • 50%

                          Posting in language:

                           

                          Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                        • inb4iteitherhappensoritdoesnt50/50 And I don't do probability well.

                          Posting in language:

                           

                          Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

                          1 Reply
                          You are not allowed to view this content.
                          ;
                          preload icon
                          preload icon
                          preload icon