Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > General Gambling > Probability
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2007, 05:00 PM
BatsShadow BatsShadow is offline
Senior Member
 
Join Date: Nov 2004
Posts: 589
Default Hand drawing possibilities for an uneven distribution

I don't remember my basic college probabilty math, so I figured someone can explain this faster than I can figure out how to look up the answer in google.

I'm trying to calculate the total number of possible starting hands from a Magic the Gathering deck. The deck is 60 cards. There are 13 unique cards of various quantities (between 2 and 13 of each card). You need to draw 7, the order doesn't matter.

Can someone explain the basics of solving this? Thanks.
Reply With Quote
  #2  
Old 05-18-2007, 07:43 PM
AaronBrown AaronBrown is offline
Senior Member
 
Join Date: May 2005
Location: New York
Posts: 2,260
Default Re: Hand drawing possibilities for an uneven distribution

This would not have been covered in your basic probability class.

Let the number of each kind of card be N_i, so:

N_1 + N_2 + . . . + N_13 = 60

Let the number of cards of type i in the hand be X_i (X_i <= N_i), so:

X_1 + X_2 + . . . + X_13 = 7

The number of ways to draw this hand is the product from i = 1 to i = 13 of C(N_i, X_i).

If you compute this for every possible combination of X_i's and add up the ways, you have the total number of results. For each set of X_i's, you can dividen the number of ways to get it by the total number of ways to get the probability.
Reply With Quote
  #3  
Old 05-19-2007, 11:58 AM
BatsShadow BatsShadow is offline
Senior Member
 
Join Date: Nov 2004
Posts: 589
Default Re: Hand drawing possibilities for an uneven distribution

Thank you, but this is still a little bit over my head. So I was wondering if we could do an example. Before the example, one question:

When calculating X_i you have

"Let the number of cards of type i in the hand be X_i (X_i <= N_i)"

But X_i must be <= 7 as well, right? X_i <= N_i && X_i <= 7


Ok, here is a sample problem I set up, if you don't mind working through this with me:

A deck of 15 cards

card A x5
card B x4
card C x3
card D x2
card E x1

What is the total possible number of 4 card hands?

Thanks again.
Reply With Quote
  #4  
Old 05-19-2007, 02:49 PM
BruceZ BruceZ is offline
Senior Member
 
Join Date: Sep 2002
Posts: 4,078
Default Re: Hand drawing possibilities for an uneven distribution

[ QUOTE ]
Ok, here is a sample problem I set up, if you don't mind working through this with me:

A deck of 15 cards

card A x5
card B x4
card C x3
card D x2
card E x1

What is the total possible number of 4 card hands?

Thanks again.

[/ QUOTE ]

Aaron's method counts each starting hand multiple times depending on how many ways you can make that hand. For example, it will count AAAA 5 times since there are 5 ways to select the 4 As out of the 5 As in the deck. That would just give C(15,4) total hands in this case - not very interesting. I will work this example assuming that you only want to count each distinguishable starting hand one time. So I am just counting the number of ways to assign the X's in Aaron's method.

Even this specific example is a little complicated. If we could have up to 4 of any of the cards A-E, then the number of 4 card hands would be C(8,4) = 8!/4!/4! = 70. For example, hand AACD could be denoted as AxxBCxDxE. The number of such sequences is C(8,4) since we are choosing 4 positions for the x's out of 5+4-1=8 possible positions, where we subtract 1 since the first symbol is always A. This is the standard trick for counting the number of distinguishable ways to place M indistinguishable balls in N distinguishable cups as C(N+M-1,M) (see Bose-Einstein). Now we must subtract the cases that assign more than 1 E, more than 2 Ds, or more than 3 Cs. These are mutually exclusive. The number of ways to assign 2 Es is C(5,2) = 5!/2!/3! = 10 since this is the number of ways to assign the remaining 2 to the other 4 cards, since by the same argument as above this is C(2+4-1,2). The number of ways to assign 3 Es is 4 since there are 4 ways to assign the 4th one, and the number of ways to assign 4 Es is 1. Similarly, the number of ways to assign 3 Ds is 4, the number of ways to assign 4 Ds is 1, and the number of ways to assign 4 Cs is 1. So the final number of possible hands with this deck is

C(8,4) - C(5,2) - 4 - 1 - 4 - 1 - 1 = 49.
Reply With Quote
  #5  
Old 05-19-2007, 04:02 PM
BruceZ BruceZ is offline
Senior Member
 
Join Date: Sep 2002
Posts: 4,078
Default Re: Hand drawing possibilities for an uneven distribution

[ QUOTE ]
This would not have been covered in your basic probability class.

Let the number of each kind of card be N_i, so:

N_1 + N_2 + . . . + N_13 = 60

Let the number of cards of type i in the hand be X_i (X_i <= N_i), so:

X_1 + X_2 + . . . + X_13 = 7

The number of ways to draw this hand is the product from i = 1 to i = 13 of C(N_i, X_i).

If you compute this for every possible combination of X_i's and add up the ways, you have the total number of results. [emphasis added]

[/ QUOTE ]

That would just be C(60,7), no?
Reply With Quote
  #6  
Old 05-19-2007, 05:00 PM
AaronBrown AaronBrown is offline
Senior Member
 
Join Date: May 2005
Location: New York
Posts: 2,260
Default Re: Hand drawing possibilities for an uneven distribution

Here is the answer to your reduced example. I've listed all 49 possible hands (as BruceZ computed). This is the hardest part of the problem, I used a simple computer program to do it. Once you have the hands, you can use the Excel function:

=COMBIN(5,A2)*COMBIN(4,B2)*COMBIN(3,C2)*COMBIN(2,D 2)*COMBIN(1,E2)

to count how many times that combination can occur (A2 is the number of A's, B2 the number of B's and so on). For example, the first line in the table below shows the hand with 1 each of A, B, C and D. That occurs 120 ways. Divide by Combin(15,4) (as BruceZ noted) = 1365, and you get 0.088 or 8.8%.

I sorted the table from most common to least.

A | B | C | D | E | Count | Prob
1 | 1 | 1 | 1 | 0 | 120 | 8.8%
2 | 1 | 1 | 0 | 0 | 120 | 8.8%
1 | 2 | 1 | 0 | 0 | 90 | 6.6%
2 | 1 | 0 | 1 | 0 | 80 | 5.9%
1 | 1 | 1 | 0 | 1 | 60 | 4.4%
1 | 1 | 2 | 0 | 0 | 60 | 4.4%
1 | 2 | 0 | 1 | 0 | 60 | 4.4%
2 | 0 | 1 | 1 | 0 | 60 | 4.4%
2 | 2 | 0 | 0 | 0 | 60 | 4.4%
1 | 1 | 0 | 1 | 1 | 40 | 2.9%
2 | 1 | 0 | 0 | 1 | 40 | 2.9%
3 | 1 | 0 | 0 | 0 | 40 | 2.9%
0 | 2 | 1 | 1 | 0 | 36 | 2.6%
1 | 0 | 1 | 1 | 1 | 30 | 2.2%
1 | 0 | 2 | 1 | 0 | 30 | 2.2%
1 | 2 | 0 | 0 | 1 | 30 | 2.2%
2 | 0 | 1 | 0 | 1 | 30 | 2.2%
2 | 0 | 2 | 0 | 0 | 30 | 2.2%
3 | 0 | 1 | 0 | 0 | 30 | 2.2%
0 | 1 | 1 | 1 | 1 | 24 | 1.8%
0 | 1 | 2 | 1 | 0 | 24 | 1.8%
1 | 1 | 0 | 2 | 0 | 20 | 1.5%
1 | 3 | 0 | 0 | 0 | 20 | 1.5%
2 | 0 | 0 | 1 | 1 | 20 | 1.5%
3 | 0 | 0 | 1 | 0 | 20 | 1.5%
0 | 2 | 1 | 0 | 1 | 18 | 1.3%
0 | 2 | 2 | 0 | 0 | 18 | 1.3%
1 | 0 | 1 | 2 | 0 | 15 | 1.1%
1 | 0 | 2 | 0 | 1 | 15 | 1.1%
0 | 1 | 1 | 2 | 0 | 12 | 0.9%
0 | 1 | 2 | 0 | 1 | 12 | 0.9%
0 | 2 | 0 | 1 | 1 | 12 | 0.9%
0 | 3 | 1 | 0 | 0 | 12 | 0.9%
2 | 0 | 0 | 2 | 0 | 10 | 0.7%
3 | 0 | 0 | 0 | 1 | 10 | 0.7%
0 | 3 | 0 | 1 | 0 | 8 | 0.6%
0 | 0 | 2 | 1 | 1 | 6 | 0.4%
0 | 2 | 0 | 2 | 0 | 6 | 0.4%
1 | 0 | 0 | 2 | 1 | 5 | 0.4%
1 | 0 | 3 | 0 | 0 | 5 | 0.4%
4 | 0 | 0 | 0 | 0 | 5 | 0.4%
0 | 1 | 0 | 2 | 1 | 4 | 0.3%
0 | 1 | 3 | 0 | 0 | 4 | 0.3%
0 | 3 | 0 | 0 | 1 | 4 | 0.3%
0 | 0 | 1 | 2 | 1 | 3 | 0.2%
0 | 0 | 2 | 2 | 0 | 3 | 0.2%
0 | 0 | 3 | 1 | 0 | 2 | 0.1%
0 | 0 | 3 | 0 | 1 | 1 | 0.1%
0 | 4 | 0 | 0 | 0 | 1 | 0.1%
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.